使用以下代码,我想设置矩形的纹理,但问题是纹理图像不会在整个矩形上重复:
var penGeometry = new THREE.CubeGeometry(length, 15, 120);
var wallTexture = new THREE.ImageUtils.loadTexture('../../3D/brick2.jpg');
wallTexture.wrapS = wallTexture.wrapT = THREE.MirroredRepeatWrapping;
wallTexture.repeat.set(50, 1);
var wallMaterial = new THREE.MeshBasicMaterial({ map: wallTexture });
var line = new THREE.Mesh(penGeometry, wallMaterial);
line.position.x = PenArray.lastPosition.x + (PenArray.currentPosition.x - PenArray.lastPosition.x) / 2;
line.position.y = PenArray.lastPosition.y + (PenArray.currentPosition.y - PenArray.lastPosition.y) / 2;
line.position.z = PenArray.lastPosition.z + 60;
line.rotation.z = angle;
纹理图像是http://wysnan.com/NightClubBooth/brick1.jpg 结果是http://wysnan.com/NightClubBooth/brick2.jpg
只有一块纹理被正确渲染,但不是所有的矩形,为什么?以及如何使用此纹理图像渲染所有矩形?