Three.js重复纹理失败

时间:2013-07-29 20:15:58

标签: javascript three.js textures repeat texture-wrapping

我正在尝试制作一个简单的地板纹理,但似乎wrapS和wrapT不起作用。

查看结果:http://hpics.li/321350c

var texture = THREE.ImageUtils.loadTexture( "Game/Texture/drytext.png" );
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 4, 4 );
var floorMaterial = new THREE.MeshBasicMaterial( { map: texture, side: THREE.DoubleSide });
var floorGeometry = new THREE.PlaneGeometry(20, 20, 10, 10);
var floor = new THREE.Mesh(floorGeometry, floorMaterial);
floor.rotation.x = -Math.PI / 2;
scene.add(floor);

谢谢

0 个答案:

没有答案