three.js 给物体添加图片

  1. var skyBoxGeometry = new THREE.BoxGeometry( 5000, 5000, 5000 );  
  2.   
  3. var texture = new THREE.TextureLoader().load("images/sky.jpg");  
  4.   
  5. var skyBoxMaterial = new THREE.MeshBasicMaterial( { map:texture, side: THREE.DoubleSide } );  
  6.   
  7. var skyBox = new THREE.Mesh( skyBoxGeometry, skyBoxMaterial );  
  8.   
  9. scene.add(skyBox);  
原文地址:https://www.cnblogs.com/XIE7654/p/6567966.html