mrdoob/three.js — Issue #1467: Repeat image texture in a cube
Author: nathaliaspatricio
Created: 2012-03-07 18:22:55+00:00
State: open

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?