Different material on back and frontside of extruded shape

前端 未结 2 1196
逝去的感伤
逝去的感伤 2020-12-05 15:54

I\'m trying to apply different material on front and back sides of extruded shape, but cannot figure out where to put side: THREE.FrontSide and side: THRE

2条回答
  •  萌比男神i
    2020-12-05 16:42

    After you create your mesh geometry, and before the first call to render(), you have to change the materialIndex to 2 for the back faces. Then, add a third material in your material array.

    You can identify the back faces by their face normals. Face normals for faces on the back of the geometry should all point in the same direction.

    three.js r.58

提交回复
热议问题