-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Labels
Description
I create a cube and I'm trying to apply some texture on it using this code:
function createCube(sx, sy, sz, p, ry, image){
var texture = THREE.ImageUtils.loadTexture(image);
var material = new THREE.MeshLambertMaterial( { map: texture } );
var cube = new THREE.Mesh( new THREE.CubeGeometry( sx, sy, sz ), material );
cube.position = p;
cube.rotation.y = ry;
scene.add(cube);
}I need to repeat the image only in one cube face like a wallpaper. I have tried to use RepeatWrapping, but it didn't work and I'm not finding this object in the three.js source code to understand how it works.
Any help?