天空盒

。先把代码放上来

var path="img/skybox/";

var format='.jpg';

var urls= [

path+'px'+format,path+'nx'+format,

path+'py'+format,path+'ny'+format,

path+'pz'+format,path+'nz'+format

];

varreflectionCube=newTHREE.CubeTextureLoader().load(urls);

reflectionCube.format=THREE.RGBFormat;

scene.background=reflectionCube;

你可能感兴趣的:(天空盒)