Advertisement
julong

repeat texture

Jul 25th, 2014
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. repeat texture
  2. /////////////
  3. // create the ground plane
  4. var planeGeometry = new THREE.PlaneGeometry(2000, 2000);
  5. var map = new THREE.ImageUtils.loadTexture( 'assets/img/wood.jpg' );
  6. map.wrapS = map.wrapT = THREE.RepeatWrapping;
  7. map.repeat.set( 4, 4);
  8. var planeMaterial = new THREE.MeshLambertMaterial({color: 0xffffff,map:map , transparent: true }); //side:THREE.BackSide
  9. var plane = new THREE.Mesh(planeGeometry, planeMaterial);
  10. plane.receiveShadow = true;
  11. // rotate and position the plane
  12. plane.rotation.x = -0.5 * Math.PI;
  13. plane.position.x = 0;
  14. plane.position.y = -2;
  15. plane.position.z = 0;
  16. scene.add(plane);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement