我有一个相机所在的圆柱体。我设置了雾,因此看不到管的末端 - 但是我希望通过圆柱体的 alpha 贴图侧面可以看到天空盒。雾挡住了能见度,我想知道需要做些什么来解决这个问题。
var POS_X = 0,
POS_Y = 0,
POS_Z = 0,
FOV = 60,
WIDTH = window.innerWidth,
HEIGHT = window.innerHeight,
NEAR = 1,
FAR = 120000, //Camera Far Distance
renderer = new THREE.WebGLRenderer({antialias:true}),
…………
function addFog(){
scene.fog = new THREE.Fog(0x000000, 100, 40000);
}
…………
function addSkybox(){
var materialArray = [],
imgArray = ["skybox_right.jpg", "skybox_left.jpg",
"skybox_front.jpg", "skybox_back.jpg",
"skybox_top.jpg", "skybox_bottom.jpg"];
for (var i = 0; i < 6; i++){
materialArray.push( new THREE.MeshBasicMaterial({
map: loader.load( imgArray[i] ),
side: THREE.BackSide
}));
}
var skyMat = new THREE.MeshFaceMaterial( materialArray ),
skyGeo = new THREE.BoxGeometry( 100000, 100000, 100000, 1, 1, 1),
sky = new THREE.Mesh(skyGeo, skyMat);
sky.name="skybox";
scene.add(sky);
}