一组中相同的两个平面,都不透明

时间:2013-11-09 01:56:30

标签: three.js

我有一个平面网格,我复制它们并将它们放在一个Object3d组中,它们都被认为是透明的,但只有其中一个是,请帮忙。

face = new THREE.MeshBasicMaterial({
    side: THREE.DoubleSide,
    transparent: true,
    map: THREE.ImageUtils.loadTexture('face.png')
});
face.map.magFilter = THREE.NearestFilter;
face.map.minFilter = THREE.NearestFilter;

facePlane = new THREE.Mesh(new THREE.PlaneGeometry(100, 100), face);

faceGroup = new THREE.Object3D();
faceGroup.add(facePlane.clone());
faceGroup.add(facePlane.clone());
faceGroup.children[0].rotation.y = 90*(Math.PI/180);

scene.add(faceGroup);

1 个答案:

答案 0 :(得分:0)

Three.js / WebGL - transparent planes hiding other planes behind them

上找到解决方案

alphaTest: 0.5添加到素材中。