three.js 给物体添加图片
- var skyBoxGeometry = new THREE.BoxGeometry( 5000, 5000, 5000 );
- var texture = new THREE.TextureLoader().load("images/sky.jpg");
- var skyBoxMaterial = new THREE.MeshBasicMaterial( { map:texture, side: THREE.DoubleSide } );
- var skyBox = new THREE.Mesh( skyBoxGeometry, skyBoxMaterial );
- scene.add(skyBox);