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);


你可能感兴趣的:(three.js)