1
vote
1answer
73 views

I want to change the cube color, which is created by three.js

I've created a cube like this cube = new THREE.Mesh( new THREE.CubeGeometry(50,20,50), new THREE.MeshLambertMaterial({color: 0x6699ff}) ...
0
votes
1answer
26 views

Can I keep an image as the face of a cube?

Instead of using geometry.faces[ i ].color.setHex( 0x00ff80 ); to set the color , can I keep and image as the face?
0
votes
1answer
63 views

three.js cube: wires show over textures on Safari and Firefox, not Chrome

I'm just a 3D newbie, and this is my first experiment with Three.js: http://www.miguelrivero.net/mainWeb/images/portafolio/exp/BowieNextDay/heroesCoverCube.html Any idea why the side textures show ...
0
votes
1answer
197 views

Wrap a material around a cube in Three.js

I have been following this tutorial, creating a Cube with a texture. The problem is, the texture repeats on every face of the cube. I would like to use a single texture that 'wraps' around the cube. ...
0
votes
0answers
168 views

three.js click event and textures for segmented faces

I'm trying to build a cube with 9 segments on each face, and a click event for each segment. I've got the cube working with the 9 segments on each face, but I can't figure out how to specify a click ...
1
vote
1answer
814 views

Is it possible to use a 2d canvas as a texture for a cube?

I want to add images to one face of a cube, possibly using a 2d canvas element as the face texture. Here is my code, but I can't get the result I want. The face using the canvas as a texture is blank, ...
0
votes
0answers
85 views

Three.js how to add some images on one face of a cube?

I've already created a cube with 6 different texture on each face. Now i want to add some imges on one face with certain UV coordinate. I don't know how to do it? I am new to WebGL. Can anyone help ...
1
vote
0answers
562 views

Three.js cube transparent texture display edges

I'm trying to create the limits of the world in a game demo with three.js so I have created two cubes, each cube displays a "transparent forest texture" that will simulate the world limits. My ...
0
votes
2answers
120 views

Make line became spatial diagonal of a cube in Three.js

I want to create a cube and a line, and make this line became the spatial diagonal of this cube. Using trigonometry, I know that the angle formed by a line with no rotation and the spatial diagonal ...
1
vote
1answer
1k views

three.js - THREE.MeshFaceMaterial update textures on cube

Using r54: cube and on each side a different texture. var materials = [new THREE.MeshBasicMaterial({map: textureSmallSide}), new THREE.MeshBasicMaterial({map: textureSmallSide}), ...
3
votes
1answer
346 views

ThreeJS cube with different texture faces lit by point light with canvas renderer?

I am trying to draw a cube that uses 6 different images for textures, one for each face. I would like to illuminate the cube with a point light source. I'm using the canvas renderer because that is ...
0
votes
1answer
322 views

WebGL - Multiple Objects

I am new to WebGL. What I am trying to do is setup multiple cubes in a straight line, and when I use the keyboard I want to be able to move left and right to select a cube. Every time I move left and ...