0

Am new to three js. Am trying to set background image and want to change front face with image also.

Gone through more example from net, but am not getting idea.

Please tell me with simple examples.

Here is the cube link

2
  • 1
    The link goes to the Threejs website demo, have you got something of your own like a jsfiddle/codepen ? Would be great to start explaining from what you have already got so far :) Commented Jan 28, 2015 at 11:19
  • You should just look at the three.js examples. All you need is there. If you have more specific problems you should explain more in detail what you want help with. Commented Jan 28, 2015 at 12:41

1 Answer 1

2

You just can add your texture to your box:

var dice = new THREE.Mesh(
    new THREE.BoxGeometry( 50, 50, 50),
    new THREE.MeshBasicMaterial({
         map: THREE.ImageUtils.loadTexture('texture.png')
      }) 
    );
dice.material.side = THREE.DoubleSide;
scene.add( dice );

And for background you can use SphereGeometry() geometry and change the background.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.