1 |
- {"ast":null,"code":"import { Vector3, TmpVectors, Matrix } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { CreateRibbon } from \"./ribbonBuilder.js\";\nimport { Path3D } from \"../../Maths/math.path.js\";\n/**\n * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\n * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.\n * * The parameter `scale` (float, default 1) is the value to scale the shape.\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. Consider using this for any path that is straight, and particular for paths in the xy plane.\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param scene defines the hosting scene\n * @returns the extruded shape mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n */\nexport function ExtrudeShape(name, options, scene = null) {\n const path = options.path;\n const shape = options.shape;\n const scale = options.scale || 1;\n const rotation = options.rotation || 0;\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\n const updatable = options.updatable;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const instance = options.instance || null;\n const invertUV = options.invertUV || false;\n const closeShape = options.closeShape || false;\n const closePath = options.closePath || false;\n return _ExtrudeShapeGeneric(name, shape, path, scale, rotation, null, null, closePath, closeShape, cap, false, scene, updatable ? true : false, sideOrientation, instance, invertUV, options.frontUVs || null, options.backUVs || null, options.firstNormal || null, options.adjustFrame ? true : false);\n}\n/**\n * Creates an custom extruded shape mesh.\n * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\n * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\n * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.\n * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\n * * It must returns a float value that will be the scale value applied to the shape on each path point\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\n * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray` - depreciated in favor of closeShape\n * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray` - depreciated in favor of closePath\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. It should be supplied when the path is in the xy plane, and particularly if these sections are straight, because the underlying Path3D object will pick a normal in the xy plane that causes the extrusion to be collapsed into the plane. This should be used for any path that is straight.\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param scene defines the hosting scene\n * @returns the custom extruded shape mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#custom-extruded-shapes\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n */\nexport function ExtrudeShapeCustom(name, options, scene = null) {\n const path = options.path;\n const shape = options.shape;\n const scaleFunction = options.scaleFunction || (() => {\n return 1;\n });\n const rotationFunction = options.rotationFunction || (() => {\n return 0;\n });\n const ribbonCloseArray = options.closePath || options.ribbonCloseArray || false;\n const ribbonClosePath = options.closeShape || options.ribbonClosePath || false;\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\n const updatable = options.updatable;\n const firstNormal = options.firstNormal || null;\n const adjustFrame = options.adjustFrame || false;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const instance = options.instance;\n const invertUV = options.invertUV || false;\n return _ExtrudeShapeGeneric(name, shape, path, null, null, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, true, scene, updatable ? true : false, sideOrientation, instance || null, invertUV, options.frontUVs || null, options.backUVs || null, firstNormal, adjustFrame);\n}\nfunction _ExtrudeShapeGeneric(name, shape, curve, scale, rotation, scaleFunction, rotateFunction, rbCA, rbCP, cap, custom, scene, updtbl, side, instance, invertUV, frontUVs, backUVs, firstNormal, adjustFrame) {\n // extrusion geometry\n const extrusionPathArray = (shape, curve, path3D, shapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame) => {\n const tangents = path3D.getTangents();\n const normals = path3D.getNormals();\n const binormals = path3D.getBinormals();\n const distances = path3D.getDistances();\n if (adjustFrame) {\n /* fix tangents,normals, binormals */\n for (let i = 0; i < tangents.length; i++) {\n if (tangents[i].x == 0 && tangents[i].y == 0 && tangents[i].z == 0) {\n tangents[i].copyFrom(tangents[i - 1]);\n }\n if (normals[i].x == 0 && normals[i].y == 0 && normals[i].z == 0) {\n normals[i].copyFrom(normals[i - 1]);\n }\n if (binormals[i].x == 0 && binormals[i].y == 0 && binormals[i].z == 0) {\n binormals[i].copyFrom(binormals[i - 1]);\n }\n if (i > 0) {\n let v = tangents[i - 1];\n if (Vector3.Dot(v, tangents[i]) < 0) {\n tangents[i].scaleInPlace(-1);\n }\n v = normals[i - 1];\n if (Vector3.Dot(v, normals[i]) < 0) {\n normals[i].scaleInPlace(-1);\n }\n v = binormals[i - 1];\n if (Vector3.Dot(v, binormals[i]) < 0) {\n binormals[i].scaleInPlace(-1);\n }\n }\n }\n }\n let angle = 0;\n const returnScale = () => {\n return scale !== null ? scale : 1;\n };\n const returnRotation = () => {\n return rotation !== null ? rotation : 0;\n };\n const rotate = custom && rotateFunction ? rotateFunction : returnRotation;\n const scl = custom && scaleFunction ? scaleFunction : returnScale;\n let index = cap === Mesh.NO_CAP || cap === Mesh.CAP_END ? 0 : 2;\n const rotationMatrix = TmpVectors.Matrix[0];\n for (let i = 0; i < curve.length; i++) {\n const shapePath = [];\n const angleStep = rotate(i, distances[i]);\n const scaleRatio = scl(i, distances[i]);\n Matrix.RotationAxisToRef(tangents[i], angle, rotationMatrix);\n for (let p = 0; p < shape.length; p++) {\n const planed = tangents[i].scale(shape[p].z).add(normals[i].scale(shape[p].x)).add(binormals[i].scale(shape[p].y));\n const rotated = Vector3.Zero();\n Vector3.TransformCoordinatesToRef(planed, rotationMatrix, rotated);\n rotated.scaleInPlace(scaleRatio).addInPlace(curve[i]);\n shapePath[p] = rotated;\n }\n shapePaths[index] = shapePath;\n angle += angleStep;\n index++;\n }\n // cap\n const capPath = shapePath => {\n const pointCap = Array();\n const barycenter = Vector3.Zero();\n let i;\n for (i = 0; i < shapePath.length; i++) {\n barycenter.addInPlace(shapePath[i]);\n }\n barycenter.scaleInPlace(1.0 / shapePath.length);\n for (i = 0; i < shapePath.length; i++) {\n pointCap.push(barycenter);\n }\n return pointCap;\n };\n switch (cap) {\n case Mesh.NO_CAP:\n break;\n case Mesh.CAP_START:\n shapePaths[0] = capPath(shapePaths[2]);\n shapePaths[1] = shapePaths[2];\n break;\n case Mesh.CAP_END:\n shapePaths[index] = shapePaths[index - 1];\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\n break;\n case Mesh.CAP_ALL:\n shapePaths[0] = capPath(shapePaths[2]);\n shapePaths[1] = shapePaths[2];\n shapePaths[index] = shapePaths[index - 1];\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\n break;\n default:\n break;\n }\n return shapePaths;\n };\n let path3D;\n let pathArray;\n if (instance) {\n // instance update\n const storage = instance._creationDataStorage;\n path3D = firstNormal ? storage.path3D.update(curve, firstNormal) : storage.path3D.update(curve);\n pathArray = extrusionPathArray(shape, curve, storage.path3D, storage.pathArray, scale, rotation, scaleFunction, rotateFunction, storage.cap, custom, adjustFrame);\n instance = CreateRibbon(\"\", {\n pathArray,\n closeArray: false,\n closePath: false,\n offset: 0,\n updatable: false,\n sideOrientation: 0,\n instance\n }, scene || undefined);\n return instance;\n }\n // extruded shape creation\n path3D = firstNormal ? new Path3D(curve, firstNormal) : new Path3D(curve);\n const newShapePaths = new Array();\n cap = cap < 0 || cap > 3 ? 0 : cap;\n pathArray = extrusionPathArray(shape, curve, path3D, newShapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame);\n const extrudedGeneric = CreateRibbon(name, {\n pathArray: pathArray,\n closeArray: rbCA,\n closePath: rbCP,\n updatable: updtbl,\n sideOrientation: side,\n invertUV: invertUV,\n frontUVs: frontUVs || undefined,\n backUVs: backUVs || undefined\n }, scene);\n extrudedGeneric._creationDataStorage.pathArray = pathArray;\n extrudedGeneric._creationDataStorage.path3D = path3D;\n extrudedGeneric._creationDataStorage.cap = cap;\n return extrudedGeneric;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated please use the functions directly from the module\n */\nexport const ShapeBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ExtrudeShape,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ExtrudeShapeCustom\n};\nMesh.ExtrudeShape = (name, shape, path, scale, rotation, cap, scene = null, updatable, sideOrientation, instance) => {\n const options = {\n shape: shape,\n path: path,\n scale: scale,\n rotation: rotation,\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\n sideOrientation: sideOrientation,\n instance: instance,\n updatable: updatable\n };\n return ExtrudeShape(name, options, scene);\n};\nMesh.ExtrudeShapeCustom = (name, shape, path, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, scene, updatable, sideOrientation, instance) => {\n const options = {\n shape: shape,\n path: path,\n scaleFunction: scaleFunction,\n rotationFunction: rotationFunction,\n ribbonCloseArray: ribbonCloseArray,\n ribbonClosePath: ribbonClosePath,\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\n sideOrientation: sideOrientation,\n instance: instance,\n updatable: updatable\n };\n return ExtrudeShapeCustom(name, options, scene);\n};","map":{"version":3,"names":["Vector3","TmpVectors","Matrix","Mesh","CreateRibbon","Path3D","ExtrudeShape","name","options","scene","path","shape","scale","rotation","cap","NO_CAP","updatable","sideOrientation","_GetDefaultSideOrientation","instance","invertUV","closeShape","closePath","_ExtrudeShapeGeneric","frontUVs","backUVs","firstNormal","adjustFrame","ExtrudeShapeCustom","scaleFunction","rotationFunction","ribbonCloseArray","ribbonClosePath","curve","rotateFunction","rbCA","rbCP","custom","updtbl","side","extrusionPathArray","path3D","shapePaths","tangents","getTangents","normals","getNormals","binormals","getBinormals","distances","getDistances","i","length","x","y","z","copyFrom","v","Dot","scaleInPlace","angle","returnScale","returnRotation","rotate","scl","index","CAP_END","rotationMatrix","shapePath","angleStep","scaleRatio","RotationAxisToRef","p","planed","add","rotated","Zero","TransformCoordinatesToRef","addInPlace","capPath","pointCap","Array","barycenter","push","CAP_START","CAP_ALL","pathArray","storage","_creationDataStorage","update","closeArray","offset","undefined","newShapePaths","extrudedGeneric","ShapeBuilder"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Meshes/Builders/shapeBuilder.js"],"sourcesContent":["import { Vector3, TmpVectors, Matrix } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { CreateRibbon } from \"./ribbonBuilder.js\";\nimport { Path3D } from \"../../Maths/math.path.js\";\n/**\n * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\n * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.\n * * The parameter `scale` (float, default 1) is the value to scale the shape.\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. Consider using this for any path that is straight, and particular for paths in the xy plane.\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param scene defines the hosting scene\n * @returns the extruded shape mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n */\nexport function ExtrudeShape(name, options, scene = null) {\n const path = options.path;\n const shape = options.shape;\n const scale = options.scale || 1;\n const rotation = options.rotation || 0;\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\n const updatable = options.updatable;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const instance = options.instance || null;\n const invertUV = options.invertUV || false;\n const closeShape = options.closeShape || false;\n const closePath = options.closePath || false;\n return _ExtrudeShapeGeneric(name, shape, path, scale, rotation, null, null, closePath, closeShape, cap, false, scene, updatable ? true : false, sideOrientation, instance, invertUV, options.frontUVs || null, options.backUVs || null, options.firstNormal || null, options.adjustFrame ? true : false);\n}\n/**\n * Creates an custom extruded shape mesh.\n * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\n * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\n * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.\n * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\n * * It must returns a float value that will be the scale value applied to the shape on each path point\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\n * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray` - depreciated in favor of closeShape\n * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray` - depreciated in favor of closePath\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. It should be supplied when the path is in the xy plane, and particularly if these sections are straight, because the underlying Path3D object will pick a normal in the xy plane that causes the extrusion to be collapsed into the plane. This should be used for any path that is straight.\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\n * @param name defines the name of the mesh\n * @param options defines the options used to create the mesh\n * @param scene defines the hosting scene\n * @returns the custom extruded shape mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#custom-extruded-shapes\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\n */\nexport function ExtrudeShapeCustom(name, options, scene = null) {\n const path = options.path;\n const shape = options.shape;\n const scaleFunction = options.scaleFunction ||\n (() => {\n return 1;\n });\n const rotationFunction = options.rotationFunction ||\n (() => {\n return 0;\n });\n const ribbonCloseArray = options.closePath || options.ribbonCloseArray || false;\n const ribbonClosePath = options.closeShape || options.ribbonClosePath || false;\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\n const updatable = options.updatable;\n const firstNormal = options.firstNormal || null;\n const adjustFrame = options.adjustFrame || false;\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\n const instance = options.instance;\n const invertUV = options.invertUV || false;\n return _ExtrudeShapeGeneric(name, shape, path, null, null, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, true, scene, updatable ? true : false, sideOrientation, instance || null, invertUV, options.frontUVs || null, options.backUVs || null, firstNormal, adjustFrame);\n}\nfunction _ExtrudeShapeGeneric(name, shape, curve, scale, rotation, scaleFunction, rotateFunction, rbCA, rbCP, cap, custom, scene, updtbl, side, instance, invertUV, frontUVs, backUVs, firstNormal, adjustFrame) {\n // extrusion geometry\n const extrusionPathArray = (shape, curve, path3D, shapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame) => {\n const tangents = path3D.getTangents();\n const normals = path3D.getNormals();\n const binormals = path3D.getBinormals();\n const distances = path3D.getDistances();\n if (adjustFrame) {\n /* fix tangents,normals, binormals */\n for (let i = 0; i < tangents.length; i++) {\n if (tangents[i].x == 0 && tangents[i].y == 0 && tangents[i].z == 0) {\n tangents[i].copyFrom(tangents[i - 1]);\n }\n if (normals[i].x == 0 && normals[i].y == 0 && normals[i].z == 0) {\n normals[i].copyFrom(normals[i - 1]);\n }\n if (binormals[i].x == 0 && binormals[i].y == 0 && binormals[i].z == 0) {\n binormals[i].copyFrom(binormals[i - 1]);\n }\n if (i > 0) {\n let v = tangents[i - 1];\n if (Vector3.Dot(v, tangents[i]) < 0) {\n tangents[i].scaleInPlace(-1);\n }\n v = normals[i - 1];\n if (Vector3.Dot(v, normals[i]) < 0) {\n normals[i].scaleInPlace(-1);\n }\n v = binormals[i - 1];\n if (Vector3.Dot(v, binormals[i]) < 0) {\n binormals[i].scaleInPlace(-1);\n }\n }\n }\n }\n let angle = 0;\n const returnScale = () => {\n return scale !== null ? scale : 1;\n };\n const returnRotation = () => {\n return rotation !== null ? rotation : 0;\n };\n const rotate = custom && rotateFunction ? rotateFunction : returnRotation;\n const scl = custom && scaleFunction ? scaleFunction : returnScale;\n let index = cap === Mesh.NO_CAP || cap === Mesh.CAP_END ? 0 : 2;\n const rotationMatrix = TmpVectors.Matrix[0];\n for (let i = 0; i < curve.length; i++) {\n const shapePath = [];\n const angleStep = rotate(i, distances[i]);\n const scaleRatio = scl(i, distances[i]);\n Matrix.RotationAxisToRef(tangents[i], angle, rotationMatrix);\n for (let p = 0; p < shape.length; p++) {\n const planed = tangents[i].scale(shape[p].z).add(normals[i].scale(shape[p].x)).add(binormals[i].scale(shape[p].y));\n const rotated = Vector3.Zero();\n Vector3.TransformCoordinatesToRef(planed, rotationMatrix, rotated);\n rotated.scaleInPlace(scaleRatio).addInPlace(curve[i]);\n shapePath[p] = rotated;\n }\n shapePaths[index] = shapePath;\n angle += angleStep;\n index++;\n }\n // cap\n const capPath = (shapePath) => {\n const pointCap = Array();\n const barycenter = Vector3.Zero();\n let i;\n for (i = 0; i < shapePath.length; i++) {\n barycenter.addInPlace(shapePath[i]);\n }\n barycenter.scaleInPlace(1.0 / shapePath.length);\n for (i = 0; i < shapePath.length; i++) {\n pointCap.push(barycenter);\n }\n return pointCap;\n };\n switch (cap) {\n case Mesh.NO_CAP:\n break;\n case Mesh.CAP_START:\n shapePaths[0] = capPath(shapePaths[2]);\n shapePaths[1] = shapePaths[2];\n break;\n case Mesh.CAP_END:\n shapePaths[index] = shapePaths[index - 1];\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\n break;\n case Mesh.CAP_ALL:\n shapePaths[0] = capPath(shapePaths[2]);\n shapePaths[1] = shapePaths[2];\n shapePaths[index] = shapePaths[index - 1];\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\n break;\n default:\n break;\n }\n return shapePaths;\n };\n let path3D;\n let pathArray;\n if (instance) {\n // instance update\n const storage = instance._creationDataStorage;\n path3D = firstNormal ? storage.path3D.update(curve, firstNormal) : storage.path3D.update(curve);\n pathArray = extrusionPathArray(shape, curve, storage.path3D, storage.pathArray, scale, rotation, scaleFunction, rotateFunction, storage.cap, custom, adjustFrame);\n instance = CreateRibbon(\"\", { pathArray, closeArray: false, closePath: false, offset: 0, updatable: false, sideOrientation: 0, instance }, scene || undefined);\n return instance;\n }\n // extruded shape creation\n path3D = firstNormal ? new Path3D(curve, firstNormal) : new Path3D(curve);\n const newShapePaths = new Array();\n cap = cap < 0 || cap > 3 ? 0 : cap;\n pathArray = extrusionPathArray(shape, curve, path3D, newShapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame);\n const extrudedGeneric = CreateRibbon(name, {\n pathArray: pathArray,\n closeArray: rbCA,\n closePath: rbCP,\n updatable: updtbl,\n sideOrientation: side,\n invertUV: invertUV,\n frontUVs: frontUVs || undefined,\n backUVs: backUVs || undefined,\n }, scene);\n extrudedGeneric._creationDataStorage.pathArray = pathArray;\n extrudedGeneric._creationDataStorage.path3D = path3D;\n extrudedGeneric._creationDataStorage.cap = cap;\n return extrudedGeneric;\n}\n/**\n * Class containing static functions to help procedurally build meshes\n * @deprecated please use the functions directly from the module\n */\nexport const ShapeBuilder = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ExtrudeShape,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ExtrudeShapeCustom,\n};\nMesh.ExtrudeShape = (name, shape, path, scale, rotation, cap, scene = null, updatable, sideOrientation, instance) => {\n const options = {\n shape: shape,\n path: path,\n scale: scale,\n rotation: rotation,\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\n sideOrientation: sideOrientation,\n instance: instance,\n updatable: updatable,\n };\n return ExtrudeShape(name, options, scene);\n};\nMesh.ExtrudeShapeCustom = (name, shape, path, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, scene, updatable, sideOrientation, instance) => {\n const options = {\n shape: shape,\n path: path,\n scaleFunction: scaleFunction,\n rotationFunction: rotationFunction,\n ribbonCloseArray: ribbonCloseArray,\n ribbonClosePath: ribbonClosePath,\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\n sideOrientation: sideOrientation,\n instance: instance,\n updatable: updatable,\n };\n return ExtrudeShapeCustom(name, options, scene);\n};\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,UAAU,EAAEC,MAAM,QAAQ,4BAA4B;AACxE,SAASC,IAAI,QAAQ,YAAY;AACjC,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,MAAM,QAAQ,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,IAAI,EAAEC,OAAO,EAAEC,KAAK,GAAG,IAAI,EAAE;EACtD,MAAMC,IAAI,GAAGF,OAAO,CAACE,IAAI;EACzB,MAAMC,KAAK,GAAGH,OAAO,CAACG,KAAK;EAC3B,MAAMC,KAAK,GAAGJ,OAAO,CAACI,KAAK,IAAI,CAAC;EAChC,MAAMC,QAAQ,GAAGL,OAAO,CAACK,QAAQ,IAAI,CAAC;EACtC,MAAMC,GAAG,GAAGN,OAAO,CAACM,GAAG,KAAK,CAAC,GA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