three.js中,通过BufferGeometry()创建一个三角面,设置了法线朝向负Z方向,但是材质的side:THREE.FrontSide没有识别对,渲染在了反面(与normals参数全部穿0,0,1的表现一致),有专家能指点一下吗。(通过VertexNormalsHelper观察过法线,已经按照参数设置显示对了)
const geometry = new THREE.BufferGeometry()
const vertices = new Float32Array([
0, 10, 10,
60, 10, 10,
60, 60, 10
])
const normals = new Float32Array([
0, 0, -1,
0, 0, -1,
0, 0, -1
])
geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3))
geometry.setAttribute('normal', new THREE.BufferAttribute(normals, 3))
const material = new THREE.MeshStandardMaterial({
color: 0x0000ff,
side: THREE.FrontSide
})
const plane = new THREE.Mesh(geometry, material)
scene.add(plane)
