我正在尝试在平面上重复16x16纹理,但是当我设置纹理重复时,我得到以下结果:
纹理在平面的左下方正确显示,但看起来顶部和右侧边缘在平面的其余部分上拉伸。
到目前为止,我一直无法找出它为什么会这样做
这是代码:
function addTerrain(){
var texture = THREE.ImageUtils.loadTexture( "tex/tex.png" );
texture.WrapS = texture.WrapT = THREE.RepeatWrapping;
texture.repeat.set(2,2);
geometry = new THREE.PlaneGeometry(128, 128);
material = new THREE.MeshLambertMaterial( { map: texture } );
terrain = new THREE.Mesh( geometry, material );
terrain.rotation.set(-90 * (Math.PI / 180),0,0);
scene.add(terrain);
camera.lookAt(terrain.position);
light = new THREE.PointLight();
light.position.set(0,100,0);
scene.add(light);
}
如何使纹理在平面上重复正确?