hello , I want kids to understand top, front, back… with colors I have this,
but also with pictures… It seems only the side.front and back and double is possible
any idea how?
because when using colors it works… thanks to help me out
cheers karel
link with colors: ZIM Editor - JavaScript Canvas Online Code Editor and Viewer
problem with images: ZIM Editor - JavaScript Canvas Online Code Editor and Viewer
This is a fragment of the problematic code:
materials.push(new THREE.MeshBasicMaterial({map:picTexture1, side:THREE.FrontSide}));
materials.push(new THREE.MeshBasicMaterial({map:picTexture2, side:THREE.BackSide}));
Try the following changes:
- Remove the
side
parameter, it has another purpose, not related with the cube sides - Push 6 materials in
materials
– each will go to a different side of the cube.
Something like this:
materials.push(new THREE.MeshBasicMaterial({map:picTexture1}));
materials.push(new THREE.MeshBasicMaterial({map:picTexture2}));
materials.push(new THREE.MeshBasicMaterial({map:picTexture3}));
materials.push(new THREE.MeshBasicMaterial({map:picTexture4}));
materials.push(new THREE.MeshBasicMaterial({map:picTexture5}));
materials.push(new THREE.MeshBasicMaterial({map:picTexture6}));
1 Like