Apply subMaterial to top side of extruded polygon only

ExtrudePolygon is now updated so that you can either apply faceUV[1] to each side or by setting a new wrap parameter to true you can wrap faceUV[1] across all sides

https://www.babylonjs-playground.com/#D3943E#1

I will be doing a PR to update docs later this week.

If you want to see the code used it is in Babylon.js/polygonBuilder.ts at master · BabylonJS/Babylon.js · GitHub

line 13 to 115

which uses Babylon.js/polygonMesh.ts at master · BabylonJS/Babylon.js · GitHub

lines 253 to 275 for top and bottom and overwrites lines 315 to 376 for the sides

1 Like