【发布时间】:2019-09-11 22:03:19
【问题描述】:
我正在尝试创建一个带有重复纹理的长走廊。如何添加重复纹理并以直角旋转对象(在本例中为平面)以创建走廊墙壁和天花板?
var texture, material, plane;
texture = THREE.ImageUtils.loadTexture( "../img/texture.jpg" );
texture.wrapT = THREE.RepeatWrapping; // This doesn't seem to work;
material = new THREE.MeshLambertMaterial({ map : texture });
plane = new THREE.Mesh(new THREE.PlaneGeometry(400, 3500), material);
plane.doubleSided = true;
plane.position.x = 100;
plane.rotation.z = 2; // Not sure what this number represents.
scene.add(plane);
【问题讨论】:
-
在下面查看我的解决方案,它精益求精且有效!
标签: javascript three.js