Three.js Repeat texture fail

ε祈祈猫儿з 提交于 2019-12-10 11:24:22

问题


I'm trying to make a simple floor texture, but it seems that wrapS and wrapT don't works.

Look at the result: 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);

Thank you

来源:https://stackoverflow.com/questions/17933370/three-js-repeat-texture-fail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!