1. 程式人生 > >threejs 不管物體是不是在裡面都能看見它(去掉深度)

threejs 不管物體是不是在裡面都能看見它(去掉深度)

外掛中常見,z-index = 0;就是沒有深度的意思;

比如:

原樣

去掉深度檢測:

設定材質如下:

THREE.MeshPhongMaterial({
    color: colorMaterial,
    opacity: 0.4,
    transparent: false,
    vertexColors: THREE.NoColors,
    side: THREE.DoubleSide,
    clipIntersection: true,
    clippingPlanes: Lark_ClipPlanes,
    depthTest:false
});