-
Notifications
You must be signed in to change notification settings - Fork 0
/
87a06baf-034f79c93d02bf5e0b68.js.map
1 lines (1 loc) · 242 KB
/
87a06baf-034f79c93d02bf5e0b68.js.map
1
{"version":3,"file":"87a06baf-034f79c93d02bf5e0b68.js","mappings":"gaA6BIA,EACF,aAUEC,EACF,WACEC,KAAKC,iBAAmB,GACxBD,KAAKE,WAAa,IAAIC,EACtBH,KAAKI,oBAAsB,MAU3BD,EACF,WACEH,KAAKK,YAAa,EAClBL,KAAKC,iBAAmB,IAAIK,MAC5BN,KAAKO,WAAa,IAAID,MACtBN,KAAKQ,2BAA6B,IAAIF,OAWtCG,EACF,WACET,KAAKU,eAAiB,EACtBV,KAAKW,aAAe,KACpBX,KAAKY,iBAAmB,IAExBZ,KAAKa,gBAAkB,GACvBb,KAAKc,cAAgB,MAUrBC,EACF,WACEf,KAAKgB,mBAAoB,EAGzBhB,KAAKiB,QAAU,KAEfjB,KAAKkB,QAAU,KACflB,KAAKmB,gBAAkB,EACvBnB,KAAKoB,WAAa,IAAId,MAEtBN,KAAKqB,oBAAsB,MAU3BC,EAAO,SAAUC,GAenB,SAASD,EAAKE,EAAMC,EAAOC,EAAQC,EAAQC,EAAoBC,QAC/C,IAAVJ,IACFA,EAAQ,WAGK,IAAXC,IACFA,EAAS,WAGI,IAAXC,IACFA,EAAS,WAGkB,IAAzBE,IACFA,GAAuB,GAGzB,IAAIC,EAAQP,EAAOQ,KAAK/B,KAAMwB,EAAMC,IAAUzB,KA+C9C,GA5CA8B,EAAME,sBAAwB,IAAIjB,EAOlCe,EAAMG,eAAiB,EAQvBH,EAAMI,UAAY,IAAI5B,MAItBwB,EAAMK,qBAAuB,KAG7BL,EAAMM,UAAY,KAGlBN,EAAMO,qBAAuB,IAAItC,EAGjC+B,EAAMQ,yBAA2B,IAAI7B,EACrCqB,EAAMS,mBAAqB,KAG3BT,EAAMU,4BAA6B,EAInCV,EAAMW,gCAAkCnB,EAAKoB,YAK7CZ,EAAMa,gCAAkC,KACx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,YAAc,EAKnBrvB,EAAKsvB,SAAW,EAKhBtvB,EAAKuvB,WAAa,EAKlBvvB,EAAKwvB,mBAAqB,EAK1BxvB,EAAKyvB,kBAAoB,EAKzBzvB,EAAK0vB,OAAS,EAKd1vB,EAAK2vB,KAAO,EAKZ3vB,EAAK4vB,MAAQ,EAKb5vB,EAAK6vB,IAAM,EAKX7vB,EAAK8vB,OAAS,EAId9vB,EAAKwkB,kBAAoB,SAAUF,EAAYnkB,GAC7C,MAAM,eAAqB,eAGtBH,EApoJE,CAqoJT,KAGF,oCAA6CA","sources":["webpack://victor-cortes/./node_modules/@babylonjs/core/Meshes/mesh.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { Observable } from \"../Misc/observable\";\nimport { Tools, AsyncLoop } from \"../Misc/tools\";\nimport { DeepCopier } from \"../Misc/deepCopier\";\nimport { Tags } from \"../Misc/tags\";\nimport { Quaternion, Matrix, Vector3, Vector2 } from \"../Maths/math.vector\";\nimport { Color3 } from '../Maths/math.color';\nimport { Node } from \"../node\";\nimport { VertexBuffer } from \"./buffer\";\nimport { VertexData } from \"./mesh.vertexData\";\nimport { Buffer } from \"./buffer\";\nimport { Geometry } from \"./geometry\";\nimport { AbstractMesh } from \"./abstractMesh\";\nimport { SubMesh } from \"./subMesh\";\nimport { BoundingInfo } from \"../Culling/boundingInfo\";\nimport { Material } from \"../Materials/material\";\nimport { MultiMaterial } from \"../Materials/multiMaterial\";\nimport { SceneLoaderFlags } from \"../Loading/sceneLoaderFlags\";\nimport { SerializationHelper } from \"../Misc/decorators\";\nimport { Logger } from \"../Misc/logger\";\nimport { _TypeStore } from '../Misc/typeStore';\nimport { _DevTools } from '../Misc/devTools';\nimport { SceneComponentConstants } from \"../sceneComponent\";\nimport { MeshLODLevel } from './meshLODLevel';\nimport { CanvasGenerator } from '../Misc/canvasGenerator';\n/**\r\n * @hidden\r\n **/\n\nvar _CreationDataStorage = function () {\n function _CreationDataStorage() {}\n\n return _CreationDataStorage;\n}();\n\nexport { _CreationDataStorage };\n/**\r\n * @hidden\r\n **/\n\nvar _InstanceDataStorage = function () {\n function _InstanceDataStorage() {\n this.visibleInstances = {};\n this.batchCache = new _InstancesBatch();\n this.instancesBufferSize = 32 * 16 * 4; // let's start with a maximum of 32 instances\n }\n\n return _InstanceDataStorage;\n}();\n/**\r\n * @hidden\r\n **/\n\n\nvar _InstancesBatch = function () {\n function _InstancesBatch() {\n this.mustReturn = false;\n this.visibleInstances = new Array();\n this.renderSelf = new Array();\n this.hardwareInstancedRendering = new Array();\n }\n\n return _InstancesBatch;\n}();\n\nexport { _InstancesBatch };\n/**\r\n * @hidden\r\n **/\n\nvar _ThinInstanceDataStorage = function () {\n function _ThinInstanceDataStorage() {\n this.instancesCount = 0;\n this.matrixBuffer = null;\n this.matrixBufferSize = 32 * 16; // let's start with a maximum of 32 thin instances\n\n this.boundingVectors = [];\n this.worldMatrices = null;\n }\n\n return _ThinInstanceDataStorage;\n}();\n/**\r\n * @hidden\r\n **/\n\n\nvar _InternalMeshDataInfo = function () {\n function _InternalMeshDataInfo() {\n this._areNormalsFrozen = false; // Will be used by ribbons mainly\n // Will be used to save a source mesh reference, If any\n\n this._source = null; // Will be used to for fast cloned mesh lookup\n\n this.meshMap = null;\n this._preActivateId = -1;\n this._LODLevels = new Array(); // Morph\n\n this._morphTargetManager = null;\n }\n\n return _InternalMeshDataInfo;\n}();\n/**\r\n * Class used to represent renderable models\r\n */\n\n\nvar Mesh = function (_super) {\n __extends(Mesh, _super);\n /**\r\n * @constructor\r\n * @param name The value used by scene.getMeshByName() to do a lookup.\r\n * @param scene The scene to add this mesh to.\r\n * @param parent The parent of this mesh, if it has one\r\n * @param source An optional Mesh from which geometry is shared, cloned.\r\n * @param doNotCloneChildren When cloning, skip cloning child meshes of source, default False.\r\n * When false, achieved by calling a clone(), also passing False.\r\n * This will make creation of children, recursive.\r\n * @param clonePhysicsImpostor When cloning, include cloning mesh physics impostor, default True.\r\n */\n\n\n function Mesh(name, scene, parent, source, doNotCloneChildren, clonePhysicsImpostor) {\n if (scene === void 0) {\n scene = null;\n }\n\n if (parent === void 0) {\n parent = null;\n }\n\n if (source === void 0) {\n source = null;\n }\n\n if (clonePhysicsImpostor === void 0) {\n clonePhysicsImpostor = true;\n }\n\n var _this = _super.call(this, name, scene) || this; // Internal data\n\n\n _this._internalMeshDataInfo = new _InternalMeshDataInfo(); // Members\n\n /**\r\n * Gets the delay loading state of the mesh (when delay loading is turned on)\r\n * @see https://doc.babylonjs.com/how_to/using_the_incremental_loading_system\r\n */\n\n _this.delayLoadState = 0;\n /**\r\n * Gets the list of instances created from this mesh\r\n * it is not supposed to be modified manually.\r\n * Note also that the order of the InstancedMesh wihin the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_instances\r\n */\n\n _this.instances = new Array(); // Private\n\n /** @hidden */\n\n _this._creationDataStorage = null;\n /** @hidden */\n\n _this._geometry = null;\n /** @hidden */\n\n _this._instanceDataStorage = new _InstanceDataStorage();\n /** @hidden */\n\n _this._thinInstanceDataStorage = new _ThinInstanceDataStorage();\n _this._effectiveMaterial = null;\n /** @hidden */\n\n _this._shouldGenerateFlatShading = false; // Use by builder only to know what orientation were the mesh build in.\n\n /** @hidden */\n\n _this._originalBuilderSideOrientation = Mesh.DEFAULTSIDE;\n /**\r\n * Use this property to change the original side orientation defined at construction time\r\n */\n\n _this.overrideMaterialSideOrientation = null;\n scene = _this.getScene();\n\n if (source) {\n // Geometry\n if (source._geometry) {\n source._geometry.applyToMesh(_this);\n } // Deep copy\n\n\n DeepCopier.DeepCopy(source, _this, [\"name\", \"material\", \"skeleton\", \"instances\", \"parent\", \"uniqueId\", \"source\", \"metadata\", \"morphTargetManager\", \"hasInstances\", \"source\", \"worldMatrixInstancedBuffer\", \"hasLODLevels\", \"geometry\", \"isBlocked\", \"areNormalsFrozen\", \"facetNb\", \"isFacetDataEnabled\", \"lightSources\", \"useBones\", \"isAnInstance\", \"collider\", \"edgesRenderer\", \"forward\", \"up\", \"right\", \"absolutePosition\", \"absoluteScaling\", \"absoluteRotationQuaternion\", \"isWorldMatrixFrozen\", \"nonUniformScaling\", \"behaviors\", \"worldMatrixFromCache\", \"hasThinInstances\", \"cloneMeshMap\"], [\"_poseMatrix\"]); // Source mesh\n\n _this._internalMeshDataInfo._source = source;\n\n if (scene.useClonedMeshMap) {\n if (!source._internalMeshDataInfo.meshMap) {\n source._internalMeshDataInfo.meshMap = {};\n }\n\n source._internalMeshDataInfo.meshMap[_this.uniqueId] = _this;\n } // Construction Params\n // Clone parameters allowing mesh to be updated in case of parametric shapes.\n\n\n _this._originalBuilderSideOrientation = source._originalBuilderSideOrientation;\n _this._creationDataStorage = source._creationDataStorage; // Animation ranges\n\n if (source._ranges) {\n var ranges = source._ranges;\n\n for (var name in ranges) {\n if (!ranges.hasOwnProperty(name)) {\n continue;\n }\n\n if (!ranges[name]) {\n continue;\n }\n\n _this.createAnimationRange(name, ranges[name].from, ranges[name].to);\n }\n } // Metadata\n\n\n if (source.metadata && source.metadata.clone) {\n _this.metadata = source.metadata.clone();\n } else {\n _this.metadata = source.metadata;\n } // Tags\n\n\n if (Tags && Tags.HasTags(source)) {\n Tags.AddTagsTo(_this, Tags.GetTags(source, true));\n } // Enabled\n\n\n _this.setEnabled(source.isEnabled()); // Parent\n\n\n _this.parent = source.parent; // Pivot\n\n _this.setPivotMatrix(source.getPivotMatrix());\n\n _this.id = name + \".\" + source.id; // Material\n\n _this.material = source.material;\n var index;\n\n if (!doNotCloneChildren) {\n // Children\n var directDescendants = source.getDescendants(true);\n\n for (var index_1 = 0; index_1 < directDescendants.length; index_1++) {\n var child = directDescendants[index_1];\n\n if (child.clone) {\n child.clone(name + \".\" + child.name, _this);\n }\n }\n } // Morphs\n\n\n if (source.morphTargetManager) {\n _this.morphTargetManager = source.morphTargetManager;\n } // Physics clone\n\n\n if (scene.getPhysicsEngine) {\n var physicsEngine = scene.getPhysicsEngine();\n\n if (clonePhysicsImpostor && physicsEngine) {\n var impostor = physicsEngine.getImpostorForPhysicsObject(source);\n\n if (impostor) {\n _this.physicsImpostor = impostor.clone(_this);\n }\n }\n } // Particles\n\n\n for (index = 0; index < scene.particleSystems.length; index++) {\n var system = scene.particleSystems[index];\n\n if (system.emitter === source) {\n system.clone(system.name, _this);\n }\n }\n\n _this.refreshBoundingInfo();\n\n _this.computeWorldMatrix(true);\n } // Parent\n\n\n if (parent !== null) {\n _this.parent = parent;\n }\n\n _this._instanceDataStorage.hardwareInstancedRendering = _this.getEngine().getCaps().instancedArrays;\n return _this;\n }\n /**\r\n * Gets the default side orientation.\r\n * @param orientation the orientation to value to attempt to get\r\n * @returns the default orientation\r\n * @hidden\r\n */\n\n\n Mesh._GetDefaultSideOrientation = function (orientation) {\n return orientation || Mesh.FRONTSIDE; // works as Mesh.FRONTSIDE is 0\n };\n\n Object.defineProperty(Mesh.prototype, \"computeBonesUsingShaders\", {\n get: function get() {\n return this._internalAbstractMeshDataInfo._computeBonesUsingShaders;\n },\n set: function set(value) {\n if (this._internalAbstractMeshDataInfo._computeBonesUsingShaders === value) {\n return;\n }\n\n if (value && this._internalMeshDataInfo._sourcePositions) {\n // switch from software to GPU computation: we need to reset the vertex and normal buffers that have been updated by the software process\n this.setVerticesData(VertexBuffer.PositionKind, this._internalMeshDataInfo._sourcePositions.slice(), true);\n\n if (this._internalMeshDataInfo._sourceNormals) {\n this.setVerticesData(VertexBuffer.NormalKind, this._internalMeshDataInfo._sourceNormals.slice(), true);\n }\n }\n\n this._internalAbstractMeshDataInfo._computeBonesUsingShaders = value;\n\n this._markSubMeshesAsAttributesDirty();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"onBeforeRenderObservable\", {\n /**\r\n * An event triggered before rendering the mesh\r\n */\n get: function get() {\n if (!this._internalMeshDataInfo._onBeforeRenderObservable) {\n this._internalMeshDataInfo._onBeforeRenderObservable = new Observable();\n }\n\n return this._internalMeshDataInfo._onBeforeRenderObservable;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"onBeforeBindObservable\", {\n /**\r\n * An event triggered before binding the mesh\r\n */\n get: function get() {\n if (!this._internalMeshDataInfo._onBeforeBindObservable) {\n this._internalMeshDataInfo._onBeforeBindObservable = new Observable();\n }\n\n return this._internalMeshDataInfo._onBeforeBindObservable;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"onAfterRenderObservable\", {\n /**\r\n * An event triggered after rendering the mesh\r\n */\n get: function get() {\n if (!this._internalMeshDataInfo._onAfterRenderObservable) {\n this._internalMeshDataInfo._onAfterRenderObservable = new Observable();\n }\n\n return this._internalMeshDataInfo._onAfterRenderObservable;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"onBeforeDrawObservable\", {\n /**\r\n * An event triggered before drawing the mesh\r\n */\n get: function get() {\n if (!this._internalMeshDataInfo._onBeforeDrawObservable) {\n this._internalMeshDataInfo._onBeforeDrawObservable = new Observable();\n }\n\n return this._internalMeshDataInfo._onBeforeDrawObservable;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"onBeforeDraw\", {\n /**\r\n * Sets a callback to call before drawing the mesh. It is recommended to use onBeforeDrawObservable instead\r\n */\n set: function set(callback) {\n if (this._onBeforeDrawObserver) {\n this.onBeforeDrawObservable.remove(this._onBeforeDrawObserver);\n }\n\n this._onBeforeDrawObserver = this.onBeforeDrawObservable.add(callback);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"hasInstances\", {\n get: function get() {\n return this.instances.length > 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"hasThinInstances\", {\n get: function get() {\n var _a;\n\n return ((_a = this._thinInstanceDataStorage.instancesCount) !== null && _a !== void 0 ? _a : 0) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"morphTargetManager\", {\n /**\r\n * Gets or sets the morph target manager\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_morphtargets\r\n */\n get: function get() {\n return this._internalMeshDataInfo._morphTargetManager;\n },\n set: function set(value) {\n if (this._internalMeshDataInfo._morphTargetManager === value) {\n return;\n }\n\n this._internalMeshDataInfo._morphTargetManager = value;\n\n this._syncGeometryWithMorphTargetManager();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"source\", {\n /**\r\n * Gets the source mesh (the one used to clone this one from)\r\n */\n get: function get() {\n return this._internalMeshDataInfo._source;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"cloneMeshMap\", {\n /**\r\n * Gets the list of clones of this mesh\r\n * The scene must have been constructed with useClonedMeshMap=true for this to work!\r\n * Note that useClonedMeshMap=true is the default setting\r\n */\n get: function get() {\n return this._internalMeshDataInfo.meshMap;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"isUnIndexed\", {\n /**\r\n * Gets or sets a boolean indicating that this mesh does not use index buffer\r\n */\n get: function get() {\n return this._unIndexed;\n },\n set: function set(value) {\n if (this._unIndexed !== value) {\n this._unIndexed = value;\n\n this._markSubMeshesAsAttributesDirty();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"worldMatrixInstancedBuffer\", {\n /** Gets the array buffer used to store the instanced buffer used for instances' world matrices */\n get: function get() {\n return this._instanceDataStorage.instancesData;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Mesh.prototype, \"manualUpdateOfWorldMatrixInstancedBuffer\", {\n /** Gets or sets a boolean indicating that the update of the instance buffer of the world matrices is manual */\n get: function get() {\n return this._instanceDataStorage.manualUpdate;\n },\n set: function set(value) {\n this._instanceDataStorage.manualUpdate = value;\n },\n enumerable: false,\n configurable: true\n }); // Methods\n\n Mesh.prototype.instantiateHierarchy = function (newParent, options, onNewNodeCreated) {\n if (newParent === void 0) {\n newParent = null;\n }\n\n var instance = this.getTotalVertices() > 0 && (!options || !options.doNotInstantiate) ? this.createInstance(\"instance of \" + (this.name || this.id)) : this.clone(\"Clone of \" + (this.name || this.id), newParent || this.parent, true);\n\n if (instance) {\n instance.parent = newParent || this.parent;\n instance.position = this.position.clone();\n instance.scaling = this.scaling.clone();\n\n if (this.rotationQuaternion) {\n instance.rotationQuaternion = this.rotationQuaternion.clone();\n } else {\n instance.rotation = this.rotation.clone();\n }\n\n if (onNewNodeCreated) {\n onNewNodeCreated(this, instance);\n }\n }\n\n for (var _i = 0, _a = this.getChildTransformNodes(true); _i < _a.length; _i++) {\n var child = _a[_i];\n child.instantiateHierarchy(instance, options, onNewNodeCreated);\n }\n\n return instance;\n };\n /**\r\n * Gets the class name\r\n * @returns the string \"Mesh\".\r\n */\n\n\n Mesh.prototype.getClassName = function () {\n return \"Mesh\";\n };\n\n Object.defineProperty(Mesh.prototype, \"_isMesh\", {\n /** @hidden */\n get: function get() {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Returns a description of this mesh\r\n * @param fullDetails define if full details about this mesh must be used\r\n * @returns a descriptive string representing this mesh\r\n */\n\n Mesh.prototype.toString = function (fullDetails) {\n var ret = _super.prototype.toString.call(this, fullDetails);\n\n ret += \", n vertices: \" + this.getTotalVertices();\n ret += \", parent: \" + (this._waitingParentId ? this._waitingParentId : this.parent ? this.parent.name : \"NONE\");\n\n if (this.animations) {\n for (var i = 0; i < this.animations.length; i++) {\n ret += \", animation[0]: \" + this.animations[i].toString(fullDetails);\n }\n }\n\n if (fullDetails) {\n if (this._geometry) {\n var ib = this.getIndices();\n var vb = this.getVerticesData(VertexBuffer.PositionKind);\n\n if (vb && ib) {\n ret += \", flat shading: \" + (vb.length / 3 === ib.length ? \"YES\" : \"NO\");\n }\n } else {\n ret += \", flat shading: UNKNOWN\";\n }\n }\n\n return ret;\n };\n /** @hidden */\n\n\n Mesh.prototype._unBindEffect = function () {\n _super.prototype._unBindEffect.call(this);\n\n for (var _i = 0, _a = this.instances; _i < _a.length; _i++) {\n var instance = _a[_i];\n\n instance._unBindEffect();\n }\n };\n\n Object.defineProperty(Mesh.prototype, \"hasLODLevels\", {\n /**\r\n * Gets a boolean indicating if this mesh has LOD\r\n */\n get: function get() {\n return this._internalMeshDataInfo._LODLevels.length > 0;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Gets the list of MeshLODLevel associated with the current mesh\r\n * @returns an array of MeshLODLevel\r\n */\n\n Mesh.prototype.getLODLevels = function () {\n return this._internalMeshDataInfo._LODLevels;\n };\n\n Mesh.prototype._sortLODLevels = function () {\n this._internalMeshDataInfo._LODLevels.sort(function (a, b) {\n if (a.distance < b.distance) {\n return 1;\n }\n\n if (a.distance > b.distance) {\n return -1;\n }\n\n return 0;\n });\n };\n /**\r\n * Add a mesh as LOD level triggered at the given distance.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_lod\r\n * @param distance The distance from the center of the object to show this level\r\n * @param mesh The mesh to be added as LOD level (can be null)\r\n * @return This mesh (for chaining)\r\n */\n\n\n Mesh.prototype.addLODLevel = function (distance, mesh) {\n if (mesh && mesh._masterMesh) {\n Logger.Warn(\"You cannot use a mesh as LOD level twice\");\n return this;\n }\n\n var level = new MeshLODLevel(distance, mesh);\n\n this._internalMeshDataInfo._LODLevels.push(level);\n\n if (mesh) {\n mesh._masterMesh = this;\n }\n\n this._sortLODLevels();\n\n return this;\n };\n /**\r\n * Returns the LOD level mesh at the passed distance or null if not found.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_lod\r\n * @param distance The distance from the center of the object to show this level\r\n * @returns a Mesh or `null`\r\n */\n\n\n Mesh.prototype.getLODLevelAtDistance = function (distance) {\n var internalDataInfo = this._internalMeshDataInfo;\n\n for (var index = 0; index < internalDataInfo._LODLevels.length; index++) {\n var level = internalDataInfo._LODLevels[index];\n\n if (level.distance === distance) {\n return level.mesh;\n }\n }\n\n return null;\n };\n /**\r\n * Remove a mesh from the LOD array\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_lod\r\n * @param mesh defines the mesh to be removed\r\n * @return This mesh (for chaining)\r\n */\n\n\n Mesh.prototype.removeLODLevel = function (mesh) {\n var internalDataInfo = this._internalMeshDataInfo;\n\n for (var index = 0; index < internalDataInfo._LODLevels.length; index++) {\n if (internalDataInfo._LODLevels[index].mesh === mesh) {\n internalDataInfo._LODLevels.splice(index, 1);\n\n if (mesh) {\n mesh._masterMesh = null;\n }\n }\n }\n\n this._sortLODLevels();\n\n return this;\n };\n /**\r\n * Returns the registered LOD mesh distant from the parameter `camera` position if any, else returns the current mesh.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_lod\r\n * @param camera defines the camera to use to compute distance\r\n * @param boundingSphere defines a custom bounding sphere to use instead of the one from this mesh\r\n * @return This mesh (for chaining)\r\n */\n\n\n Mesh.prototype.getLOD = function (camera, boundingSphere) {\n var internalDataInfo = this._internalMeshDataInfo;\n\n if (!internalDataInfo._LODLevels || internalDataInfo._LODLevels.length === 0) {\n return this;\n }\n\n var bSphere;\n\n if (boundingSphere) {\n bSphere = boundingSphere;\n } else {\n var boundingInfo = this.getBoundingInfo();\n bSphere = boundingInfo.boundingSphere;\n }\n\n var distanceToCamera = bSphere.centerWorld.subtract(camera.globalPosition).length();\n\n if (internalDataInfo._LODLevels[internalDataInfo._LODLevels.length - 1].distance > distanceToCamera) {\n if (this.onLODLevelSelection) {\n this.onLODLevelSelection(distanceToCamera, this, this);\n }\n\n return this;\n }\n\n for (var index = 0; index < internalDataInfo._LODLevels.length; index++) {\n var level = internalDataInfo._LODLevels[index];\n\n if (level.distance < distanceToCamera) {\n if (level.mesh) {\n if (level.mesh.delayLoadState === 4) {\n level.mesh._checkDelayState();\n\n return this;\n }\n\n if (level.mesh.delayLoadState === 2) {\n return this;\n }\n\n level.mesh._preActivate();\n\n level.mesh._updateSubMeshesBoundingInfo(this.worldMatrixFromCache);\n }\n\n if (this.onLODLevelSelection) {\n this.onLODLevelSelection(distanceToCamera, this, level.mesh);\n }\n\n return level.mesh;\n }\n }\n\n if (this.onLODLevelSelection) {\n this.onLODLevelSelection(distanceToCamera, this, this);\n }\n\n return this;\n };\n\n Object.defineProperty(Mesh.prototype, \"geometry\", {\n /**\r\n * Gets the mesh internal Geometry object\r\n */\n get: function get() {\n return this._geometry;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Returns the total number of vertices within the mesh geometry or zero if the mesh has no geometry.\r\n * @returns the total number of vertices\r\n */\n\n Mesh.prototype.getTotalVertices = function () {\n if (this._geometry === null || this._geometry === undefined) {\n return 0;\n }\n\n return this._geometry.getTotalVertices();\n };\n /**\r\n * Returns the content of an associated vertex buffer\r\n * @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @param copyWhenShared defines a boolean indicating that if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one\r\n * @param forceCopy defines a boolean forcing the copy of the buffer no matter what the value of copyWhenShared is\r\n * @returns a FloatArray or null if the mesh has no geometry or no vertex buffer for this kind.\r\n */\n\n\n Mesh.prototype.getVerticesData = function (kind, copyWhenShared, forceCopy) {\n if (!this._geometry) {\n return null;\n }\n\n return this._geometry.getVerticesData(kind, copyWhenShared, forceCopy);\n };\n /**\r\n * Returns the mesh VertexBuffer object from the requested `kind`\r\n * @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.NormalKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @returns a FloatArray or null if the mesh has no vertex buffer for this kind.\r\n */\n\n\n Mesh.prototype.getVertexBuffer = function (kind) {\n if (!this._geometry) {\n return null;\n }\n\n return this._geometry.getVertexBuffer(kind);\n };\n /**\r\n * Tests if a specific vertex buffer is associated with this mesh\r\n * @param kind defines which buffer to check (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.NormalKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @returns a boolean\r\n */\n\n\n Mesh.prototype.isVerticesDataPresent = function (kind) {\n if (!this._geometry) {\n if (this._delayInfo) {\n return this._delayInfo.indexOf(kind) !== -1;\n }\n\n return false;\n }\n\n return this._geometry.isVerticesDataPresent(kind);\n };\n /**\r\n * Returns a boolean defining if the vertex data for the requested `kind` is updatable.\r\n * @param kind defines which buffer to check (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @returns a boolean\r\n */\n\n\n Mesh.prototype.isVertexBufferUpdatable = function (kind) {\n if (!this._geometry) {\n if (this._delayInfo) {\n return this._delayInfo.indexOf(kind) !== -1;\n }\n\n return false;\n }\n\n return this._geometry.isVertexBufferUpdatable(kind);\n };\n /**\r\n * Returns a string which contains the list of existing `kinds` of Vertex Data associated with this mesh.\r\n * @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.NormalKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @returns an array of strings\r\n */\n\n\n Mesh.prototype.getVerticesDataKinds = function () {\n if (!this._geometry) {\n var result = new Array();\n\n if (this._delayInfo) {\n this._delayInfo.forEach(function (kind) {\n result.push(kind);\n });\n }\n\n return result;\n }\n\n return this._geometry.getVerticesDataKinds();\n };\n /**\r\n * Returns a positive integer : the total number of indices in this mesh geometry.\r\n * @returns the numner of indices or zero if the mesh has no geometry.\r\n */\n\n\n Mesh.prototype.getTotalIndices = function () {\n if (!this._geometry) {\n return 0;\n }\n\n return this._geometry.getTotalIndices();\n };\n /**\r\n * Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.\r\n * @param copyWhenShared If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.\r\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\r\n * @returns the indices array or an empty array if the mesh has no geometry\r\n */\n\n\n Mesh.prototype.getIndices = function (copyWhenShared, forceCopy) {\n if (!this._geometry) {\n return [];\n }\n\n return this._geometry.getIndices(copyWhenShared, forceCopy);\n };\n\n Object.defineProperty(Mesh.prototype, \"isBlocked\", {\n get: function get() {\n return this._masterMesh !== null && this._masterMesh !== undefined;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Determine if the current mesh is ready to be rendered\r\n * @param completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\r\n * @param forceInstanceSupport will check if the mesh will be ready when used with instances (false by default)\r\n * @returns true if all associated assets are ready (material, textures, shaders)\r\n */\n\n Mesh.prototype.isReady = function (completeCheck, forceInstanceSupport) {\n var _a, _b, _c, _d, _e, _f;\n\n if (completeCheck === void 0) {\n completeCheck = false;\n }\n\n if (forceInstanceSupport === void 0) {\n forceInstanceSupport = false;\n }\n\n if (this.delayLoadState === 2) {\n return false;\n }\n\n if (!_super.prototype.isReady.call(this, completeCheck)) {\n return false;\n }\n\n if (!this.subMeshes || this.subMeshes.length === 0) {\n return true;\n }\n\n if (!completeCheck) {\n return true;\n }\n\n var engine = this.getEngine();\n var scene = this.getScene();\n var hardwareInstancedRendering = forceInstanceSupport || engine.getCaps().instancedArrays && (this.instances.length > 0 || this.hasThinInstances);\n this.computeWorldMatrix();\n var mat = this.material || scene.defaultMaterial;\n\n if (mat) {\n if (mat._storeEffectOnSubMeshes) {\n for (var _i = 0, _g = this.subMeshes; _i < _g.length; _i++) {\n var subMesh = _g[_i];\n var effectiveMaterial = subMesh.getMaterial();\n\n if (effectiveMaterial) {\n if (effectiveMaterial._storeEffectOnSubMeshes) {\n if (!effectiveMaterial.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {\n return false;\n }\n } else {\n if (!effectiveMaterial.isReady(this, hardwareInstancedRendering)) {\n return false;\n }\n }\n }\n }\n } else {\n if (!mat.isReady(this, hardwareInstancedRendering)) {\n return false;\n }\n }\n } // Shadows\n\n\n for (var _h = 0, _j = this.lightSources; _h < _j.length; _h++) {\n var light = _j[_h];\n var generator = light.getShadowGenerator();\n\n if (generator && (!((_a = generator.getShadowMap()) === null || _a === void 0 ? void 0 : _a.renderList) || ((_b = generator.getShadowMap()) === null || _b === void 0 ? void 0 : _b.renderList) && ((_d = (_c = generator.getShadowMap()) === null || _c === void 0 ? void 0 : _c.renderList) === null || _d === void 0 ? void 0 : _d.indexOf(this)) !== -1)) {\n for (var _k = 0, _l = this.subMeshes; _k < _l.length; _k++) {\n var subMesh = _l[_k];\n\n if (!generator.isReady(subMesh, hardwareInstancedRendering, (_f = (_e = subMesh.getMaterial()) === null || _e === void 0 ? void 0 : _e.needAlphaBlendingForMesh(this)) !== null && _f !== void 0 ? _f : false)) {\n return false;\n }\n }\n }\n } // LOD\n\n\n for (var _m = 0, _o = this._internalMeshDataInfo._LODLevels; _m < _o.length; _m++) {\n var lod = _o[_m];\n\n if (lod.mesh && !lod.mesh.isReady(hardwareInstancedRendering)) {\n return false;\n }\n }\n\n return true;\n };\n\n Object.defineProperty(Mesh.prototype, \"areNormalsFrozen\", {\n /**\r\n * Gets a boolean indicating if the normals aren't to be recomputed on next mesh `positions` array update. This property is pertinent only for updatable parametric shapes.\r\n */\n get: function get() {\n return this._internalMeshDataInfo._areNormalsFrozen;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * This function affects parametric shapes on vertex position update only : ribbons, tubes, etc. It has no effect at all on other shapes. It prevents the mesh normals from being recomputed on next `positions` array update.\r\n * @returns the current mesh\r\n */\n\n Mesh.prototype.freezeNormals = function () {\n this._internalMeshDataInfo._areNormalsFrozen = true;\n return this;\n };\n /**\r\n * This function affects parametric shapes on vertex position update only : ribbons, tubes, etc. It has no effect at all on other shapes. It reactivates the mesh normals computation if it was previously frozen\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.unfreezeNormals = function () {\n this._internalMeshDataInfo._areNormalsFrozen = false;\n return this;\n };\n\n Object.defineProperty(Mesh.prototype, \"overridenInstanceCount\", {\n /**\r\n * Sets a value overriding the instance count. Only applicable when custom instanced InterleavedVertexBuffer are used rather than InstancedMeshs\r\n */\n set: function set(count) {\n this._instanceDataStorage.overridenInstanceCount = count;\n },\n enumerable: false,\n configurable: true\n }); // Methods\n\n /** @hidden */\n\n Mesh.prototype._preActivate = function () {\n var internalDataInfo = this._internalMeshDataInfo;\n var sceneRenderId = this.getScene().getRenderId();\n\n if (internalDataInfo._preActivateId === sceneRenderId) {\n return this;\n }\n\n internalDataInfo._preActivateId = sceneRenderId;\n this._instanceDataStorage.visibleInstances = null;\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._preActivateForIntermediateRendering = function (renderId) {\n if (this._instanceDataStorage.visibleInstances) {\n this._instanceDataStorage.visibleInstances.intermediateDefaultRenderId = renderId;\n }\n\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._registerInstanceForRenderId = function (instance, renderId) {\n if (!this._instanceDataStorage.visibleInstances) {\n this._instanceDataStorage.visibleInstances = {\n defaultRenderId: renderId,\n selfDefaultRenderId: this._renderId\n };\n }\n\n if (!this._instanceDataStorage.visibleInstances[renderId]) {\n if (this._instanceDataStorage.previousRenderId !== undefined && this._instanceDataStorage.isFrozen) {\n this._instanceDataStorage.visibleInstances[this._instanceDataStorage.previousRenderId] = null;\n }\n\n this._instanceDataStorage.previousRenderId = renderId;\n this._instanceDataStorage.visibleInstances[renderId] = new Array();\n }\n\n this._instanceDataStorage.visibleInstances[renderId].push(instance);\n\n return this;\n };\n\n Mesh.prototype._afterComputeWorldMatrix = function () {\n _super.prototype._afterComputeWorldMatrix.call(this);\n\n if (!this.hasThinInstances) {\n return;\n }\n\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n };\n /** @hidden */\n\n\n Mesh.prototype._postActivate = function () {\n if (this.edgesShareWithInstances && this.edgesRenderer && this.edgesRenderer.isEnabled && this._renderingGroup) {\n this._renderingGroup._edgesRenderers.pushNoDuplicate(this.edgesRenderer);\n\n this.edgesRenderer.customInstances.push(this.getWorldMatrix());\n }\n };\n /**\r\n * This method recomputes and sets a new BoundingInfo to the mesh unless it is locked.\r\n * This means the mesh underlying bounding box and sphere are recomputed.\r\n * @param applySkeleton defines whether to apply the skeleton before computing the bounding info\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.refreshBoundingInfo = function (applySkeleton) {\n if (applySkeleton === void 0) {\n applySkeleton = false;\n }\n\n if (this._boundingInfo && this._boundingInfo.isLocked) {\n return this;\n }\n\n var bias = this.geometry ? this.geometry.boundingBias : null;\n\n this._refreshBoundingInfo(this._getPositionData(applySkeleton), bias);\n\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._createGlobalSubMesh = function (force) {\n var totalVertices = this.getTotalVertices();\n\n if (!totalVertices || !this.getIndices()) {\n return null;\n } // Check if we need to recreate the submeshes\n\n\n if (this.subMeshes && this.subMeshes.length > 0) {\n var ib = this.getIndices();\n\n if (!ib) {\n return null;\n }\n\n var totalIndices = ib.length;\n var needToRecreate = false;\n\n if (force) {\n needToRecreate = true;\n } else {\n for (var _i = 0, _a = this.subMeshes; _i < _a.length; _i++) {\n var submesh = _a[_i];\n\n if (submesh.indexStart + submesh.indexCount > totalIndices) {\n needToRecreate = true;\n break;\n }\n\n if (submesh.verticesStart + submesh.verticesCount > totalVertices) {\n needToRecreate = true;\n break;\n }\n }\n }\n\n if (!needToRecreate) {\n return this.subMeshes[0];\n }\n }\n\n this.releaseSubMeshes();\n return new SubMesh(0, 0, totalVertices, 0, this.getTotalIndices(), this);\n };\n /**\r\n * This function will subdivide the mesh into multiple submeshes\r\n * @param count defines the expected number of submeshes\r\n */\n\n\n Mesh.prototype.subdivide = function (count) {\n if (count < 1) {\n return;\n }\n\n var totalIndices = this.getTotalIndices();\n var subdivisionSize = totalIndices / count | 0;\n var offset = 0; // Ensure that subdivisionSize is a multiple of 3\n\n while (subdivisionSize % 3 !== 0) {\n subdivisionSize++;\n }\n\n this.releaseSubMeshes();\n\n for (var index = 0; index < count; index++) {\n if (offset >= totalIndices) {\n break;\n }\n\n SubMesh.CreateFromIndices(0, offset, index === count - 1 ? totalIndices - offset : subdivisionSize, this);\n offset += subdivisionSize;\n }\n\n this.synchronizeInstances();\n };\n /**\r\n * Copy a FloatArray into a specific associated vertex buffer\r\n * @param kind defines which buffer to write to (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @param data defines the data source\r\n * @param updatable defines if the updated vertex buffer must be flagged as updatable\r\n * @param stride defines the data stride size (can be null)\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.setVerticesData = function (kind, data, updatable, stride) {\n if (updatable === void 0) {\n updatable = false;\n }\n\n if (!this._geometry) {\n var vertexData = new VertexData();\n vertexData.set(data, kind);\n var scene = this.getScene();\n new Geometry(Geometry.RandomId(), scene, vertexData, updatable, this);\n } else {\n this._geometry.setVerticesData(kind, data, updatable, stride);\n }\n\n return this;\n };\n /**\r\n * Delete a vertex buffer associated with this mesh\r\n * @param kind defines which buffer to delete (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n */\n\n\n Mesh.prototype.removeVerticesData = function (kind) {\n if (!this._geometry) {\n return;\n }\n\n this._geometry.removeVerticesData(kind);\n };\n /**\r\n * Flags an associated vertex buffer as updatable\r\n * @param kind defines which buffer to use (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @param updatable defines if the updated vertex buffer must be flagged as updatable\r\n */\n\n\n Mesh.prototype.markVerticesDataAsUpdatable = function (kind, updatable) {\n if (updatable === void 0) {\n updatable = true;\n }\n\n var vb = this.getVertexBuffer(kind);\n\n if (!vb || vb.isUpdatable() === updatable) {\n return;\n }\n\n this.setVerticesData(kind, this.getVerticesData(kind), updatable);\n };\n /**\r\n * Sets the mesh global Vertex Buffer\r\n * @param buffer defines the buffer to use\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.setVerticesBuffer = function (buffer) {\n if (!this._geometry) {\n this._geometry = Geometry.CreateGeometryForMesh(this);\n }\n\n this._geometry.setVerticesBuffer(buffer);\n\n return this;\n };\n /**\r\n * Update a specific associated vertex buffer\r\n * @param kind defines which buffer to write to (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @param data defines the data source\r\n * @param updateExtends defines if extends info of the mesh must be updated (can be null). This is mostly useful for \"position\" kind\r\n * @param makeItUnique defines if the geometry associated with the mesh must be cloned to make the change only for this mesh (and not all meshes associated with the same geometry)\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.updateVerticesData = function (kind, data, updateExtends, makeItUnique) {\n if (!this._geometry) {\n return this;\n }\n\n if (!makeItUnique) {\n this._geometry.updateVerticesData(kind, data, updateExtends);\n } else {\n this.makeGeometryUnique();\n this.updateVerticesData(kind, data, updateExtends, false);\n }\n\n return this;\n };\n /**\r\n * This method updates the vertex positions of an updatable mesh according to the `positionFunction` returned values.\r\n * @see https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#other-shapes-updatemeshpositions\r\n * @param positionFunction is a simple JS function what is passed the mesh `positions` array. It doesn't need to return anything\r\n * @param computeNormals is a boolean (default true) to enable/disable the mesh normal recomputation after the vertex position update\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.updateMeshPositions = function (positionFunction, computeNormals) {\n if (computeNormals === void 0) {\n computeNormals = true;\n }\n\n var positions = this.getVerticesData(VertexBuffer.PositionKind);\n\n if (!positions) {\n return this;\n }\n\n positionFunction(positions);\n this.updateVerticesData(VertexBuffer.PositionKind, positions, false, false);\n\n if (computeNormals) {\n var indices = this.getIndices();\n var normals = this.getVerticesData(VertexBuffer.NormalKind);\n\n if (!normals) {\n return this;\n }\n\n VertexData.ComputeNormals(positions, indices, normals);\n this.updateVerticesData(VertexBuffer.NormalKind, normals, false, false);\n }\n\n return this;\n };\n /**\r\n * Creates a un-shared specific occurence of the geometry for the mesh.\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.makeGeometryUnique = function () {\n if (!this._geometry) {\n return this;\n }\n\n if (this._geometry.meshes.length === 1) {\n return this;\n }\n\n var oldGeometry = this._geometry;\n\n var geometry = this._geometry.copy(Geometry.RandomId());\n\n oldGeometry.releaseForMesh(this, true);\n geometry.applyToMesh(this);\n return this;\n };\n /**\r\n * Set the index buffer of this mesh\r\n * @param indices defines the source data\r\n * @param totalVertices defines the total number of vertices referenced by this index data (can be null)\r\n * @param updatable defines if the updated index buffer must be flagged as updatable (default is false)\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.setIndices = function (indices, totalVertices, updatable) {\n if (totalVertices === void 0) {\n totalVertices = null;\n }\n\n if (updatable === void 0) {\n updatable = false;\n }\n\n if (!this._geometry) {\n var vertexData = new VertexData();\n vertexData.indices = indices;\n var scene = this.getScene();\n new Geometry(Geometry.RandomId(), scene, vertexData, updatable, this);\n } else {\n this._geometry.setIndices(indices, totalVertices, updatable);\n }\n\n return this;\n };\n /**\r\n * Update the current index buffer\r\n * @param indices defines the source data\r\n * @param offset defines the offset in the index buffer where to store the new data (can be null)\r\n * @param gpuMemoryOnly defines a boolean indicating that only the GPU memory must be updated leaving the CPU version of the indices unchanged (false by default)\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.updateIndices = function (indices, offset, gpuMemoryOnly) {\n if (gpuMemoryOnly === void 0) {\n gpuMemoryOnly = false;\n }\n\n if (!this._geometry) {\n return this;\n }\n\n this._geometry.updateIndices(indices, offset, gpuMemoryOnly);\n\n return this;\n };\n /**\r\n * Invert the geometry to move from a right handed system to a left handed one.\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.toLeftHanded = function () {\n if (!this._geometry) {\n return this;\n }\n\n this._geometry.toLeftHanded();\n\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._bind = function (subMesh, effect, fillMode) {\n if (!this._geometry) {\n return this;\n }\n\n var engine = this.getScene().getEngine(); // Wireframe\n\n var indexToBind;\n\n if (this._unIndexed) {\n indexToBind = null;\n } else {\n switch (fillMode) {\n case Material.PointFillMode:\n indexToBind = null;\n break;\n\n case Material.WireFrameFillMode:\n indexToBind = subMesh._getLinesIndexBuffer(this.getIndices(), engine);\n break;\n\n default:\n case Material.TriangleFillMode:\n indexToBind = this._geometry.getIndexBuffer();\n break;\n }\n } // VBOs\n\n\n this._geometry._bind(effect, indexToBind);\n\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._draw = function (subMesh, fillMode, instancesCount) {\n if (!this._geometry || !this._geometry.getVertexBuffers() || !this._unIndexed && !this._geometry.getIndexBuffer()) {\n return this;\n }\n\n if (this._internalMeshDataInfo._onBeforeDrawObservable) {\n this._internalMeshDataInfo._onBeforeDrawObservable.notifyObservers(this);\n }\n\n var scene = this.getScene();\n var engine = scene.getEngine();\n\n if (this._unIndexed || fillMode == Material.PointFillMode) {\n // or triangles as points\n engine.drawArraysType(fillMode, subMesh.verticesStart, subMesh.verticesCount, instancesCount);\n } else if (fillMode == Material.WireFrameFillMode) {\n // Triangles as wireframe\n engine.drawElementsType(fillMode, 0, subMesh._linesIndexCount, instancesCount);\n } else {\n engine.drawElementsType(fillMode, subMesh.indexStart, subMesh.indexCount, instancesCount);\n }\n\n return this;\n };\n /**\r\n * Registers for this mesh a javascript function called just before the rendering process\r\n * @param func defines the function to call before rendering this mesh\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.registerBeforeRender = function (func) {\n this.onBeforeRenderObservable.add(func);\n return this;\n };\n /**\r\n * Disposes a previously registered javascript function called before the rendering\r\n * @param func defines the function to remove\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.unregisterBeforeRender = function (func) {\n this.onBeforeRenderObservable.removeCallback(func);\n return this;\n };\n /**\r\n * Registers for this mesh a javascript function called just after the rendering is complete\r\n * @param func defines the function to call after rendering this mesh\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.registerAfterRender = function (func) {\n this.onAfterRenderObservable.add(func);\n return this;\n };\n /**\r\n * Disposes a previously registered javascript function called after the rendering.\r\n * @param func defines the function to remove\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.unregisterAfterRender = function (func) {\n this.onAfterRenderObservable.removeCallback(func);\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._getInstancesRenderList = function (subMeshId, isReplacementMode) {\n if (isReplacementMode === void 0) {\n isReplacementMode = false;\n }\n\n if (this._instanceDataStorage.isFrozen && this._instanceDataStorage.previousBatch) {\n return this._instanceDataStorage.previousBatch;\n }\n\n var scene = this.getScene();\n\n var isInIntermediateRendering = scene._isInIntermediateRendering();\n\n var onlyForInstances = isInIntermediateRendering ? this._internalAbstractMeshDataInfo._onlyForInstancesIntermediate : this._internalAbstractMeshDataInfo._onlyForInstances;\n var batchCache = this._instanceDataStorage.batchCache;\n batchCache.mustReturn = false;\n batchCache.renderSelf[subMeshId] = isReplacementMode || !onlyForInstances && this.isEnabled() && this.isVisible;\n batchCache.visibleInstances[subMeshId] = null;\n\n if (this._instanceDataStorage.visibleInstances && !isReplacementMode) {\n var visibleInstances = this._instanceDataStorage.visibleInstances;\n var currentRenderId = scene.getRenderId();\n var defaultRenderId = isInIntermediateRendering ? visibleInstances.intermediateDefaultRenderId : visibleInstances.defaultRenderId;\n batchCache.visibleInstances[subMeshId] = visibleInstances[currentRenderId];\n\n if (!batchCache.visibleInstances[subMeshId] && defaultRenderId) {\n batchCache.visibleInstances[subMeshId] = visibleInstances[defaultRenderId];\n }\n }\n\n batchCache.hardwareInstancedRendering[subMeshId] = !isReplacementMode && this._instanceDataStorage.hardwareInstancedRendering && batchCache.visibleInstances[subMeshId] !== null && batchCache.visibleInstances[subMeshId] !== undefined;\n this._instanceDataStorage.previousBatch = batchCache;\n return batchCache;\n };\n /** @hidden */\n\n\n Mesh.prototype._renderWithInstances = function (subMesh, fillMode, batch, effect, engine) {\n var visibleInstances = batch.visibleInstances[subMesh._id];\n\n if (!visibleInstances) {\n return this;\n }\n\n var instanceStorage = this._instanceDataStorage;\n var currentInstancesBufferSize = instanceStorage.instancesBufferSize;\n var instancesBuffer = instanceStorage.instancesBuffer;\n var matricesCount = visibleInstances.length + 1;\n var bufferSize = matricesCount * 16 * 4;\n\n while (instanceStorage.instancesBufferSize < bufferSize) {\n instanceStorage.instancesBufferSize *= 2;\n }\n\n if (!instanceStorage.instancesData || currentInstancesBufferSize != instanceStorage.instancesBufferSize) {\n instanceStorage.instancesData = new Float32Array(instanceStorage.instancesBufferSize / 4);\n }\n\n var offset = 0;\n var instancesCount = 0;\n var renderSelf = batch.renderSelf[subMesh._id];\n var needUpdateBuffer = !instancesBuffer || currentInstancesBufferSize !== instanceStorage.instancesBufferSize;\n\n if (!this._instanceDataStorage.manualUpdate && (!instanceStorage.isFrozen || needUpdateBuffer)) {\n var world = this._effectiveMesh.getWorldMatrix();\n\n if (renderSelf) {\n world.copyToArray(instanceStorage.instancesData, offset);\n offset += 16;\n instancesCount++;\n }\n\n if (visibleInstances) {\n for (var instanceIndex = 0; instanceIndex < visibleInstances.length; instanceIndex++) {\n var instance = visibleInstances[instanceIndex];\n instance.getWorldMatrix().copyToArray(instanceStorage.instancesData, offset);\n offset += 16;\n instancesCount++;\n }\n }\n } else {\n instancesCount = (renderSelf ? 1 : 0) + visibleInstances.length;\n }\n\n if (needUpdateBuffer) {\n if (instancesBuffer) {\n instancesBuffer.dispose();\n }\n\n instancesBuffer = new Buffer(engine, instanceStorage.instancesData, true, 16, false, true);\n instanceStorage.instancesBuffer = instancesBuffer;\n this.setVerticesBuffer(instancesBuffer.createVertexBuffer(\"world0\", 0, 4));\n this.setVerticesBuffer(instancesBuffer.createVertexBuffer(\"world1\", 4, 4));\n this.setVerticesBuffer(instancesBuffer.createVertexBuffer(\"world2\", 8, 4));\n this.setVerticesBuffer(instancesBuffer.createVertexBuffer(\"world3\", 12, 4));\n } else {\n if (!this._instanceDataStorage.isFrozen) {\n instancesBuffer.updateDirectly(instanceStorage.instancesData, 0, instancesCount);\n }\n }\n\n this._processInstancedBuffers(visibleInstances, renderSelf); // Stats\n\n\n this.getScene()._activeIndices.addCount(subMesh.indexCount * instancesCount, false); // Draw\n\n\n this._bind(subMesh, effect, fillMode);\n\n this._draw(subMesh, fillMode, instancesCount);\n\n engine.unbindInstanceAttributes();\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._renderWithThinInstances = function (subMesh, fillMode, effect, engine) {\n var _a, _b; // Stats\n\n\n var instancesCount = (_b = (_a = this._thinInstanceDataStorage) === null || _a === void 0 ? void 0 : _a.instancesCount) !== null && _b !== void 0 ? _b : 0;\n\n this.getScene()._activeIndices.addCount(subMesh.indexCount * instancesCount, false); // Draw\n\n\n this._bind(subMesh, effect, fillMode);\n\n this._draw(subMesh, fillMode, instancesCount);\n\n engine.unbindInstanceAttributes();\n };\n /** @hidden */\n\n\n Mesh.prototype._processInstancedBuffers = function (visibleInstances, renderSelf) {// Do nothing\n };\n /** @hidden */\n\n\n Mesh.prototype._processRendering = function (renderingMesh, subMesh, effect, fillMode, batch, hardwareInstancedRendering, onBeforeDraw, effectiveMaterial) {\n var scene = this.getScene();\n var engine = scene.getEngine();\n\n if (hardwareInstancedRendering && subMesh.getRenderingMesh().hasThinInstances) {\n this._renderWithThinInstances(subMesh, fillMode, effect, engine);\n\n return this;\n }\n\n if (hardwareInstancedRendering) {\n this._renderWithInstances(subMesh, fillMode, batch, effect, engine);\n } else {\n var instanceCount = 0;\n\n if (batch.renderSelf[subMesh._id]) {\n // Draw\n if (onBeforeDraw) {\n onBeforeDraw(false, renderingMesh._effectiveMesh.getWorldMatrix(), effectiveMaterial);\n }\n\n instanceCount++;\n\n this._draw(subMesh, fillMode, this._instanceDataStorage.overridenInstanceCount);\n }\n\n var visibleInstancesForSubMesh = batch.visibleInstances[subMesh._id];\n\n if (visibleInstancesForSubMesh) {\n var visibleInstanceCount = visibleInstancesForSubMesh.length;\n instanceCount += visibleInstanceCount; // Stats\n\n for (var instanceIndex = 0; instanceIndex < visibleInstanceCount; instanceIndex++) {\n var instance = visibleInstancesForSubMesh[instanceIndex]; // World\n\n var world = instance.getWorldMatrix();\n\n if (onBeforeDraw) {\n onBeforeDraw(true, world, effectiveMaterial);\n } // Draw\n\n\n this._draw(subMesh, fillMode);\n }\n } // Stats\n\n\n scene._activeIndices.addCount(subMesh.indexCount * instanceCount, false);\n }\n\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._rebuild = function () {\n if (this._instanceDataStorage.instancesBuffer) {\n // Dispose instance buffer to be recreated in _renderWithInstances when rendered\n this._instanceDataStorage.instancesBuffer.dispose();\n\n this._instanceDataStorage.instancesBuffer = null;\n }\n\n _super.prototype._rebuild.call(this);\n };\n /** @hidden */\n\n\n Mesh.prototype._freeze = function () {\n if (!this.subMeshes) {\n return;\n } // Prepare batches\n\n\n for (var index = 0; index < this.subMeshes.length; index++) {\n this._getInstancesRenderList(index);\n }\n\n this._effectiveMaterial = null;\n this._instanceDataStorage.isFrozen = true;\n };\n /** @hidden */\n\n\n Mesh.prototype._unFreeze = function () {\n this._instanceDataStorage.isFrozen = false;\n this._instanceDataStorage.previousBatch = null;\n };\n /**\r\n * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager\r\n * @param subMesh defines the subMesh to render\r\n * @param enableAlphaMode defines if alpha mode can be changed\r\n * @param effectiveMeshReplacement defines an optional mesh used to provide info for the rendering\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.render = function (subMesh, enableAlphaMode, effectiveMeshReplacement) {\n var scene = this.getScene();\n\n if (this._internalAbstractMeshDataInfo._isActiveIntermediate) {\n this._internalAbstractMeshDataInfo._isActiveIntermediate = false;\n } else {\n this._internalAbstractMeshDataInfo._isActive = false;\n }\n\n if (this._checkOcclusionQuery()) {\n return this;\n } // Managing instances\n\n\n var batch = this._getInstancesRenderList(subMesh._id, !!effectiveMeshReplacement);\n\n if (batch.mustReturn) {\n return this;\n } // Checking geometry state\n\n\n if (!this._geometry || !this._geometry.getVertexBuffers() || !this._unIndexed && !this._geometry.getIndexBuffer()) {\n return this;\n }\n\n if (this._internalMeshDataInfo._onBeforeRenderObservable) {\n this._internalMeshDataInfo._onBeforeRenderObservable.notifyObservers(this);\n }\n\n var engine = scene.getEngine();\n var hardwareInstancedRendering = batch.hardwareInstancedRendering[subMesh._id] || subMesh.getRenderingMesh().hasThinInstances;\n var instanceDataStorage = this._instanceDataStorage;\n var material = subMesh.getMaterial();\n\n if (!material) {\n return this;\n } // Material\n\n\n if (!instanceDataStorage.isFrozen || !this._effectiveMaterial || this._effectiveMaterial !== material) {\n if (material._storeEffectOnSubMeshes) {\n if (!material.isReadyForSubMesh(this, subMesh, hardwareInstancedRendering)) {\n return this;\n }\n } else if (!material.isReady(this, hardwareInstancedRendering)) {\n return this;\n }\n\n this._effectiveMaterial = material;\n } // Alpha mode\n\n\n if (enableAlphaMode) {\n engine.setAlphaMode(this._effectiveMaterial.alphaMode);\n }\n\n var effect;\n\n if (this._effectiveMaterial._storeEffectOnSubMeshes) {\n effect = subMesh.effect;\n } else {\n effect = this._effectiveMaterial.getEffect();\n }\n\n for (var _i = 0, _a = scene._beforeRenderingMeshStage; _i < _a.length; _i++) {\n var step = _a[_i];\n step.action(this, subMesh, batch, effect);\n }\n\n if (!effect) {\n return this;\n }\n\n var effectiveMesh = effectiveMeshReplacement || this._effectiveMesh;\n var sideOrientation;\n\n if (!instanceDataStorage.isFrozen && (this._effectiveMaterial.backFaceCulling || this.overrideMaterialSideOrientation !== null)) {\n var mainDeterminant = effectiveMesh._getWorldMatrixDeterminant();\n\n sideOrientation = this.overrideMaterialSideOrientation;\n\n if (sideOrientation == null) {\n sideOrientation = this._effectiveMaterial.sideOrientation;\n }\n\n if (mainDeterminant < 0) {\n sideOrientation = sideOrientation === Material.ClockWiseSideOrientation ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;\n }\n\n instanceDataStorage.sideOrientation = sideOrientation;\n } else {\n sideOrientation = instanceDataStorage.sideOrientation;\n }\n\n var reverse = this._effectiveMaterial._preBind(effect, sideOrientation);\n\n if (this._effectiveMaterial.forceDepthWrite) {\n engine.setDepthWrite(true);\n } // Bind\n\n\n var fillMode = scene.forcePointsCloud ? Material.PointFillMode : scene.forceWireframe ? Material.WireFrameFillMode : this._effectiveMaterial.fillMode;\n\n if (this._internalMeshDataInfo._onBeforeBindObservable) {\n this._internalMeshDataInfo._onBeforeBindObservable.notifyObservers(this);\n }\n\n if (!hardwareInstancedRendering) {\n // Binding will be done later because we need to add more info to the VB\n this._bind(subMesh, effect, fillMode);\n }\n\n var world = effectiveMesh.getWorldMatrix();\n\n if (this._effectiveMaterial._storeEffectOnSubMeshes) {\n this._effectiveMaterial.bindForSubMesh(world, this, subMesh);\n } else {\n this._effectiveMaterial.bind(world, this);\n }\n\n if (!this._effectiveMaterial.backFaceCulling && this._effectiveMaterial.separateCullingPass) {\n engine.setState(true, this._effectiveMaterial.zOffset, false, !reverse);\n\n this._processRendering(this, subMesh, effect, fillMode, batch, hardwareInstancedRendering, this._onBeforeDraw, this._effectiveMaterial);\n\n engine.setState(true, this._effectiveMaterial.zOffset, false, reverse);\n } // Draw\n\n\n this._processRendering(this, subMesh, effect, fillMode, batch, hardwareInstancedRendering, this._onBeforeDraw, this._effectiveMaterial); // Unbind\n\n\n this._effectiveMaterial.unbind();\n\n for (var _b = 0, _c = scene._afterRenderingMeshStage; _b < _c.length; _b++) {\n var step = _c[_b];\n step.action(this, subMesh, batch, effect);\n }\n\n if (this._internalMeshDataInfo._onAfterRenderObservable) {\n this._internalMeshDataInfo._onAfterRenderObservable.notifyObservers(this);\n }\n\n return this;\n };\n\n Mesh.prototype._onBeforeDraw = function (isInstance, world, effectiveMaterial) {\n if (isInstance && effectiveMaterial) {\n effectiveMaterial.bindOnlyWorldMatrix(world);\n }\n };\n /**\r\n * Renormalize the mesh and patch it up if there are no weights\r\n * Similar to normalization by adding the weights compute the reciprocal and multiply all elements, this wil ensure that everything adds to 1.\r\n * However in the case of zero weights then we set just a single influence to 1.\r\n * We check in the function for extra's present and if so we use the normalizeSkinWeightsWithExtras rather than the FourWeights version.\r\n */\n\n\n Mesh.prototype.cleanMatrixWeights = function () {\n if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\n if (this.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) {\n this.normalizeSkinWeightsAndExtra();\n } else {\n this.normalizeSkinFourWeights();\n }\n }\n }; // faster 4 weight version.\n\n\n Mesh.prototype.normalizeSkinFourWeights = function () {\n var matricesWeights = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n var numWeights = matricesWeights.length;\n\n for (var a = 0; a < numWeights; a += 4) {\n // accumulate weights\n var t = matricesWeights[a] + matricesWeights[a + 1] + matricesWeights[a + 2] + matricesWeights[a + 3]; // check for invalid weight and just set it to 1.\n\n if (t === 0) {\n matricesWeights[a] = 1;\n } else {\n // renormalize so everything adds to 1 use reciprical\n var recip = 1 / t;\n matricesWeights[a] *= recip;\n matricesWeights[a + 1] *= recip;\n matricesWeights[a + 2] *= recip;\n matricesWeights[a + 3] *= recip;\n }\n }\n\n this.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeights);\n }; // handle special case of extra verts. (in theory gltf can handle 12 influences)\n\n\n Mesh.prototype.normalizeSkinWeightsAndExtra = function () {\n var matricesWeightsExtra = this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind);\n var matricesWeights = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n var numWeights = matricesWeights.length;\n\n for (var a = 0; a < numWeights; a += 4) {\n // accumulate weights\n var t = matricesWeights[a] + matricesWeights[a + 1] + matricesWeights[a + 2] + matricesWeights[a + 3];\n t += matricesWeightsExtra[a] + matricesWeightsExtra[a + 1] + matricesWeightsExtra[a + 2] + matricesWeightsExtra[a + 3]; // check for invalid weight and just set it to 1.\n\n if (t === 0) {\n matricesWeights[a] = 1;\n } else {\n // renormalize so everything adds to 1 use reciprical\n var recip = 1 / t;\n matricesWeights[a] *= recip;\n matricesWeights[a + 1] *= recip;\n matricesWeights[a + 2] *= recip;\n matricesWeights[a + 3] *= recip; // same goes for extras\n\n matricesWeightsExtra[a] *= recip;\n matricesWeightsExtra[a + 1] *= recip;\n matricesWeightsExtra[a + 2] *= recip;\n matricesWeightsExtra[a + 3] *= recip;\n }\n }\n\n this.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeights);\n this.setVerticesData(VertexBuffer.MatricesWeightsKind, matricesWeightsExtra);\n };\n /**\r\n * ValidateSkinning is used to determine that a mesh has valid skinning data along with skin metrics, if missing weights,\r\n * or not normalized it is returned as invalid mesh the string can be used for console logs, or on screen messages to let\r\n * the user know there was an issue with importing the mesh\r\n * @returns a validation object with skinned, valid and report string\r\n */\n\n\n Mesh.prototype.validateSkinning = function () {\n var matricesWeightsExtra = this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind);\n var matricesWeights = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n\n if (matricesWeights === null || this.skeleton == null) {\n return {\n skinned: false,\n valid: true,\n report: \"not skinned\"\n };\n }\n\n var numWeights = matricesWeights.length;\n var numberNotSorted = 0;\n var missingWeights = 0;\n var maxUsedWeights = 0;\n var numberNotNormalized = 0;\n var numInfluences = matricesWeightsExtra === null ? 4 : 8;\n var usedWeightCounts = new Array();\n\n for (var a = 0; a <= numInfluences; a++) {\n usedWeightCounts[a] = 0;\n }\n\n var toleranceEpsilon = 0.001;\n\n for (var a = 0; a < numWeights; a += 4) {\n var lastWeight = matricesWeights[a];\n var t = lastWeight;\n var usedWeights = t === 0 ? 0 : 1;\n\n for (var b = 1; b < numInfluences; b++) {\n var d = b < 4 ? matricesWeights[a + b] : matricesWeightsExtra[a + b - 4];\n\n if (d > lastWeight) {\n numberNotSorted++;\n }\n\n if (d !== 0) {\n usedWeights++;\n }\n\n t += d;\n lastWeight = d;\n } // count the buffer weights usage\n\n\n usedWeightCounts[usedWeights]++; // max influences\n\n if (usedWeights > maxUsedWeights) {\n maxUsedWeights = usedWeights;\n } // check for invalid weight and just set it to 1.\n\n\n if (t === 0) {\n missingWeights++;\n } else {\n // renormalize so everything adds to 1 use reciprical\n var recip = 1 / t;\n var tolerance = 0;\n\n for (b = 0; b < numInfluences; b++) {\n if (b < 4) {\n tolerance += Math.abs(matricesWeights[a + b] - matricesWeights[a + b] * recip);\n } else {\n tolerance += Math.abs(matricesWeightsExtra[a + b - 4] - matricesWeightsExtra[a + b - 4] * recip);\n }\n } // arbitary epsilon value for dicdating not normalized\n\n\n if (tolerance > toleranceEpsilon) {\n numberNotNormalized++;\n }\n }\n } // validate bone indices are in range of the skeleton\n\n\n var numBones = this.skeleton.bones.length;\n var matricesIndices = this.getVerticesData(VertexBuffer.MatricesIndicesKind);\n var matricesIndicesExtra = this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind);\n var numBadBoneIndices = 0;\n\n for (var a = 0; a < numWeights; a += 4) {\n for (var b = 0; b < numInfluences; b++) {\n var index = b < 4 ? matricesIndices[a + b] : matricesIndicesExtra[a + b - 4];\n\n if (index >= numBones || index < 0) {\n numBadBoneIndices++;\n }\n }\n } // log mesh stats\n\n\n var output = \"Number of Weights = \" + numWeights / 4 + \"\\nMaximum influences = \" + maxUsedWeights + \"\\nMissing Weights = \" + missingWeights + \"\\nNot Sorted = \" + numberNotSorted + \"\\nNot Normalized = \" + numberNotNormalized + \"\\nWeightCounts = [\" + usedWeightCounts + \"]\" + \"\\nNumber of bones = \" + numBones + \"\\nBad Bone Indices = \" + numBadBoneIndices;\n return {\n skinned: true,\n valid: missingWeights === 0 && numberNotNormalized === 0 && numBadBoneIndices === 0,\n report: output\n };\n };\n /** @hidden */\n\n\n Mesh.prototype._checkDelayState = function () {\n var scene = this.getScene();\n\n if (this._geometry) {\n this._geometry.load(scene);\n } else if (this.delayLoadState === 4) {\n this.delayLoadState = 2;\n\n this._queueLoad(scene);\n }\n\n return this;\n };\n\n Mesh.prototype._queueLoad = function (scene) {\n var _this = this;\n\n scene._addPendingData(this);\n\n var getBinaryData = this.delayLoadingFile.indexOf(\".babylonbinarymeshdata\") !== -1;\n Tools.LoadFile(this.delayLoadingFile, function (data) {\n if (data instanceof ArrayBuffer) {\n _this._delayLoadingFunction(data, _this);\n } else {\n _this._delayLoadingFunction(JSON.parse(data), _this);\n }\n\n _this.instances.forEach(function (instance) {\n instance.refreshBoundingInfo();\n\n instance._syncSubMeshes();\n });\n\n _this.delayLoadState = 1;\n\n scene._removePendingData(_this);\n }, function () {}, scene.offlineProvider, getBinaryData);\n return this;\n };\n /**\r\n * Returns `true` if the mesh is within the frustum defined by the passed array of planes.\r\n * A mesh is in the frustum if its bounding box intersects the frustum\r\n * @param frustumPlanes defines the frustum to test\r\n * @returns true if the mesh is in the frustum planes\r\n */\n\n\n Mesh.prototype.isInFrustum = function (frustumPlanes) {\n if (this.delayLoadState === 2) {\n return false;\n }\n\n if (!_super.prototype.isInFrustum.call(this, frustumPlanes)) {\n return false;\n }\n\n this._checkDelayState();\n\n return true;\n };\n /**\r\n * Sets the mesh material by the material or multiMaterial `id` property\r\n * @param id is a string identifying the material or the multiMaterial\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.setMaterialByID = function (id) {\n var materials = this.getScene().materials;\n var index;\n\n for (index = materials.length - 1; index > -1; index--) {\n if (materials[index].id === id) {\n this.material = materials[index];\n return this;\n }\n } // Multi\n\n\n var multiMaterials = this.getScene().multiMaterials;\n\n for (index = multiMaterials.length - 1; index > -1; index--) {\n if (multiMaterials[index].id === id) {\n this.material = multiMaterials[index];\n return this;\n }\n }\n\n return this;\n };\n /**\r\n * Returns as a new array populated with the mesh material and/or skeleton, if any.\r\n * @returns an array of IAnimatable\r\n */\n\n\n Mesh.prototype.getAnimatables = function () {\n var results = new Array();\n\n if (this.material) {\n results.push(this.material);\n }\n\n if (this.skeleton) {\n results.push(this.skeleton);\n }\n\n return results;\n };\n /**\r\n * Modifies the mesh geometry according to the passed transformation matrix.\r\n * This method returns nothing but it really modifies the mesh even if it's originally not set as updatable.\r\n * The mesh normals are modified using the same transformation.\r\n * Note that, under the hood, this method sets a new VertexBuffer each call.\r\n * @param transform defines the transform matrix to use\r\n * @see https://doc.babylonjs.com/resources/baking_transformations\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.bakeTransformIntoVertices = function (transform) {\n // Position\n if (!this.isVerticesDataPresent(VertexBuffer.PositionKind)) {\n return this;\n }\n\n var submeshes = this.subMeshes.splice(0);\n\n this._resetPointsArrayCache();\n\n var data = this.getVerticesData(VertexBuffer.PositionKind);\n var temp = new Array();\n var index;\n\n for (index = 0; index < data.length; index += 3) {\n Vector3.TransformCoordinates(Vector3.FromArray(data, index), transform).toArray(temp, index);\n }\n\n this.setVerticesData(VertexBuffer.PositionKind, temp, this.getVertexBuffer(VertexBuffer.PositionKind).isUpdatable()); // Normals\n\n if (this.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n data = this.getVerticesData(VertexBuffer.NormalKind);\n temp = [];\n\n for (index = 0; index < data.length; index += 3) {\n Vector3.TransformNormal(Vector3.FromArray(data, index), transform).normalize().toArray(temp, index);\n }\n\n this.setVerticesData(VertexBuffer.NormalKind, temp, this.getVertexBuffer(VertexBuffer.NormalKind).isUpdatable());\n } // flip faces?\n\n\n if (transform.m[0] * transform.m[5] * transform.m[10] < 0) {\n this.flipFaces();\n } // Restore submeshes\n\n\n this.releaseSubMeshes();\n this.subMeshes = submeshes;\n return this;\n };\n /**\r\n * Modifies the mesh geometry according to its own current World Matrix.\r\n * The mesh World Matrix is then reset.\r\n * This method returns nothing but really modifies the mesh even if it's originally not set as updatable.\r\n * Note that, under the hood, this method sets a new VertexBuffer each call.\r\n * @see https://doc.babylonjs.com/resources/baking_transformations\r\n * @param bakeIndependenlyOfChildren indicates whether to preserve all child nodes' World Matrix during baking\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.bakeCurrentTransformIntoVertices = function (bakeIndependenlyOfChildren) {\n if (bakeIndependenlyOfChildren === void 0) {\n bakeIndependenlyOfChildren = true;\n }\n\n this.bakeTransformIntoVertices(this.computeWorldMatrix(true));\n this.resetLocalMatrix(bakeIndependenlyOfChildren);\n return this;\n };\n\n Object.defineProperty(Mesh.prototype, \"_positions\", {\n // Cache\n\n /** @hidden */\n get: function get() {\n if (this._geometry) {\n return this._geometry._positions;\n }\n\n return null;\n },\n enumerable: false,\n configurable: true\n });\n /** @hidden */\n\n Mesh.prototype._resetPointsArrayCache = function () {\n if (this._geometry) {\n this._geometry._resetPointsArrayCache();\n }\n\n return this;\n };\n /** @hidden */\n\n\n Mesh.prototype._generatePointsArray = function () {\n if (this._geometry) {\n return this._geometry._generatePointsArray();\n }\n\n return false;\n };\n /**\r\n * Returns a new Mesh object generated from the current mesh properties.\r\n * This method must not get confused with createInstance()\r\n * @param name is a string, the name given to the new mesh\r\n * @param newParent can be any Node object (default `null`)\r\n * @param doNotCloneChildren allows/denies the recursive cloning of the original mesh children if any (default `false`)\r\n * @param clonePhysicsImpostor allows/denies the cloning in the same time of the original mesh `body` used by the physics engine, if any (default `true`)\r\n * @returns a new mesh\r\n */\n\n\n Mesh.prototype.clone = function (name, newParent, doNotCloneChildren, clonePhysicsImpostor) {\n if (name === void 0) {\n name = \"\";\n }\n\n if (newParent === void 0) {\n newParent = null;\n }\n\n if (clonePhysicsImpostor === void 0) {\n clonePhysicsImpostor = true;\n }\n\n return new Mesh(name, this.getScene(), newParent, this, doNotCloneChildren, clonePhysicsImpostor);\n };\n /**\r\n * Releases resources associated with this mesh.\r\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\r\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\r\n */\n\n\n Mesh.prototype.dispose = function (doNotRecurse, disposeMaterialAndTextures) {\n if (disposeMaterialAndTextures === void 0) {\n disposeMaterialAndTextures = false;\n }\n\n this.morphTargetManager = null;\n\n if (this._geometry) {\n this._geometry.releaseForMesh(this, true);\n }\n\n var internalDataInfo = this._internalMeshDataInfo;\n\n if (internalDataInfo._onBeforeDrawObservable) {\n internalDataInfo._onBeforeDrawObservable.clear();\n }\n\n if (internalDataInfo._onBeforeBindObservable) {\n internalDataInfo._onBeforeBindObservable.clear();\n }\n\n if (internalDataInfo._onBeforeRenderObservable) {\n internalDataInfo._onBeforeRenderObservable.clear();\n }\n\n if (internalDataInfo._onAfterRenderObservable) {\n internalDataInfo._onAfterRenderObservable.clear();\n } // Sources\n\n\n if (this._scene.useClonedMeshMap) {\n if (internalDataInfo.meshMap) {\n for (var uniqueId in internalDataInfo.meshMap) {\n var mesh = internalDataInfo.meshMap[uniqueId];\n\n if (mesh) {\n mesh._internalMeshDataInfo._source = null;\n internalDataInfo.meshMap[uniqueId] = undefined;\n }\n }\n }\n\n if (internalDataInfo._source && internalDataInfo._source._internalMeshDataInfo.meshMap) {\n internalDataInfo._source._internalMeshDataInfo.meshMap[this.uniqueId] = undefined;\n }\n } else {\n var meshes = this.getScene().meshes;\n\n for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {\n var abstractMesh = meshes_1[_i];\n var mesh = abstractMesh;\n\n if (mesh._internalMeshDataInfo && mesh._internalMeshDataInfo._source && mesh._internalMeshDataInfo._source === this) {\n mesh._internalMeshDataInfo._source = null;\n }\n }\n }\n\n internalDataInfo._source = null; // Instances\n\n this._disposeInstanceSpecificData(); // Thin instances\n\n\n this._disposeThinInstanceSpecificData();\n\n _super.prototype.dispose.call(this, doNotRecurse, disposeMaterialAndTextures);\n };\n /** @hidden */\n\n\n Mesh.prototype._disposeInstanceSpecificData = function () {// Do nothing\n };\n /** @hidden */\n\n\n Mesh.prototype._disposeThinInstanceSpecificData = function () {// Do nothing\n };\n /**\r\n * Modifies the mesh geometry according to a displacement map.\r\n * A displacement map is a colored image. Each pixel color value (actually a gradient computed from red, green, blue values) will give the displacement to apply to each mesh vertex.\r\n * The mesh must be set as updatable. Its internal geometry is directly modified, no new buffer are allocated.\r\n * @param url is a string, the URL from the image file is to be downloaded.\r\n * @param minHeight is the lower limit of the displacement.\r\n * @param maxHeight is the upper limit of the displacement.\r\n * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.\r\n * @param uvOffset is an optional vector2 used to offset UV.\r\n * @param uvScale is an optional vector2 used to scale UV.\r\n * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.\r\n * @returns the Mesh.\r\n */\n\n\n Mesh.prototype.applyDisplacementMap = function (url, minHeight, maxHeight, onSuccess, uvOffset, uvScale, forceUpdate) {\n var _this = this;\n\n if (forceUpdate === void 0) {\n forceUpdate = false;\n }\n\n var scene = this.getScene();\n\n var onload = function onload(img) {\n // Getting height map data\n var heightMapWidth = img.width;\n var heightMapHeight = img.height;\n var canvas = CanvasGenerator.CreateCanvas(heightMapWidth, heightMapHeight);\n var context = canvas.getContext(\"2d\");\n context.drawImage(img, 0, 0); // Create VertexData from map data\n //Cast is due to wrong definition in lib.d.ts from ts 1.3 - https://github.com/Microsoft/TypeScript/issues/949\n\n var buffer = context.getImageData(0, 0, heightMapWidth, heightMapHeight).data;\n\n _this.applyDisplacementMapFromBuffer(buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight, uvOffset, uvScale, forceUpdate); //execute success callback, if set\n\n\n if (onSuccess) {\n onSuccess(_this);\n }\n };\n\n Tools.LoadImage(url, onload, function () {}, scene.offlineProvider);\n return this;\n };\n /**\r\n * Modifies the mesh geometry according to a displacementMap buffer.\r\n * A displacement map is a colored image. Each pixel color value (actually a gradient computed from red, green, blue values) will give the displacement to apply to each mesh vertex.\r\n * The mesh must be set as updatable. Its internal geometry is directly modified, no new buffer are allocated.\r\n * @param buffer is a `Uint8Array` buffer containing series of `Uint8` lower than 255, the red, green, blue and alpha values of each successive pixel.\r\n * @param heightMapWidth is the width of the buffer image.\r\n * @param heightMapHeight is the height of the buffer image.\r\n * @param minHeight is the lower limit of the displacement.\r\n * @param maxHeight is the upper limit of the displacement.\r\n * @param onSuccess is an optional Javascript function to be called just after the mesh is modified. It is passed the modified mesh and must return nothing.\r\n * @param uvOffset is an optional vector2 used to offset UV.\r\n * @param uvScale is an optional vector2 used to scale UV.\r\n * @param forceUpdate defines whether or not to force an update of the generated buffers. This is useful to apply on a deserialized model for instance.\r\n * @returns the Mesh.\r\n */\n\n\n Mesh.prototype.applyDisplacementMapFromBuffer = function (buffer, heightMapWidth, heightMapHeight, minHeight, maxHeight, uvOffset, uvScale, forceUpdate) {\n if (forceUpdate === void 0) {\n forceUpdate = false;\n }\n\n if (!this.isVerticesDataPresent(VertexBuffer.PositionKind) || !this.isVerticesDataPresent(VertexBuffer.NormalKind) || !this.isVerticesDataPresent(VertexBuffer.UVKind)) {\n Logger.Warn(\"Cannot call applyDisplacementMap: Given mesh is not complete. Position, Normal or UV are missing\");\n return this;\n }\n\n var positions = this.getVerticesData(VertexBuffer.PositionKind, true, true);\n var normals = this.getVerticesData(VertexBuffer.NormalKind);\n var uvs = this.getVerticesData(VertexBuffer.UVKind);\n var position = Vector3.Zero();\n var normal = Vector3.Zero();\n var uv = Vector2.Zero();\n uvOffset = uvOffset || Vector2.Zero();\n uvScale = uvScale || new Vector2(1, 1);\n\n for (var index = 0; index < positions.length; index += 3) {\n Vector3.FromArrayToRef(positions, index, position);\n Vector3.FromArrayToRef(normals, index, normal);\n Vector2.FromArrayToRef(uvs, index / 3 * 2, uv); // Compute height\n\n var u = Math.abs(uv.x * uvScale.x + uvOffset.x % 1) * (heightMapWidth - 1) % heightMapWidth | 0;\n var v = Math.abs(uv.y * uvScale.y + uvOffset.y % 1) * (heightMapHeight - 1) % heightMapHeight | 0;\n var pos = (u + v * heightMapWidth) * 4;\n var r = buffer[pos] / 255.0;\n var g = buffer[pos + 1] / 255.0;\n var b = buffer[pos + 2] / 255.0;\n var gradient = r * 0.3 + g * 0.59 + b * 0.11;\n normal.normalize();\n normal.scaleInPlace(minHeight + (maxHeight - minHeight) * gradient);\n position = position.add(normal);\n position.toArray(positions, index);\n }\n\n VertexData.ComputeNormals(positions, this.getIndices(), normals);\n\n if (forceUpdate) {\n this.setVerticesData(VertexBuffer.PositionKind, positions);\n this.setVerticesData(VertexBuffer.NormalKind, normals);\n } else {\n this.updateVerticesData(VertexBuffer.PositionKind, positions);\n this.updateVerticesData(VertexBuffer.NormalKind, normals);\n }\n\n return this;\n };\n /**\r\n * Modify the mesh to get a flat shading rendering.\r\n * This means each mesh facet will then have its own normals. Usually new vertices are added in the mesh geometry to get this result.\r\n * Warning : the mesh is really modified even if not set originally as updatable and, under the hood, a new VertexBuffer is allocated.\r\n * @returns current mesh\r\n */\n\n\n Mesh.prototype.convertToFlatShadedMesh = function () {\n var kinds = this.getVerticesDataKinds();\n var vbs = {};\n var data = {};\n var newdata = {};\n var updatableNormals = false;\n var kindIndex;\n var kind;\n\n for (kindIndex = 0; kindIndex < kinds.length; kindIndex++) {\n kind = kinds[kindIndex];\n var vertexBuffer = this.getVertexBuffer(kind);\n\n if (kind === VertexBuffer.NormalKind) {\n updatableNormals = vertexBuffer.isUpdatable();\n kinds.splice(kindIndex, 1);\n kindIndex--;\n continue;\n }\n\n vbs[kind] = vertexBuffer;\n data[kind] = vbs[kind].getData();\n newdata[kind] = [];\n } // Save previous submeshes\n\n\n var previousSubmeshes = this.subMeshes.slice(0);\n var indices = this.getIndices();\n var totalIndices = this.getTotalIndices(); // Generating unique vertices per face\n\n var index;\n\n for (index = 0; index < totalIndices; index++) {\n var vertexIndex = indices[index];\n\n for (kindIndex = 0; kindIndex < kinds.length; kindIndex++) {\n kind = kinds[kindIndex];\n var stride = vbs[kind].getStrideSize();\n\n for (var offset = 0; offset < stride; offset++) {\n newdata[kind].push(data[kind][vertexIndex * stride + offset]);\n }\n }\n } // Updating faces & normal\n\n\n var normals = [];\n var positions = newdata[VertexBuffer.PositionKind];\n\n for (index = 0; index < totalIndices; index += 3) {\n indices[index] = index;\n indices[index + 1] = index + 1;\n indices[index + 2] = index + 2;\n var p1 = Vector3.FromArray(positions, index * 3);\n var p2 = Vector3.FromArray(positions, (index + 1) * 3);\n var p3 = Vector3.FromArray(positions, (index + 2) * 3);\n var p1p2 = p1.subtract(p2);\n var p3p2 = p3.subtract(p2);\n var normal = Vector3.Normalize(Vector3.Cross(p1p2, p3p2)); // Store same normals for every vertex\n\n for (var localIndex = 0; localIndex < 3; localIndex++) {\n normals.push(normal.x);\n normals.push(normal.y);\n normals.push(normal.z);\n }\n }\n\n this.setIndices(indices);\n this.setVerticesData(VertexBuffer.NormalKind, normals, updatableNormals); // Updating vertex buffers\n\n for (kindIndex = 0; kindIndex < kinds.length; kindIndex++) {\n kind = kinds[kindIndex];\n this.setVerticesData(kind, newdata[kind], vbs[kind].isUpdatable());\n } // Updating submeshes\n\n\n this.releaseSubMeshes();\n\n for (var submeshIndex = 0; submeshIndex < previousSubmeshes.length; submeshIndex++) {\n var previousOne = previousSubmeshes[submeshIndex];\n SubMesh.AddToMesh(previousOne.materialIndex, previousOne.indexStart, previousOne.indexCount, previousOne.indexStart, previousOne.indexCount, this);\n }\n\n this.synchronizeInstances();\n return this;\n };\n /**\r\n * This method removes all the mesh indices and add new vertices (duplication) in order to unfold facets into buffers.\r\n * In other words, more vertices, no more indices and a single bigger VBO.\r\n * The mesh is really modified even if not set originally as updatable. Under the hood, a new VertexBuffer is allocated.\r\n * @returns current mesh\r\n */\n\n\n Mesh.prototype.convertToUnIndexedMesh = function () {\n var kinds = this.getVerticesDataKinds();\n var vbs = {};\n var data = {};\n var newdata = {};\n var kindIndex;\n var kind;\n\n for (kindIndex = 0; kindIndex < kinds.length; kindIndex++) {\n kind = kinds[kindIndex];\n var vertexBuffer = this.getVertexBuffer(kind);\n vbs[kind] = vertexBuffer;\n data[kind] = vbs[kind].getData();\n newdata[kind] = [];\n } // Save previous submeshes\n\n\n var previousSubmeshes = this.subMeshes.slice(0);\n var indices = this.getIndices();\n var totalIndices = this.getTotalIndices(); // Generating unique vertices per face\n\n var index;\n\n for (index = 0; index < totalIndices; index++) {\n var vertexIndex = indices[index];\n\n for (kindIndex = 0; kindIndex < kinds.length; kindIndex++) {\n kind = kinds[kindIndex];\n var stride = vbs[kind].getStrideSize();\n\n for (var offset = 0; offset < stride; offset++) {\n newdata[kind].push(data[kind][vertexIndex * stride + offset]);\n }\n }\n } // Updating indices\n\n\n for (index = 0; index < totalIndices; index += 3) {\n indices[index] = index;\n indices[index + 1] = index + 1;\n indices[index + 2] = index + 2;\n }\n\n this.setIndices(indices); // Updating vertex buffers\n\n for (kindIndex = 0; kindIndex < kinds.length; kindIndex++) {\n kind = kinds[kindIndex];\n this.setVerticesData(kind, newdata[kind], vbs[kind].isUpdatable());\n } // Updating submeshes\n\n\n this.releaseSubMeshes();\n\n for (var submeshIndex = 0; submeshIndex < previousSubmeshes.length; submeshIndex++) {\n var previousOne = previousSubmeshes[submeshIndex];\n SubMesh.AddToMesh(previousOne.materialIndex, previousOne.indexStart, previousOne.indexCount, previousOne.indexStart, previousOne.indexCount, this);\n }\n\n this._unIndexed = true;\n this.synchronizeInstances();\n return this;\n };\n /**\r\n * Inverses facet orientations.\r\n * Warning : the mesh is really modified even if not set originally as updatable. A new VertexBuffer is created under the hood each call.\r\n * @param flipNormals will also inverts the normals\r\n * @returns current mesh\r\n */\n\n\n Mesh.prototype.flipFaces = function (flipNormals) {\n if (flipNormals === void 0) {\n flipNormals = false;\n }\n\n var vertex_data = VertexData.ExtractFromMesh(this);\n var i;\n\n if (flipNormals && this.isVerticesDataPresent(VertexBuffer.NormalKind) && vertex_data.normals) {\n for (i = 0; i < vertex_data.normals.length; i++) {\n vertex_data.normals[i] *= -1;\n }\n }\n\n if (vertex_data.indices) {\n var temp;\n\n for (i = 0; i < vertex_data.indices.length; i += 3) {\n // reassign indices\n temp = vertex_data.indices[i + 1];\n vertex_data.indices[i + 1] = vertex_data.indices[i + 2];\n vertex_data.indices[i + 2] = temp;\n }\n }\n\n vertex_data.applyToMesh(this, this.isVertexBufferUpdatable(VertexBuffer.PositionKind));\n return this;\n };\n /**\r\n * Increase the number of facets and hence vertices in a mesh\r\n * Vertex normals are interpolated from existing vertex normals\r\n * Warning : the mesh is really modified even if not set originally as updatable. A new VertexBuffer is created under the hood each call.\r\n * @param numberPerEdge the number of new vertices to add to each edge of a facet, optional default 1\r\n */\n\n\n Mesh.prototype.increaseVertices = function (numberPerEdge) {\n var vertex_data = VertexData.ExtractFromMesh(this);\n var uvs = vertex_data.uvs;\n var currentIndices = vertex_data.indices;\n var positions = vertex_data.positions;\n var normals = vertex_data.normals;\n\n if (!currentIndices || !positions || !normals || !uvs) {\n Logger.Warn(\"VertexData contains null entries\");\n } else {\n var segments = numberPerEdge + 1; //segments per current facet edge, become sides of new facets\n\n var tempIndices = new Array();\n\n for (var i = 0; i < segments + 1; i++) {\n tempIndices[i] = new Array();\n }\n\n var a; //vertex index of one end of a side\n\n var b; //vertex index of other end of the side\n\n var deltaPosition = new Vector3(0, 0, 0);\n var deltaNormal = new Vector3(0, 0, 0);\n var deltaUV = new Vector2(0, 0);\n var indices = new Array();\n var vertexIndex = new Array();\n var side = new Array();\n var len;\n var positionPtr = positions.length;\n var uvPtr = uvs.length;\n\n for (var i = 0; i < currentIndices.length; i += 3) {\n vertexIndex[0] = currentIndices[i];\n vertexIndex[1] = currentIndices[i + 1];\n vertexIndex[2] = currentIndices[i + 2];\n\n for (var j = 0; j < 3; j++) {\n a = vertexIndex[j];\n b = vertexIndex[(j + 1) % 3];\n\n if (side[a] === undefined && side[b] === undefined) {\n side[a] = new Array();\n side[b] = new Array();\n } else {\n if (side[a] === undefined) {\n side[a] = new Array();\n }\n\n if (side[b] === undefined) {\n side[b] = new Array();\n }\n }\n\n if (side[a][b] === undefined && side[b][a] === undefined) {\n side[a][b] = [];\n deltaPosition.x = (positions[3 * b] - positions[3 * a]) / segments;\n deltaPosition.y = (positions[3 * b + 1] - positions[3 * a + 1]) / segments;\n deltaPosition.z = (positions[3 * b + 2] - positions[3 * a + 2]) / segments;\n deltaNormal.x = (normals[3 * b] - normals[3 * a]) / segments;\n deltaNormal.y = (normals[3 * b + 1] - normals[3 * a + 1]) / segments;\n deltaNormal.z = (normals[3 * b + 2] - normals[3 * a + 2]) / segments;\n deltaUV.x = (uvs[2 * b] - uvs[2 * a]) / segments;\n deltaUV.y = (uvs[2 * b + 1] - uvs[2 * a + 1]) / segments;\n side[a][b].push(a);\n\n for (var k = 1; k < segments; k++) {\n side[a][b].push(positions.length / 3);\n positions[positionPtr] = positions[3 * a] + k * deltaPosition.x;\n normals[positionPtr++] = normals[3 * a] + k * deltaNormal.x;\n positions[positionPtr] = positions[3 * a + 1] + k * deltaPosition.y;\n normals[positionPtr++] = normals[3 * a + 1] + k * deltaNormal.y;\n positions[positionPtr] = positions[3 * a + 2] + k * deltaPosition.z;\n normals[positionPtr++] = normals[3 * a + 2] + k * deltaNormal.z;\n uvs[uvPtr++] = uvs[2 * a] + k * deltaUV.x;\n uvs[uvPtr++] = uvs[2 * a + 1] + k * deltaUV.y;\n }\n\n side[a][b].push(b);\n side[b][a] = new Array();\n len = side[a][b].length;\n\n for (var idx = 0; idx < len; idx++) {\n side[b][a][idx] = side[a][b][len - 1 - idx];\n }\n }\n } //Calculate positions, normals and uvs of new internal vertices\n\n\n tempIndices[0][0] = currentIndices[i];\n tempIndices[1][0] = side[currentIndices[i]][currentIndices[i + 1]][1];\n tempIndices[1][1] = side[currentIndices[i]][currentIndices[i + 2]][1];\n\n for (var k = 2; k < segments; k++) {\n tempIndices[k][0] = side[currentIndices[i]][currentIndices[i + 1]][k];\n tempIndices[k][k] = side[currentIndices[i]][currentIndices[i + 2]][k];\n deltaPosition.x = (positions[3 * tempIndices[k][k]] - positions[3 * tempIndices[k][0]]) / k;\n deltaPosition.y = (positions[3 * tempIndices[k][k] + 1] - positions[3 * tempIndices[k][0] + 1]) / k;\n deltaPosition.z = (positions[3 * tempIndices[k][k] + 2] - positions[3 * tempIndices[k][0] + 2]) / k;\n deltaNormal.x = (normals[3 * tempIndices[k][k]] - normals[3 * tempIndices[k][0]]) / k;\n deltaNormal.y = (normals[3 * tempIndices[k][k] + 1] - normals[3 * tempIndices[k][0] + 1]) / k;\n deltaNormal.z = (normals[3 * tempIndices[k][k] + 2] - normals[3 * tempIndices[k][0] + 2]) / k;\n deltaUV.x = (uvs[2 * tempIndices[k][k]] - uvs[2 * tempIndices[k][0]]) / k;\n deltaUV.y = (uvs[2 * tempIndices[k][k] + 1] - uvs[2 * tempIndices[k][0] + 1]) / k;\n\n for (var j = 1; j < k; j++) {\n tempIndices[k][j] = positions.length / 3;\n positions[positionPtr] = positions[3 * tempIndices[k][0]] + j * deltaPosition.x;\n normals[positionPtr++] = normals[3 * tempIndices[k][0]] + j * deltaNormal.x;\n positions[positionPtr] = positions[3 * tempIndices[k][0] + 1] + j * deltaPosition.y;\n normals[positionPtr++] = normals[3 * tempIndices[k][0] + 1] + j * deltaNormal.y;\n positions[positionPtr] = positions[3 * tempIndices[k][0] + 2] + j * deltaPosition.z;\n normals[positionPtr++] = normals[3 * tempIndices[k][0] + 2] + j * deltaNormal.z;\n uvs[uvPtr++] = uvs[2 * tempIndices[k][0]] + j * deltaUV.x;\n uvs[uvPtr++] = uvs[2 * tempIndices[k][0] + 1] + j * deltaUV.y;\n }\n }\n\n tempIndices[segments] = side[currentIndices[i + 1]][currentIndices[i + 2]]; // reform indices\n\n indices.push(tempIndices[0][0], tempIndices[1][0], tempIndices[1][1]);\n\n for (var k = 1; k < segments; k++) {\n for (var j = 0; j < k; j++) {\n indices.push(tempIndices[k][j], tempIndices[k + 1][j], tempIndices[k + 1][j + 1]);\n indices.push(tempIndices[k][j], tempIndices[k + 1][j + 1], tempIndices[k][j + 1]);\n }\n\n indices.push(tempIndices[k][j], tempIndices[k + 1][j], tempIndices[k + 1][j + 1]);\n }\n }\n\n vertex_data.indices = indices;\n vertex_data.applyToMesh(this, this.isVertexBufferUpdatable(VertexBuffer.PositionKind));\n }\n };\n /**\r\n * Force adjacent facets to share vertices and remove any facets that have all vertices in a line\r\n * This will undo any application of covertToFlatShadedMesh\r\n * Warning : the mesh is really modified even if not set originally as updatable. A new VertexBuffer is created under the hood each call.\r\n */\n\n\n Mesh.prototype.forceSharedVertices = function () {\n var vertex_data = VertexData.ExtractFromMesh(this);\n var currentUVs = vertex_data.uvs;\n var currentIndices = vertex_data.indices;\n var currentPositions = vertex_data.positions;\n var currentColors = vertex_data.colors;\n\n if (currentIndices === void 0 || currentPositions === void 0 || currentIndices === null || currentPositions === null) {\n Logger.Warn(\"VertexData contains empty entries\");\n } else {\n var positions = new Array();\n var indices = new Array();\n var uvs = new Array();\n var colors = new Array();\n var pstring = new Array(); //lists facet vertex positions (a,b,c) as string \"a|b|c\"\n\n var indexPtr = 0; // pointer to next available index value\n\n var uniquePositions = {}; // unique vertex positions\n\n var ptr; // pointer to element in uniquePositions\n\n var facet;\n\n for (var i = 0; i < currentIndices.length; i += 3) {\n facet = [currentIndices[i], currentIndices[i + 1], currentIndices[i + 2]]; //facet vertex indices\n\n pstring = new Array();\n\n for (var j = 0; j < 3; j++) {\n pstring[j] = \"\";\n\n for (var k = 0; k < 3; k++) {\n //small values make 0\n if (Math.abs(currentPositions[3 * facet[j] + k]) < 0.00000001) {\n currentPositions[3 * facet[j] + k] = 0;\n }\n\n pstring[j] += currentPositions[3 * facet[j] + k] + \"|\";\n }\n } //check facet vertices to see that none are repeated\n // do not process any facet that has a repeated vertex, ie is a line\n\n\n if (!(pstring[0] == pstring[1] || pstring[0] == pstring[2] || pstring[1] == pstring[2])) {\n //for each facet position check if already listed in uniquePositions\n // if not listed add to uniquePositions and set index pointer\n // if listed use its index in uniquePositions and new index pointer\n for (var j = 0; j < 3; j++) {\n ptr = uniquePositions[pstring[j]];\n\n if (ptr === undefined) {\n uniquePositions[pstring[j]] = indexPtr;\n ptr = indexPtr++; //not listed so add individual x, y, z coordinates to positions\n\n for (var k = 0; k < 3; k++) {\n positions.push(currentPositions[3 * facet[j] + k]);\n }\n\n if (currentColors !== null && currentColors !== void 0) {\n for (var k = 0; k < 4; k++) {\n colors.push(currentColors[4 * facet[j] + k]);\n }\n }\n\n if (currentUVs !== null && currentUVs !== void 0) {\n for (var k = 0; k < 2; k++) {\n uvs.push(currentUVs[2 * facet[j] + k]);\n }\n }\n } // add new index pointer to indices array\n\n\n indices.push(ptr);\n }\n }\n }\n\n var normals = new Array();\n VertexData.ComputeNormals(positions, indices, normals); //create new vertex data object and update\n\n vertex_data.positions = positions;\n vertex_data.indices = indices;\n vertex_data.normals = normals;\n\n if (currentUVs !== null && currentUVs !== void 0) {\n vertex_data.uvs = uvs;\n }\n\n if (currentColors !== null && currentColors !== void 0) {\n vertex_data.colors = colors;\n }\n\n vertex_data.applyToMesh(this, this.isVertexBufferUpdatable(VertexBuffer.PositionKind));\n }\n }; // Instances\n\n /** @hidden */\n\n\n Mesh._instancedMeshFactory = function (name, mesh) {\n throw _DevTools.WarnImport(\"InstancedMesh\");\n };\n /** @hidden */\n\n\n Mesh._PhysicsImpostorParser = function (scene, physicObject, jsonObject) {\n throw _DevTools.WarnImport(\"PhysicsImpostor\");\n };\n /**\r\n * Creates a new InstancedMesh object from the mesh model.\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_instances\r\n * @param name defines the name of the new instance\r\n * @returns a new InstancedMesh\r\n */\n\n\n Mesh.prototype.createInstance = function (name) {\n var geometry = this.geometry;\n\n if (geometry && geometry.meshes.length > 1) {\n var others = geometry.meshes.slice(0);\n\n for (var _i = 0, others_1 = others; _i < others_1.length; _i++) {\n var other = others_1[_i];\n\n if (other === this) {\n continue;\n }\n\n other.makeGeometryUnique();\n }\n }\n\n return Mesh._instancedMeshFactory(name, this);\n };\n /**\r\n * Synchronises all the mesh instance submeshes to the current mesh submeshes, if any.\r\n * After this call, all the mesh instances have the same submeshes than the current mesh.\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.synchronizeInstances = function () {\n if (this._geometry && this._geometry.meshes.length !== 1 && this.instances.length) {\n this.makeGeometryUnique();\n }\n\n for (var instanceIndex = 0; instanceIndex < this.instances.length; instanceIndex++) {\n var instance = this.instances[instanceIndex];\n\n instance._syncSubMeshes();\n }\n\n return this;\n };\n /**\r\n * Optimization of the mesh's indices, in case a mesh has duplicated vertices.\r\n * The function will only reorder the indices and will not remove unused vertices to avoid problems with submeshes.\r\n * This should be used together with the simplification to avoid disappearing triangles.\r\n * @param successCallback an optional success callback to be called after the optimization finished.\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.optimizeIndices = function (successCallback) {\n var _this = this;\n\n var indices = this.getIndices();\n var positions = this.getVerticesData(VertexBuffer.PositionKind);\n\n if (!positions || !indices) {\n return this;\n }\n\n var vectorPositions = new Array();\n\n for (var pos = 0; pos < positions.length; pos = pos + 3) {\n vectorPositions.push(Vector3.FromArray(positions, pos));\n }\n\n var dupes = new Array();\n AsyncLoop.SyncAsyncForLoop(vectorPositions.length, 40, function (iteration) {\n var realPos = vectorPositions.length - 1 - iteration;\n var testedPosition = vectorPositions[realPos];\n\n for (var j = 0; j < realPos; ++j) {\n var againstPosition = vectorPositions[j];\n\n if (testedPosition.equals(againstPosition)) {\n dupes[realPos] = j;\n break;\n }\n }\n }, function () {\n for (var i = 0; i < indices.length; ++i) {\n indices[i] = dupes[indices[i]] || indices[i];\n } //indices are now reordered\n\n\n var originalSubMeshes = _this.subMeshes.slice(0);\n\n _this.setIndices(indices);\n\n _this.subMeshes = originalSubMeshes;\n\n if (successCallback) {\n successCallback(_this);\n }\n });\n return this;\n };\n /**\r\n * Serialize current mesh\r\n * @param serializationObject defines the object which will receive the serialization data\r\n */\n\n\n Mesh.prototype.serialize = function (serializationObject) {\n serializationObject.name = this.name;\n serializationObject.id = this.id;\n serializationObject.uniqueId = this.uniqueId;\n serializationObject.type = this.getClassName();\n\n if (Tags && Tags.HasTags(this)) {\n serializationObject.tags = Tags.GetTags(this);\n }\n\n serializationObject.position = this.position.asArray();\n\n if (this.rotationQuaternion) {\n serializationObject.rotationQuaternion = this.rotationQuaternion.asArray();\n } else if (this.rotation) {\n serializationObject.rotation = this.rotation.asArray();\n }\n\n serializationObject.scaling = this.scaling.asArray();\n\n if (this._postMultiplyPivotMatrix) {\n serializationObject.pivotMatrix = this.getPivotMatrix().asArray();\n } else {\n serializationObject.localMatrix = this.getPivotMatrix().asArray();\n }\n\n serializationObject.isEnabled = this.isEnabled(false);\n serializationObject.isVisible = this.isVisible;\n serializationObject.infiniteDistance = this.infiniteDistance;\n serializationObject.pickable = this.isPickable;\n serializationObject.receiveShadows = this.receiveShadows;\n serializationObject.billboardMode = this.billboardMode;\n serializationObject.visibility = this.visibility;\n serializationObject.checkCollisions = this.checkCollisions;\n serializationObject.isBlocker = this.isBlocker;\n serializationObject.overrideMaterialSideOrientation = this.overrideMaterialSideOrientation; // Parent\n\n if (this.parent) {\n serializationObject.parentId = this.parent.id;\n } // Geometry\n\n\n serializationObject.isUnIndexed = this.isUnIndexed;\n var geometry = this._geometry;\n\n if (geometry) {\n var geometryId = geometry.id;\n serializationObject.geometryId = geometryId; // SubMeshes\n\n serializationObject.subMeshes = [];\n\n for (var subIndex = 0; subIndex < this.subMeshes.length; subIndex++) {\n var subMesh = this.subMeshes[subIndex];\n serializationObject.subMeshes.push({\n materialIndex: subMesh.materialIndex,\n verticesStart: subMesh.verticesStart,\n verticesCount: subMesh.verticesCount,\n indexStart: subMesh.indexStart,\n indexCount: subMesh.indexCount\n });\n }\n } // Material\n\n\n if (this.material) {\n if (!this.material.doNotSerialize) {\n serializationObject.materialId = this.material.id;\n }\n } else {\n this.material = null;\n } // Morph targets\n\n\n if (this.morphTargetManager) {\n serializationObject.morphTargetManagerId = this.morphTargetManager.uniqueId;\n } // Skeleton\n\n\n if (this.skeleton) {\n serializationObject.skeletonId = this.skeleton.id;\n serializationObject.numBoneInfluencers = this.numBoneInfluencers;\n } // Physics\n //TODO implement correct serialization for physics impostors.\n\n\n if (this.getScene()._getComponent(SceneComponentConstants.NAME_PHYSICSENGINE)) {\n var impostor = this.getPhysicsImpostor();\n\n if (impostor) {\n serializationObject.physicsMass = impostor.getParam(\"mass\");\n serializationObject.physicsFriction = impostor.getParam(\"friction\");\n serializationObject.physicsRestitution = impostor.getParam(\"mass\");\n serializationObject.physicsImpostor = impostor.type;\n }\n } // Metadata\n\n\n if (this.metadata) {\n serializationObject.metadata = this.metadata;\n } // Instances\n\n\n serializationObject.instances = [];\n\n for (var index = 0; index < this.instances.length; index++) {\n var instance = this.instances[index];\n\n if (instance.doNotSerialize) {\n continue;\n }\n\n var serializationInstance = {\n name: instance.name,\n id: instance.id,\n isEnabled: instance.isEnabled(false),\n isVisible: instance.isVisible,\n isPickable: instance.isPickable,\n checkCollisions: instance.checkCollisions,\n position: instance.position.asArray(),\n scaling: instance.scaling.asArray()\n };\n\n if (instance.parent) {\n serializationInstance.parentId = instance.parent.id;\n }\n\n if (instance.rotationQuaternion) {\n serializationInstance.rotationQuaternion = instance.rotationQuaternion.asArray();\n } else if (instance.rotation) {\n serializationInstance.rotation = instance.rotation.asArray();\n } // Physics\n //TODO implement correct serialization for physics impostors.\n\n\n if (this.getScene()._getComponent(SceneComponentConstants.NAME_PHYSICSENGINE)) {\n var impostor = instance.getPhysicsImpostor();\n\n if (impostor) {\n serializationInstance.physicsMass = impostor.getParam(\"mass\");\n serializationInstance.physicsFriction = impostor.getParam(\"friction\");\n serializationInstance.physicsRestitution = impostor.getParam(\"mass\");\n serializationInstance.physicsImpostor = impostor.type;\n }\n } // Metadata\n\n\n if (instance.metadata) {\n serializationInstance.metadata = instance.metadata;\n }\n\n serializationObject.instances.push(serializationInstance); // Animations\n\n SerializationHelper.AppendSerializedAnimations(instance, serializationInstance);\n serializationInstance.ranges = instance.serializeAnimationRanges();\n } // Thin instances\n\n\n if (this._thinInstanceDataStorage.instancesCount && this._thinInstanceDataStorage.matrixData) {\n serializationObject.thinInstances = {\n instancesCount: this._thinInstanceDataStorage.instancesCount,\n matrixData: Tools.SliceToArray(this._thinInstanceDataStorage.matrixData),\n matrixBufferSize: this._thinInstanceDataStorage.matrixBufferSize\n };\n\n if (this._userThinInstanceBuffersStorage) {\n var userThinInstance = {\n data: {},\n sizes: {},\n strides: {}\n };\n\n for (var kind in this._userThinInstanceBuffersStorage.data) {\n userThinInstance.data[kind] = Tools.SliceToArray(this._userThinInstanceBuffersStorage.data[kind]);\n userThinInstance.sizes[kind] = this._userThinInstanceBuffersStorage.sizes[kind];\n userThinInstance.strides[kind] = this._userThinInstanceBuffersStorage.strides[kind];\n }\n\n serializationObject.thinInstances.userThinInstance = userThinInstance;\n }\n } // Animations\n\n\n SerializationHelper.AppendSerializedAnimations(this, serializationObject);\n serializationObject.ranges = this.serializeAnimationRanges(); // Layer mask\n\n serializationObject.layerMask = this.layerMask; // Alpha\n\n serializationObject.alphaIndex = this.alphaIndex;\n serializationObject.hasVertexAlpha = this.hasVertexAlpha; // Overlay\n\n serializationObject.overlayAlpha = this.overlayAlpha;\n serializationObject.overlayColor = this.overlayColor.asArray();\n serializationObject.renderOverlay = this.renderOverlay; // Fog\n\n serializationObject.applyFog = this.applyFog; // Action Manager\n\n if (this.actionManager) {\n serializationObject.actions = this.actionManager.serialize(this.name);\n }\n };\n /** @hidden */\n\n\n Mesh.prototype._syncGeometryWithMorphTargetManager = function () {\n if (!this.geometry) {\n return;\n }\n\n this._markSubMeshesAsAttributesDirty();\n\n var morphTargetManager = this._internalMeshDataInfo._morphTargetManager;\n\n if (morphTargetManager && morphTargetManager.vertexCount) {\n if (morphTargetManager.vertexCount !== this.getTotalVertices()) {\n Logger.Error(\"Mesh is incompatible with morph targets. Targets and mesh must all have the same vertices count.\");\n this.morphTargetManager = null;\n return;\n }\n\n for (var index = 0; index < morphTargetManager.numInfluencers; index++) {\n var morphTarget = morphTargetManager.getActiveTarget(index);\n var positions = morphTarget.getPositions();\n\n if (!positions) {\n Logger.Error(\"Invalid morph target. Target must have positions.\");\n return;\n }\n\n this.geometry.setVerticesData(VertexBuffer.PositionKind + index, positions, false, 3);\n var normals = morphTarget.getNormals();\n\n if (normals) {\n this.geometry.setVerticesData(VertexBuffer.NormalKind + index, normals, false, 3);\n }\n\n var tangents = morphTarget.getTangents();\n\n if (tangents) {\n this.geometry.setVerticesData(VertexBuffer.TangentKind + index, tangents, false, 3);\n }\n\n var uvs = morphTarget.getUVs();\n\n if (uvs) {\n this.geometry.setVerticesData(VertexBuffer.UVKind + \"_\" + index, uvs, false, 2);\n }\n }\n } else {\n var index = 0; // Positions\n\n while (this.geometry.isVerticesDataPresent(VertexBuffer.PositionKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.PositionKind + index);\n\n if (this.geometry.isVerticesDataPresent(VertexBuffer.NormalKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.NormalKind + index);\n }\n\n if (this.geometry.isVerticesDataPresent(VertexBuffer.TangentKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.TangentKind + index);\n }\n\n if (this.geometry.isVerticesDataPresent(VertexBuffer.UVKind + index)) {\n this.geometry.removeVerticesData(VertexBuffer.UVKind + \"_\" + index);\n }\n\n index++;\n }\n }\n };\n /**\r\n * Returns a new Mesh object parsed from the source provided.\r\n * @param parsedMesh is the source\r\n * @param scene defines the hosting scene\r\n * @param rootUrl is the root URL to prefix the `delayLoadingFile` property with\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.Parse = function (parsedMesh, scene, rootUrl) {\n var mesh;\n\n if (parsedMesh.type && parsedMesh.type === \"GroundMesh\") {\n mesh = Mesh._GroundMeshParser(parsedMesh, scene);\n } else {\n mesh = new Mesh(parsedMesh.name, scene);\n }\n\n mesh.id = parsedMesh.id;\n\n if (Tags) {\n Tags.AddTagsTo(mesh, parsedMesh.tags);\n }\n\n mesh.position = Vector3.FromArray(parsedMesh.position);\n\n if (parsedMesh.metadata !== undefined) {\n mesh.metadata = parsedMesh.metadata;\n }\n\n if (parsedMesh.rotationQuaternion) {\n mesh.rotationQuaternion = Quaternion.FromArray(parsedMesh.rotationQuaternion);\n } else if (parsedMesh.rotation) {\n mesh.rotation = Vector3.FromArray(parsedMesh.rotation);\n }\n\n mesh.scaling = Vector3.FromArray(parsedMesh.scaling);\n\n if (parsedMesh.localMatrix) {\n mesh.setPreTransformMatrix(Matrix.FromArray(parsedMesh.localMatrix));\n } else if (parsedMesh.pivotMatrix) {\n mesh.setPivotMatrix(Matrix.FromArray(parsedMesh.pivotMatrix));\n }\n\n mesh.setEnabled(parsedMesh.isEnabled);\n mesh.isVisible = parsedMesh.isVisible;\n mesh.infiniteDistance = parsedMesh.infiniteDistance;\n mesh.showBoundingBox = parsedMesh.showBoundingBox;\n mesh.showSubMeshesBoundingBox = parsedMesh.showSubMeshesBoundingBox;\n\n if (parsedMesh.applyFog !== undefined) {\n mesh.applyFog = parsedMesh.applyFog;\n }\n\n if (parsedMesh.pickable !== undefined) {\n mesh.isPickable = parsedMesh.pickable;\n }\n\n if (parsedMesh.alphaIndex !== undefined) {\n mesh.alphaIndex = parsedMesh.alphaIndex;\n }\n\n mesh.receiveShadows = parsedMesh.receiveShadows;\n mesh.billboardMode = parsedMesh.billboardMode;\n\n if (parsedMesh.visibility !== undefined) {\n mesh.visibility = parsedMesh.visibility;\n }\n\n mesh.checkCollisions = parsedMesh.checkCollisions;\n mesh.overrideMaterialSideOrientation = parsedMesh.overrideMaterialSideOrientation;\n\n if (parsedMesh.isBlocker !== undefined) {\n mesh.isBlocker = parsedMesh.isBlocker;\n }\n\n mesh._shouldGenerateFlatShading = parsedMesh.useFlatShading; // freezeWorldMatrix\n\n if (parsedMesh.freezeWorldMatrix) {\n mesh._waitingData.freezeWorldMatrix = parsedMesh.freezeWorldMatrix;\n } // Parent\n\n\n if (parsedMesh.parentId) {\n mesh._waitingParentId = parsedMesh.parentId;\n } // Actions\n\n\n if (parsedMesh.actions !== undefined) {\n mesh._waitingData.actions = parsedMesh.actions;\n } // Overlay\n\n\n if (parsedMesh.overlayAlpha !== undefined) {\n mesh.overlayAlpha = parsedMesh.overlayAlpha;\n }\n\n if (parsedMesh.overlayColor !== undefined) {\n mesh.overlayColor = Color3.FromArray(parsedMesh.overlayColor);\n }\n\n if (parsedMesh.renderOverlay !== undefined) {\n mesh.renderOverlay = parsedMesh.renderOverlay;\n } // Geometry\n\n\n mesh.isUnIndexed = !!parsedMesh.isUnIndexed;\n mesh.hasVertexAlpha = parsedMesh.hasVertexAlpha;\n\n if (parsedMesh.delayLoadingFile) {\n mesh.delayLoadState = 4;\n mesh.delayLoadingFile = rootUrl + parsedMesh.delayLoadingFile;\n mesh._boundingInfo = new BoundingInfo(Vector3.FromArray(parsedMesh.boundingBoxMinimum), Vector3.FromArray(parsedMesh.boundingBoxMaximum));\n\n if (parsedMesh._binaryInfo) {\n mesh._binaryInfo = parsedMesh._binaryInfo;\n }\n\n mesh._delayInfo = [];\n\n if (parsedMesh.hasUVs) {\n mesh._delayInfo.push(VertexBuffer.UVKind);\n }\n\n if (parsedMesh.hasUVs2) {\n mesh._delayInfo.push(VertexBuffer.UV2Kind);\n }\n\n if (parsedMesh.hasUVs3) {\n mesh._delayInfo.push(VertexBuffer.UV3Kind);\n }\n\n if (parsedMesh.hasUVs4) {\n mesh._delayInfo.push(VertexBuffer.UV4Kind);\n }\n\n if (parsedMesh.hasUVs5) {\n mesh._delayInfo.push(VertexBuffer.UV5Kind);\n }\n\n if (parsedMesh.hasUVs6) {\n mesh._delayInfo.push(VertexBuffer.UV6Kind);\n }\n\n if (parsedMesh.hasColors) {\n mesh._delayInfo.push(VertexBuffer.ColorKind);\n }\n\n if (parsedMesh.hasMatricesIndices) {\n mesh._delayInfo.push(VertexBuffer.MatricesIndicesKind);\n }\n\n if (parsedMesh.hasMatricesWeights) {\n mesh._delayInfo.push(VertexBuffer.MatricesWeightsKind);\n }\n\n mesh._delayLoadingFunction = Geometry._ImportGeometry;\n\n if (SceneLoaderFlags.ForceFullSceneLoadingForIncremental) {\n mesh._checkDelayState();\n }\n } else {\n Geometry._ImportGeometry(parsedMesh, mesh);\n } // Material\n\n\n if (parsedMesh.materialId) {\n mesh.setMaterialByID(parsedMesh.materialId);\n } else {\n mesh.material = null;\n } // Morph targets\n\n\n if (parsedMesh.morphTargetManagerId > -1) {\n mesh.morphTargetManager = scene.getMorphTargetManagerById(parsedMesh.morphTargetManagerId);\n } // Skeleton\n\n\n if (parsedMesh.skeletonId !== undefined && parsedMesh.skeletonId !== null) {\n mesh.skeleton = scene.getLastSkeletonByID(parsedMesh.skeletonId);\n\n if (parsedMesh.numBoneInfluencers) {\n mesh.numBoneInfluencers = parsedMesh.numBoneInfluencers;\n }\n } // Animations\n\n\n if (parsedMesh.animations) {\n for (var animationIndex = 0; animationIndex < parsedMesh.animations.length; animationIndex++) {\n var parsedAnimation = parsedMesh.animations[animationIndex];\n\n var internalClass = _TypeStore.GetClass(\"BABYLON.Animation\");\n\n if (internalClass) {\n mesh.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n\n Node.ParseAnimationRanges(mesh, parsedMesh, scene);\n }\n\n if (parsedMesh.autoAnimate) {\n scene.beginAnimation(mesh, parsedMesh.autoAnimateFrom, parsedMesh.autoAnimateTo, parsedMesh.autoAnimateLoop, parsedMesh.autoAnimateSpeed || 1.0);\n } // Layer Mask\n\n\n if (parsedMesh.layerMask && !isNaN(parsedMesh.layerMask)) {\n mesh.layerMask = Math.abs(parseInt(parsedMesh.layerMask));\n } else {\n mesh.layerMask = 0x0FFFFFFF;\n } // Physics\n\n\n if (parsedMesh.physicsImpostor) {\n Mesh._PhysicsImpostorParser(scene, mesh, parsedMesh);\n } // Levels\n\n\n if (parsedMesh.lodMeshIds) {\n mesh._waitingData.lods = {\n ids: parsedMesh.lodMeshIds,\n distances: parsedMesh.lodDistances ? parsedMesh.lodDistances : null,\n coverages: parsedMesh.lodCoverages ? parsedMesh.lodCoverages : null\n };\n } // Instances\n\n\n if (parsedMesh.instances) {\n for (var index = 0; index < parsedMesh.instances.length; index++) {\n var parsedInstance = parsedMesh.instances[index];\n var instance = mesh.createInstance(parsedInstance.name);\n\n if (parsedInstance.id) {\n instance.id = parsedInstance.id;\n }\n\n if (Tags) {\n if (parsedInstance.tags) {\n Tags.AddTagsTo(instance, parsedInstance.tags);\n } else {\n Tags.AddTagsTo(instance, parsedMesh.tags);\n }\n }\n\n instance.position = Vector3.FromArray(parsedInstance.position);\n\n if (parsedInstance.metadata !== undefined) {\n instance.metadata = parsedInstance.metadata;\n }\n\n if (parsedInstance.parentId) {\n instance._waitingParentId = parsedInstance.parentId;\n }\n\n if (parsedInstance.isEnabled !== undefined && parsedInstance.isEnabled !== null) {\n instance.setEnabled(parsedInstance.isEnabled);\n }\n\n if (parsedInstance.isVisible !== undefined && parsedInstance.isVisible !== null) {\n instance.isVisible = parsedInstance.isVisible;\n }\n\n if (parsedInstance.isPickable !== undefined && parsedInstance.isPickable !== null) {\n instance.isPickable = parsedInstance.isPickable;\n }\n\n if (parsedInstance.rotationQuaternion) {\n instance.rotationQuaternion = Quaternion.FromArray(parsedInstance.rotationQuaternion);\n } else if (parsedInstance.rotation) {\n instance.rotation = Vector3.FromArray(parsedInstance.rotation);\n }\n\n instance.scaling = Vector3.FromArray(parsedInstance.scaling);\n\n if (parsedInstance.checkCollisions != undefined && parsedInstance.checkCollisions != null) {\n instance.checkCollisions = parsedInstance.checkCollisions;\n }\n\n if (parsedInstance.pickable != undefined && parsedInstance.pickable != null) {\n instance.isPickable = parsedInstance.pickable;\n }\n\n if (parsedInstance.showBoundingBox != undefined && parsedInstance.showBoundingBox != null) {\n instance.showBoundingBox = parsedInstance.showBoundingBox;\n }\n\n if (parsedInstance.showSubMeshesBoundingBox != undefined && parsedInstance.showSubMeshesBoundingBox != null) {\n instance.showSubMeshesBoundingBox = parsedInstance.showSubMeshesBoundingBox;\n }\n\n if (parsedInstance.alphaIndex != undefined && parsedInstance.showSubMeshesBoundingBox != null) {\n instance.alphaIndex = parsedInstance.alphaIndex;\n } // Physics\n\n\n if (parsedInstance.physicsImpostor) {\n Mesh._PhysicsImpostorParser(scene, instance, parsedInstance);\n } // Animation\n\n\n if (parsedInstance.animations) {\n for (animationIndex = 0; animationIndex < parsedInstance.animations.length; animationIndex++) {\n parsedAnimation = parsedInstance.animations[animationIndex];\n\n var internalClass = _TypeStore.GetClass(\"BABYLON.Animation\");\n\n if (internalClass) {\n instance.animations.push(internalClass.Parse(parsedAnimation));\n }\n }\n\n Node.ParseAnimationRanges(instance, parsedInstance, scene);\n\n if (parsedInstance.autoAnimate) {\n scene.beginAnimation(instance, parsedInstance.autoAnimateFrom, parsedInstance.autoAnimateTo, parsedInstance.autoAnimateLoop, parsedInstance.autoAnimateSpeed || 1.0);\n }\n }\n }\n } // Thin instances\n\n\n if (parsedMesh.thinInstances) {\n var thinInstances = parsedMesh.thinInstances;\n\n if (thinInstances.matrixData) {\n mesh.thinInstanceSetBuffer(\"matrix\", new Float32Array(thinInstances.matrixData), 16, false);\n mesh._thinInstanceDataStorage.matrixBufferSize = thinInstances.matrixBufferSize;\n mesh._thinInstanceDataStorage.instancesCount = thinInstances.instancesCount;\n } else {\n mesh._thinInstanceDataStorage.matrixBufferSize = thinInstances.matrixBufferSize;\n }\n\n if (parsedMesh.thinInstances.userThinInstance) {\n var userThinInstance = parsedMesh.thinInstances.userThinInstance;\n\n for (var kind in userThinInstance.data) {\n mesh.thinInstanceSetBuffer(kind, new Float32Array(userThinInstance.data[kind]), userThinInstance.strides[kind], false);\n mesh._userThinInstanceBuffersStorage.sizes[kind] = userThinInstance.sizes[kind];\n }\n }\n }\n\n return mesh;\n };\n /**\r\n * Creates a ribbon mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @see https://doc.babylonjs.com/how_to/parametric_shapes\r\n * @param name defines the name of the mesh to create\r\n * @param pathArray is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry.\r\n * @param closeArray creates a seam between the first and the last paths of the path array (default is false)\r\n * @param closePath creates a seam between the first and the last points of each path of the path array\r\n * @param offset is taken in account only if the `pathArray` is containing a single path\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @param instance defines an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#ribbon)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateRibbon = function (name, pathArray, closeArray, closePath, offset, scene, updatable, sideOrientation, instance) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a plane polygonal mesh. By default, this is a disc. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param radius sets the radius size (float) of the polygon (default 0.5)\r\n * @param tessellation sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateDisc = function (name, radius, tessellation, scene, updatable, sideOrientation) {\n if (scene === void 0) {\n scene = null;\n }\n\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a box mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param size sets the size (float) of each box side (default 1)\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateBox = function (name, size, scene, updatable, sideOrientation) {\n if (scene === void 0) {\n scene = null;\n }\n\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a sphere mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param segments sets the sphere number of horizontal stripes (positive integer, default 32)\r\n * @param diameter sets the diameter size (float) of the sphere (default 1)\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateSphere = function (name, segments, diameter, scene, updatable, sideOrientation) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a hemisphere mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param segments sets the sphere number of horizontal stripes (positive integer, default 32)\r\n * @param diameter sets the diameter size (float) of the sphere (default 1)\r\n * @param scene defines the hosting scene\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateHemisphere = function (name, segments, diameter, scene) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a cylinder or a cone mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param height sets the height size (float) of the cylinder/cone (float, default 2)\r\n * @param diameterTop set the top cap diameter (floats, default 1)\r\n * @param diameterBottom set the bottom cap diameter (floats, default 1). This value can't be zero\r\n * @param tessellation sets the number of cylinder sides (positive integer, default 24). Set it to 3 to get a prism for instance\r\n * @param subdivisions sets the number of rings along the cylinder height (positive integer, default 1)\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateCylinder = function (name, height, diameterTop, diameterBottom, tessellation, subdivisions, scene, updatable, sideOrientation) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n }; // Torus (Code from SharpDX.org)\n\n /**\r\n * Creates a torus mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param diameter sets the diameter size (float) of the torus (default 1)\r\n * @param thickness sets the diameter size of the tube of the torus (float, default 0.5)\r\n * @param tessellation sets the number of torus sides (postive integer, default 16)\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateTorus = function (name, diameter, thickness, tessellation, scene, updatable, sideOrientation) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a torus knot mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param radius sets the global radius size (float) of the torus knot (default 2)\r\n * @param tube sets the diameter size of the tube of the torus (float, default 0.5)\r\n * @param radialSegments sets the number of sides on each tube segments (positive integer, default 32)\r\n * @param tubularSegments sets the number of tubes to decompose the knot into (positive integer, default 32)\r\n * @param p the number of windings on X axis (positive integers, default 2)\r\n * @param q the number of windings on Y axis (positive integers, default 3)\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateTorusKnot = function (name, radius, tube, radialSegments, tubularSegments, p, q, scene, updatable, sideOrientation) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a line mesh. Please consider using the same method from the MeshBuilder class instead.\r\n * @param name defines the name of the mesh to create\r\n * @param points is an array successive Vector3\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param instance is an instance of an existing LineMesh object to be updated with the passed `points` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#lines-and-dashedlines).\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateLines = function (name, points, scene, updatable, instance) {\n if (scene === void 0) {\n scene = null;\n }\n\n if (updatable === void 0) {\n updatable = false;\n }\n\n if (instance === void 0) {\n instance = null;\n }\n\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a dashed line mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param points is an array successive Vector3\r\n * @param dashSize is the size of the dashes relatively the dash number (positive float, default 3)\r\n * @param gapSize is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)\r\n * @param dashNb is the intended total number of dashes (positive integer, default 200)\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param instance is an instance of an existing LineMesh object to be updated with the passed `points` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#lines-and-dashedlines)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateDashedLines = function (name, points, dashSize, gapSize, dashNb, scene, updatable, instance) {\n if (scene === void 0) {\n scene = null;\n }\n\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a polygon mesh.Please consider using the same method from the MeshBuilder class instead\r\n * The polygon's shape will depend on the input parameters and is constructed parallel to a ground mesh.\r\n * The parameter `shape` is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors.\r\n * You can set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\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.\r\n * Remember you can only change the shape positions, not their number when updating a polygon.\r\n * @see https://doc.babylonjs.com/how_to/parametric_shapes#non-regular-polygon\r\n * @param name defines the name of the mesh to create\r\n * @param shape is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors\r\n * @param scene defines the hosting scene\r\n * @param holes is a required array of arrays of successive Vector3 used to defines holes in the polygon\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @param earcutInjection can be used to inject your own earcut reference\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreatePolygon = function (name, shape, scene, holes, updatable, sideOrientation, earcutInjection) {\n if (earcutInjection === void 0) {\n earcutInjection = earcut;\n }\n\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates an extruded polygon mesh, with depth in the Y direction. Please consider using the same method from the MeshBuilder class instead.\r\n * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-non-regular-polygon\r\n * @param name defines the name of the mesh to create\r\n * @param shape is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors\r\n * @param depth defines the height of extrusion\r\n * @param scene defines the hosting scene\r\n * @param holes is a required array of arrays of successive Vector3 used to defines holes in the polygon\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @param earcutInjection can be used to inject your own earcut reference\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.ExtrudePolygon = function (name, shape, depth, scene, holes, updatable, sideOrientation, earcutInjection) {\n if (earcutInjection === void 0) {\n earcutInjection = earcut;\n }\n\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates an extruded shape mesh.\r\n * The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters. Please consider using the same method from the MeshBuilder class instead\r\n * @see https://doc.babylonjs.com/how_to/parametric_shapes\r\n * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes\r\n * @param name defines the name of the mesh to create\r\n * @param 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\r\n * @param path is a required array of successive Vector3. This is the axis curve the shape is extruded along\r\n * @param scale is the value to scale the shape\r\n * @param rotation 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\r\n * @param cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @param 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/how_to/How_to_dynamically_morph_a_mesh#extruded-shape)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.ExtrudeShape = function (name, shape, path, scale, rotation, cap, scene, updatable, sideOrientation, instance) {\n if (scene === void 0) {\n scene = null;\n }\n\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates an custom extruded shape mesh.\r\n * The custom extrusion is a parametric shape.\r\n * It has no predefined shape. Its final shape will depend on the input parameters.\r\n * Please consider using the same method from the MeshBuilder class instead\r\n * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes\r\n * @param name defines the name of the mesh to create\r\n * @param 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\r\n * @param path is a required array of successive Vector3. This is the axis curve the shape is extruded along\r\n * @param scaleFunction is a custom Javascript function called on each path point\r\n * @param rotationFunction is a custom Javascript function called on each path point\r\n * @param ribbonCloseArray forces the extrusion underlying ribbon to close all the paths in its `pathArray`\r\n * @param ribbonClosePath forces the extrusion underlying ribbon to close its `pathArray`\r\n * @param cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @param 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/how_to/how_to_dynamically_morph_a_mesh#extruded-shape)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.ExtrudeShapeCustom = function (name, shape, path, scaleFunction, rotationFunction, ribbonCloseArray, ribbonClosePath, cap, scene, updatable, sideOrientation, instance) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates lathe mesh.\r\n * The lathe is a shape with a symetry axis : a 2D model shape is rotated around this axis to design the lathe.\r\n * Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param shape is a required array of successive Vector3. This array depicts the shape to be rotated in its local space : the shape must be designed in the xOy plane and will be rotated around the Y axis. It's usually a 2D shape, so the Vector3 z coordinates are often set to zero\r\n * @param radius is the radius value of the lathe\r\n * @param tessellation is the side number of the lathe.\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateLathe = function (name, shape, radius, tessellation, scene, updatable, sideOrientation) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a plane mesh. Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param size sets the size (float) of both sides of the plane at once (default 1)\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreatePlane = function (name, size, scene, updatable, sideOrientation) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a ground mesh.\r\n * Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param width set the width of the ground\r\n * @param height set the height of the ground\r\n * @param subdivisions sets the number of subdivisions per side\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateGround = function (name, width, height, subdivisions, scene, updatable) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a tiled ground mesh.\r\n * Please consider using the same method from the MeshBuilder class instead\r\n * @param name defines the name of the mesh to create\r\n * @param xmin set the ground minimum X coordinate\r\n * @param zmin set the ground minimum Y coordinate\r\n * @param xmax set the ground maximum X coordinate\r\n * @param zmax set the ground maximum Z coordinate\r\n * @param subdivisions is an object `{w: positive integer, h: positive integer}` (default `{w: 6, h: 6}`). `w` and `h` are the numbers of subdivisions on the ground width and height. Each subdivision is called a tile\r\n * @param precision is an object `{w: positive integer, h: positive integer}` (default `{w: 2, h: 2}`). `w` and `h` are the numbers of subdivisions on the ground width and height of each tile\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateTiledGround = function (name, xmin, zmin, xmax, zmax, subdivisions, precision, scene, updatable) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a ground mesh from a height map.\r\n * Please consider using the same method from the MeshBuilder class instead\r\n * @see https://doc.babylonjs.com/babylon101/height_map\r\n * @param name defines the name of the mesh to create\r\n * @param url sets the URL of the height map image resource\r\n * @param width set the ground width size\r\n * @param height set the ground height size\r\n * @param subdivisions sets the number of subdivision per side\r\n * @param minHeight is the minimum altitude on the ground\r\n * @param maxHeight is the maximum altitude on the ground\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param onReady is a callback function that will be called once the mesh is built (the height map download can last some time)\r\n * @param alphaFilter will filter any data where the alpha channel is below this value, defaults 0 (all data visible)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateGroundFromHeightMap = function (name, url, width, height, subdivisions, minHeight, maxHeight, scene, updatable, onReady, alphaFilter) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a tube mesh.\r\n * The tube is a parametric shape.\r\n * It has no predefined shape. Its final shape will depend on the input parameters.\r\n * Please consider using the same method from the MeshBuilder class instead\r\n * @see https://doc.babylonjs.com/how_to/parametric_shapes\r\n * @param name defines the name of the mesh to create\r\n * @param path is a required array of successive Vector3. It is the curve used as the axis of the tube\r\n * @param radius sets the tube radius size\r\n * @param tessellation is the number of sides on the tubular surface\r\n * @param radiusFunction is a custom function. If it is not null, it overwrittes the parameter `radius`. This function is called on each point of the tube path and is passed the index `i` of the i-th point and the distance of this point from the first point of the path\r\n * @param cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL\r\n * @param scene defines the hosting scene\r\n * @param updatable defines if the mesh must be flagged as updatable\r\n * @param sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation)\r\n * @param instance is an instance of an existing Tube object to be updated with the passed `pathArray` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#tube)\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateTube = function (name, path, radius, tessellation, radiusFunction, cap, scene, updatable, sideOrientation, instance) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a polyhedron mesh.\r\n * Please consider using the same method from the MeshBuilder class instead.\r\n * * The parameter `type` (positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embbeded types. Please refer to the type sheet in the tutorial to choose the wanted type\r\n * * The parameter `size` (positive float, default 1) sets the polygon size\r\n * * You can overwrite the `size` on each dimension bu using the parameters `sizeX`, `sizeY` or `sizeZ` (positive floats, default to `size` value)\r\n * * You can build other polyhedron types than the 15 embbeded ones by setting the parameter `custom` (`polyhedronObject`, default null). If you set the parameter `custom`, this overwrittes the parameter `type`\r\n * * A `polyhedronObject` is a formatted javascript object. You'll find a full file with pre-set polyhedra here : https://github.com/BabylonJS/Extensions/tree/master/Polyhedron\r\n * * You can set the color and the UV of each side of the polyhedron with the parameters `faceColors` (Color4, default `(1, 1, 1, 1)`) and faceUV (Vector4, default `(0, 0, 1, 1)`)\r\n * * To understand how to set `faceUV` or `faceColors`, please read this by considering the right number of faces of your polyhedron, instead of only 6 for the box : https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors\r\n * * The parameter `flat` (boolean, default true). If set to false, it gives the polyhedron a single global face, so less vertices and shared normals. In this case, `faceColors` and `faceUV` are ignored\r\n * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\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/babylon101/discover_basic_elements#side-orientation\r\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\r\n * @param name defines the name of the mesh to create\r\n * @param options defines the options used to create the mesh\r\n * @param scene defines the hosting scene\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreatePolyhedron = function (name, options, scene) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a sphere based upon an icosahedron with 20 triangular faces which can be subdivided\r\n * * The parameter `radius` sets the radius size (float) of the icosphere (default 1)\r\n * * You can set some different icosphere dimensions, for instance to build an ellipsoid, by using the parameters `radiusX`, `radiusY` and `radiusZ` (all by default have the same value than `radius`)\r\n * * The parameter `subdivisions` sets the number of subdivisions (postive integer, default 4). The more subdivisions, the more faces on the icosphere whatever its size\r\n * * The parameter `flat` (boolean, default true) gives each side its own normals. Set it to false to get a smooth continuous light reflection on the surface\r\n * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\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/babylon101/discover_basic_elements#side-orientation\r\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\r\n * @param name defines the name of the mesh\r\n * @param options defines the options used to create the mesh\r\n * @param scene defines the hosting scene\r\n * @returns a new Mesh\r\n * @see https://doc.babylonjs.com/how_to/polyhedra_shapes#icosphere\r\n */\n\n\n Mesh.CreateIcoSphere = function (name, options, scene) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /**\r\n * Creates a decal mesh.\r\n * Please consider using the same method from the MeshBuilder class instead.\r\n * A decal is a mesh usually applied as a model onto the surface of another mesh\r\n * @param name defines the name of the mesh\r\n * @param sourceMesh defines the mesh receiving the decal\r\n * @param position sets the position of the decal in world coordinates\r\n * @param normal sets the normal of the mesh where the decal is applied onto in world coordinates\r\n * @param size sets the decal scaling\r\n * @param angle sets the angle to rotate the decal\r\n * @returns a new Mesh\r\n */\n\n\n Mesh.CreateDecal = function (name, sourceMesh, position, normal, size, angle) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n };\n /** Creates a Capsule Mesh\r\n * @param name defines the name of the mesh.\r\n * @param options the constructors options used to shape the mesh.\r\n * @param scene defines the scene the mesh is scoped to.\r\n * @returns the capsule mesh\r\n * @see https://doc.babylonjs.com/how_to/capsule_shape\r\n */\n\n\n Mesh.CreateCapsule = function (name, options, scene) {\n throw _DevTools.WarnImport(\"MeshBuilder\");\n }; // Skeletons\n\n /**\r\n * Prepare internal position array for software CPU skinning\r\n * @returns original positions used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh\r\n */\n\n\n Mesh.prototype.setPositionsForCPUSkinning = function () {\n var internalDataInfo = this._internalMeshDataInfo;\n\n if (!internalDataInfo._sourcePositions) {\n var source = this.getVerticesData(VertexBuffer.PositionKind);\n\n if (!source) {\n return internalDataInfo._sourcePositions;\n }\n\n internalDataInfo._sourcePositions = new Float32Array(source);\n\n if (!this.isVertexBufferUpdatable(VertexBuffer.PositionKind)) {\n this.setVerticesData(VertexBuffer.PositionKind, source, true);\n }\n }\n\n return internalDataInfo._sourcePositions;\n };\n /**\r\n * Prepare internal normal array for software CPU skinning\r\n * @returns original normals used for CPU skinning. Useful for integrating Morphing with skeletons in same mesh.\r\n */\n\n\n Mesh.prototype.setNormalsForCPUSkinning = function () {\n var internalDataInfo = this._internalMeshDataInfo;\n\n if (!internalDataInfo._sourceNormals) {\n var source = this.getVerticesData(VertexBuffer.NormalKind);\n\n if (!source) {\n return internalDataInfo._sourceNormals;\n }\n\n internalDataInfo._sourceNormals = new Float32Array(source);\n\n if (!this.isVertexBufferUpdatable(VertexBuffer.NormalKind)) {\n this.setVerticesData(VertexBuffer.NormalKind, source, true);\n }\n }\n\n return internalDataInfo._sourceNormals;\n };\n /**\r\n * Updates the vertex buffer by applying transformation from the bones\r\n * @param skeleton defines the skeleton to apply to current mesh\r\n * @returns the current mesh\r\n */\n\n\n Mesh.prototype.applySkeleton = function (skeleton) {\n if (!this.geometry) {\n return this;\n }\n\n if (this.geometry._softwareSkinningFrameId == this.getScene().getFrameId()) {\n return this;\n }\n\n this.geometry._softwareSkinningFrameId = this.getScene().getFrameId();\n\n if (!this.isVerticesDataPresent(VertexBuffer.PositionKind)) {\n return this;\n }\n\n if (!this.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {\n return this;\n }\n\n if (!this.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\n return this;\n }\n\n var hasNormals = this.isVerticesDataPresent(VertexBuffer.NormalKind);\n var internalDataInfo = this._internalMeshDataInfo;\n\n if (!internalDataInfo._sourcePositions) {\n var submeshes = this.subMeshes.slice();\n this.setPositionsForCPUSkinning();\n this.subMeshes = submeshes;\n }\n\n if (hasNormals && !internalDataInfo._sourceNormals) {\n this.setNormalsForCPUSkinning();\n } // positionsData checks for not being Float32Array will only pass at most once\n\n\n var positionsData = this.getVerticesData(VertexBuffer.PositionKind);\n\n if (!positionsData) {\n return this;\n }\n\n if (!(positionsData instanceof Float32Array)) {\n positionsData = new Float32Array(positionsData);\n } // normalsData checks for not being Float32Array will only pass at most once\n\n\n var normalsData = this.getVerticesData(VertexBuffer.NormalKind);\n\n if (hasNormals) {\n if (!normalsData) {\n return this;\n }\n\n if (!(normalsData instanceof Float32Array)) {\n normalsData = new Float32Array(normalsData);\n }\n }\n\n var matricesIndicesData = this.getVerticesData(VertexBuffer.MatricesIndicesKind);\n var matricesWeightsData = this.getVerticesData(VertexBuffer.MatricesWeightsKind);\n\n if (!matricesWeightsData || !matricesIndicesData) {\n return this;\n }\n\n var needExtras = this.numBoneInfluencers > 4;\n var matricesIndicesExtraData = needExtras ? this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind) : null;\n var matricesWeightsExtraData = needExtras ? this.getVerticesData(VertexBuffer.MatricesWeightsExtraKind) : null;\n var skeletonMatrices = skeleton.getTransformMatrices(this);\n var tempVector3 = Vector3.Zero();\n var finalMatrix = new Matrix();\n var tempMatrix = new Matrix();\n var matWeightIdx = 0;\n var inf;\n\n for (var index = 0; index < positionsData.length; index += 3, matWeightIdx += 4) {\n var weight;\n\n for (inf = 0; inf < 4; inf++) {\n weight = matricesWeightsData[matWeightIdx + inf];\n\n if (weight > 0) {\n Matrix.FromFloat32ArrayToRefScaled(skeletonMatrices, Math.floor(matricesIndicesData[matWeightIdx + inf] * 16), weight, tempMatrix);\n finalMatrix.addToSelf(tempMatrix);\n }\n }\n\n if (needExtras) {\n for (inf = 0; inf < 4; inf++) {\n weight = matricesWeightsExtraData[matWeightIdx + inf];\n\n if (weight > 0) {\n Matrix.FromFloat32ArrayToRefScaled(skeletonMatrices, Math.floor(matricesIndicesExtraData[matWeightIdx + inf] * 16), weight, tempMatrix);\n finalMatrix.addToSelf(tempMatrix);\n }\n }\n }\n\n Vector3.TransformCoordinatesFromFloatsToRef(internalDataInfo._sourcePositions[index], internalDataInfo._sourcePositions[index + 1], internalDataInfo._sourcePositions[index + 2], finalMatrix, tempVector3);\n tempVector3.toArray(positionsData, index);\n\n if (hasNormals) {\n Vector3.TransformNormalFromFloatsToRef(internalDataInfo._sourceNormals[index], internalDataInfo._sourceNormals[index + 1], internalDataInfo._sourceNormals[index + 2], finalMatrix, tempVector3);\n tempVector3.toArray(normalsData, index);\n }\n\n finalMatrix.reset();\n }\n\n this.updateVerticesData(VertexBuffer.PositionKind, positionsData);\n\n if (hasNormals) {\n this.updateVerticesData(VertexBuffer.NormalKind, normalsData);\n }\n\n return this;\n }; // Tools\n\n /**\r\n * Returns an object containing a min and max Vector3 which are the minimum and maximum vectors of each mesh bounding box from the passed array, in the world coordinates\r\n * @param meshes defines the list of meshes to scan\r\n * @returns an object `{min:` Vector3`, max:` Vector3`}`\r\n */\n\n\n Mesh.MinMax = function (meshes) {\n var minVector = null;\n var maxVector = null;\n meshes.forEach(function (mesh) {\n var boundingInfo = mesh.getBoundingInfo();\n var boundingBox = boundingInfo.boundingBox;\n\n if (!minVector || !maxVector) {\n minVector = boundingBox.minimumWorld;\n maxVector = boundingBox.maximumWorld;\n } else {\n minVector.minimizeInPlace(boundingBox.minimumWorld);\n maxVector.maximizeInPlace(boundingBox.maximumWorld);\n }\n });\n\n if (!minVector || !maxVector) {\n return {\n min: Vector3.Zero(),\n max: Vector3.Zero()\n };\n }\n\n return {\n min: minVector,\n max: maxVector\n };\n };\n /**\r\n * Returns the center of the `{min:` Vector3`, max:` Vector3`}` or the center of MinMax vector3 computed from a mesh array\r\n * @param meshesOrMinMaxVector could be an array of meshes or a `{min:` Vector3`, max:` Vector3`}` object\r\n * @returns a vector3\r\n */\n\n\n Mesh.Center = function (meshesOrMinMaxVector) {\n var minMaxVector = meshesOrMinMaxVector instanceof Array ? Mesh.MinMax(meshesOrMinMaxVector) : meshesOrMinMaxVector;\n return Vector3.Center(minMaxVector.min, minMaxVector.max);\n };\n /**\r\n * Merge the array of meshes into a single mesh for performance reasons.\r\n * @param meshes defines he vertices source. They should all be of the same material. Entries can empty\r\n * @param disposeSource when true (default), dispose of the vertices from the source meshes\r\n * @param allow32BitsIndices when the sum of the vertices > 64k, this must be set to true\r\n * @param meshSubclass when set, vertices inserted into this Mesh. Meshes can then be merged into a Mesh sub-class.\r\n * @param subdivideWithSubMeshes when true (false default), subdivide mesh to his subMesh array with meshes source.\r\n * @param multiMultiMaterials when true (false default), subdivide mesh and accept multiple multi materials, ignores subdivideWithSubMeshes.\r\n * @returns a new mesh\r\n */\n\n\n Mesh.MergeMeshes = function (meshes, disposeSource, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes, multiMultiMaterials) {\n if (disposeSource === void 0) {\n disposeSource = true;\n }\n\n var index;\n\n if (!allow32BitsIndices) {\n var totalVertices = 0; // Counting vertices\n\n for (index = 0; index < meshes.length; index++) {\n if (meshes[index]) {\n totalVertices += meshes[index].getTotalVertices();\n\n if (totalVertices >= 65536) {\n Logger.Warn(\"Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices\");\n return null;\n }\n }\n }\n }\n\n if (multiMultiMaterials) {\n var newMultiMaterial = null;\n var subIndex;\n var matIndex;\n subdivideWithSubMeshes = false;\n }\n\n var materialArray = new Array();\n var materialIndexArray = new Array(); // Merge\n\n var vertexData = null;\n var otherVertexData;\n var indiceArray = new Array();\n var source = null;\n\n for (index = 0; index < meshes.length; index++) {\n if (meshes[index]) {\n var mesh = meshes[index];\n\n if (mesh.isAnInstance) {\n Logger.Warn(\"Cannot merge instance meshes.\");\n return null;\n }\n\n var wm = mesh.computeWorldMatrix(true);\n otherVertexData = VertexData.ExtractFromMesh(mesh, true, true);\n otherVertexData.transform(wm);\n\n if (vertexData) {\n vertexData.merge(otherVertexData, allow32BitsIndices);\n } else {\n vertexData = otherVertexData;\n source = mesh;\n }\n\n if (subdivideWithSubMeshes) {\n indiceArray.push(mesh.getTotalIndices());\n }\n\n if (multiMultiMaterials) {\n if (mesh.material) {\n var material = mesh.material;\n\n if (material instanceof MultiMaterial) {\n for (matIndex = 0; matIndex < material.subMaterials.length; matIndex++) {\n if (materialArray.indexOf(material.subMaterials[matIndex]) < 0) {\n materialArray.push(material.subMaterials[matIndex]);\n }\n }\n\n for (subIndex = 0; subIndex < mesh.subMeshes.length; subIndex++) {\n materialIndexArray.push(materialArray.indexOf(material.subMaterials[mesh.subMeshes[subIndex].materialIndex]));\n indiceArray.push(mesh.subMeshes[subIndex].indexCount);\n }\n } else {\n if (materialArray.indexOf(material) < 0) {\n materialArray.push(material);\n }\n\n for (subIndex = 0; subIndex < mesh.subMeshes.length; subIndex++) {\n materialIndexArray.push(materialArray.indexOf(material));\n indiceArray.push(mesh.subMeshes[subIndex].indexCount);\n }\n }\n } else {\n for (subIndex = 0; subIndex < mesh.subMeshes.length; subIndex++) {\n materialIndexArray.push(0);\n indiceArray.push(mesh.subMeshes[subIndex].indexCount);\n }\n }\n }\n }\n }\n\n source = source;\n\n if (!meshSubclass) {\n meshSubclass = new Mesh(source.name + \"_merged\", source.getScene());\n }\n\n vertexData.applyToMesh(meshSubclass); // Setting properties\n\n meshSubclass.checkCollisions = source.checkCollisions;\n meshSubclass.overrideMaterialSideOrientation = source.overrideMaterialSideOrientation; // Cleaning\n\n if (disposeSource) {\n for (index = 0; index < meshes.length; index++) {\n if (meshes[index]) {\n meshes[index].dispose();\n }\n }\n } // Subdivide\n\n\n if (subdivideWithSubMeshes || multiMultiMaterials) {\n //-- removal of global submesh\n meshSubclass.releaseSubMeshes();\n index = 0;\n var offset = 0; //-- apply subdivision according to index table\n\n while (index < indiceArray.length) {\n SubMesh.CreateFromIndices(0, offset, indiceArray[index], meshSubclass);\n offset += indiceArray[index];\n index++;\n }\n }\n\n if (multiMultiMaterials) {\n newMultiMaterial = new MultiMaterial(source.name + \"_merged\", source.getScene());\n newMultiMaterial.subMaterials = materialArray;\n\n for (subIndex = 0; subIndex < meshSubclass.subMeshes.length; subIndex++) {\n meshSubclass.subMeshes[subIndex].materialIndex = materialIndexArray[subIndex];\n }\n\n meshSubclass.material = newMultiMaterial;\n } else {\n meshSubclass.material = source.material;\n }\n\n return meshSubclass;\n };\n /** @hidden */\n\n\n Mesh.prototype.addInstance = function (instance) {\n instance._indexInSourceMeshInstanceArray = this.instances.length;\n this.instances.push(instance);\n };\n /** @hidden */\n\n\n Mesh.prototype.removeInstance = function (instance) {\n // Remove from mesh\n var index = instance._indexInSourceMeshInstanceArray;\n\n if (index != -1) {\n if (index !== this.instances.length - 1) {\n var last = this.instances[this.instances.length - 1];\n this.instances[index] = last;\n last._indexInSourceMeshInstanceArray = index;\n }\n\n instance._indexInSourceMeshInstanceArray = -1;\n this.instances.pop();\n }\n }; // Consts\n\n /**\r\n * Mesh side orientation : usually the external or front surface\r\n */\n\n\n Mesh.FRONTSIDE = VertexData.FRONTSIDE;\n /**\r\n * Mesh side orientation : usually the internal or back surface\r\n */\n\n Mesh.BACKSIDE = VertexData.BACKSIDE;\n /**\r\n * Mesh side orientation : both internal and external or front and back surfaces\r\n */\n\n Mesh.DOUBLESIDE = VertexData.DOUBLESIDE;\n /**\r\n * Mesh side orientation : by default, `FRONTSIDE`\r\n */\n\n Mesh.DEFAULTSIDE = VertexData.DEFAULTSIDE;\n /**\r\n * Mesh cap setting : no cap\r\n */\n\n Mesh.NO_CAP = 0;\n /**\r\n * Mesh cap setting : one cap at the beginning of the mesh\r\n */\n\n Mesh.CAP_START = 1;\n /**\r\n * Mesh cap setting : one cap at the end of the mesh\r\n */\n\n Mesh.CAP_END = 2;\n /**\r\n * Mesh cap setting : two caps, one at the beginning and one at the end of the mesh\r\n */\n\n Mesh.CAP_ALL = 3;\n /**\r\n * Mesh pattern setting : no flip or rotate\r\n */\n\n Mesh.NO_FLIP = 0;\n /**\r\n * Mesh pattern setting : flip (reflect in y axis) alternate tiles on each row or column\r\n */\n\n Mesh.FLIP_TILE = 1;\n /**\r\n * Mesh pattern setting : rotate (180degs) alternate tiles on each row or column\r\n */\n\n Mesh.ROTATE_TILE = 2;\n /**\r\n * Mesh pattern setting : flip (reflect in y axis) all tiles on alternate rows\r\n */\n\n Mesh.FLIP_ROW = 3;\n /**\r\n * Mesh pattern setting : rotate (180degs) all tiles on alternate rows\r\n */\n\n Mesh.ROTATE_ROW = 4;\n /**\r\n * Mesh pattern setting : flip and rotate alternate tiles on each row or column\r\n */\n\n Mesh.FLIP_N_ROTATE_TILE = 5;\n /**\r\n * Mesh pattern setting : rotate pattern and rotate\r\n */\n\n Mesh.FLIP_N_ROTATE_ROW = 6;\n /**\r\n * Mesh tile positioning : part tiles same on left/right or top/bottom\r\n */\n\n Mesh.CENTER = 0;\n /**\r\n * Mesh tile positioning : part tiles on left\r\n */\n\n Mesh.LEFT = 1;\n /**\r\n * Mesh tile positioning : part tiles on right\r\n */\n\n Mesh.RIGHT = 2;\n /**\r\n * Mesh tile positioning : part tiles on top\r\n */\n\n Mesh.TOP = 3;\n /**\r\n * Mesh tile positioning : part tiles on bottom\r\n */\n\n Mesh.BOTTOM = 4; // Statics\n\n /** @hidden */\n\n Mesh._GroundMeshParser = function (parsedMesh, scene) {\n throw _DevTools.WarnImport(\"GroundMesh\");\n };\n\n return Mesh;\n}(AbstractMesh);\n\nexport { Mesh };\n_TypeStore.RegisteredTypes[\"BABYLON.Mesh\"] = Mesh;"],"names":["_CreationDataStorage","_InstanceDataStorage","this","visibleInstances","batchCache","_InstancesBatch","instancesBufferSize","mustReturn","Array","renderSelf","hardwareInstancedRendering","_ThinInstanceDataStorage","instancesCount","matrixBuffer","matrixBufferSize","boundingVectors","worldMatrices","_InternalMeshDataInfo","_areNormalsFrozen","_source","meshMap","_preActivateId","_LODLevels","_morphTargetManager","Mesh","_super","name","scene","parent","source","doNotCloneChildren","clonePhysicsImpostor","_this","call","_internalMeshDataInfo","delayLoadState","instances","_creationDataStorage","_geometry","_instanceDataStorage","_thinInstanceDataStorage","_effectiveMaterial","_shouldGenerateFlatShading","_originalBuilderSideOrientation","DEFAULTSIDE","overrideMaterialSideOrientation","getScene","applyToMesh","useClonedMeshMap","uniqueId","_ranges","ranges","hasOwnProperty","createAnimationRange","from","to","index","metadata","clone","setEnabled","isEnabled","setPivotMatrix","getPivotMatrix","id","material","directDescendants","getDescendants","index_1","length","child","morphTargetManager","getPhysicsEngine","physicsEngine","impostor","getImpostorForPhysicsObject","physicsImpostor","particleSystems","system","emitter","refreshBoundingInfo","computeWorldMatrix","getEngine","getCaps","instancedArrays","_GetDefaultSideOrientation","orientation","FRONTSIDE","Object","defineProperty","prototype","get","_internalAbstractMeshDataInfo","_computeBonesUsingShaders","set","value","_sourcePositions","setVerticesData","slice","_sourceNormals","_markSubMeshesAsAttributesDirty","enumerable","configurable","_onBeforeRenderObservable","_onBeforeBindObservable","_onAfterRenderObservable","_onBeforeDrawObservable","callback","_onBeforeDrawObserver","onBeforeDrawObservable","remove","add","_a","_syncGeometryWithMorphTargetManager","_unIndexed","instancesData","manualUpdate","instantiateHierarchy","newParent","options","onNewNodeCreated","instance","getTotalVertices","doNotInstantiate","createInstance","position","scaling","rotationQuaternion","rotation","_i","getChildTransformNodes","getClassName","toString","fullDetails","ret","_waitingParentId","animations","i","ib","getIndices","vb","getVerticesData","_unBindEffect","getLODLevels","_sortLODLevels","sort","a","b","distance","addLODLevel","mesh","_masterMesh","level","push","getLODLevelAtDistance","internalDataInfo","removeLODLevel","splice","getLOD","camera","boundingSphere","bSphere","getBoundingInfo","distanceToCamera","centerWorld","subtract","globalPosition","onLODLevelSelection","_checkDelayState","_preActivate","_updateSubMeshesBoundingInfo","worldMatrixFromCache","undefined","kind","copyWhenShared","forceCopy","getVertexBuffer","isVerticesDataPresent","_delayInfo","indexOf","isVertexBufferUpdatable","getVerticesDataKinds","result","forEach","getTotalIndices","isReady","completeCheck","forceInstanceSupport","_b","_c","_d","_e","_f","subMeshes","engine","hasThinInstances","mat","defaultMaterial","_storeEffectOnSubMeshes","_g","effectiveMaterial","subMesh","getMaterial","isReadyForSubMesh","_h","_j","lightSources","generator","getShadowGenerator","getShadowMap","renderList","_k","_l","needAlphaBlendingForMesh","_m","_o","lod","freezeNormals","unfreezeNormals","count","overridenInstanceCount","sceneRenderId","getRenderId","_preActivateForIntermediateRendering","renderId","intermediateDefaultRenderId","_registerInstanceForRenderId","defaultRenderId","selfDefaultRenderId","_renderId","previousRenderId","isFrozen","_afterComputeWorldMatrix","doNotSyncBoundingInfo","thinInstanceRefreshBoundingInfo","_postActivate","edgesShareWithInstances","edgesRenderer","_renderingGroup","_edgesRenderers","pushNoDuplicate","customInstances","getWorldMatrix","applySkeleton","_boundingInfo","isLocked","bias","geometry","boundingBias","_refreshBoundingInfo","_getPositionData","_createGlobalSubMesh","force","totalVertices","totalIndices","needToRecreate","submesh","indexStart","indexCount","verticesStart","verticesCount","releaseSubMeshes","subdivide","subdivisionSize","offset","synchronizeInstances","data","updatable","stride","vertexData","removeVerticesData","markVerticesDataAsUpdatable","isUpdatable","setVerticesBuffer","buffer","updateVerticesData","updateExtends","makeItUnique","makeGeometryUnique","updateMeshPositions","positionFunction","computeNormals","positions","indices","normals","meshes","oldGeometry","copy","releaseForMesh","setIndices","updateIndices","gpuMemoryOnly","toLeftHanded","_bind","effect","fillMode","indexToBind","_getLinesIndexBuffer","getIndexBuffer","_draw","getVertexBuffers","notifyObservers","drawArraysType","drawElementsType","_linesIndexCount","registerBeforeRender","func","onBeforeRenderObservable","unregisterBeforeRender","removeCallback","registerAfterRender","onAfterRenderObservable","unregisterAfterRender","_getInstancesRenderList","subMeshId","isReplacementMode","previousBatch","isInIntermediateRendering","_isInIntermediateRendering","onlyForInstances","_onlyForInstancesIntermediate","_onlyForInstances","isVisible","currentRenderId","_renderWithInstances","batch","_id","instanceStorage","currentInstancesBufferSize","instancesBuffer","bufferSize","Float32Array","needUpdateBuffer","world","_effectiveMesh","copyToArray","instanceIndex","dispose","createVertexBuffer","updateDirectly","_processInstancedBuffers","_activeIndices","addCount","unbindInstanceAttributes","_renderWithThinInstances","_processRendering","renderingMesh","onBeforeDraw","getRenderingMesh","instanceCount","visibleInstancesForSubMesh","visibleInstanceCount","_rebuild","_freeze","_unFreeze","render","enableAlphaMode","effectiveMeshReplacement","_isActiveIntermediate","_isActive","_checkOcclusionQuery","instanceDataStorage","setAlphaMode","alphaMode","getEffect","_beforeRenderingMeshStage","action","sideOrientation","effectiveMesh","backFaceCulling","mainDeterminant","_getWorldMatrixDeterminant","reverse","_preBind","forceDepthWrite","setDepthWrite","forcePointsCloud","forceWireframe","bindForSubMesh","bind","separateCullingPass","setState","zOffset","_onBeforeDraw","unbind","_afterRenderingMeshStage","isInstance","bindOnlyWorldMatrix","cleanMatrixWeights","normalizeSkinWeightsAndExtra","normalizeSkinFourWeights","matricesWeights","numWeights","t","recip","matricesWeightsExtra","validateSkinning","skeleton","skinned","valid","report","numberNotSorted","missingWeights","maxUsedWeights","numberNotNormalized","numInfluences","usedWeightCounts","lastWeight","usedWeights","d","tolerance","Math","abs","numBones","bones","matricesIndices","matricesIndicesExtra","numBadBoneIndices","load","_queueLoad","_addPendingData","getBinaryData","delayLoadingFile","ArrayBuffer","_delayLoadingFunction","JSON","parse","_syncSubMeshes","_removePendingData","offlineProvider","isInFrustum","frustumPlanes","setMaterialByID","materials","multiMaterials","getAnimatables","results","bakeTransformIntoVertices","transform","submeshes","_resetPointsArrayCache","temp","toArray","normalize","m","flipFaces","bakeCurrentTransformIntoVertices","bakeIndependenlyOfChildren","resetLocalMatrix","_positions","_generatePointsArray","doNotRecurse","disposeMaterialAndTextures","clear","_scene","meshes_1","_disposeInstanceSpecificData","_disposeThinInstanceSpecificData","applyDisplacementMap","url","minHeight","maxHeight","onSuccess","uvOffset","uvScale","forceUpdate","img","heightMapWidth","width","heightMapHeight","height","context","getContext","drawImage","getImageData","applyDisplacementMapFromBuffer","uvs","normal","uv","pos","x","y","gradient","scaleInPlace","convertToFlatShadedMesh","kindIndex","kinds","vbs","newdata","updatableNormals","vertexBuffer","getData","previousSubmeshes","vertexIndex","getStrideSize","p1","p2","p3","p1p2","p3p2","localIndex","z","submeshIndex","previousOne","materialIndex","convertToUnIndexedMesh","flipNormals","vertex_data","increaseVertices","numberPerEdge","currentIndices","segments","tempIndices","len","deltaPosition","deltaNormal","deltaUV","side","positionPtr","uvPtr","j","k","idx","forceSharedVertices","currentUVs","currentPositions","currentColors","colors","ptr","facet","pstring","indexPtr","uniquePositions","_instancedMeshFactory","_PhysicsImpostorParser","physicObject","jsonObject","others_1","other","optimizeIndices","successCallback","vectorPositions","dupes","iteration","realPos","testedPosition","againstPosition","equals","originalSubMeshes","serialize","serializationObject","type","tags","asArray","_postMultiplyPivotMatrix","pivotMatrix","localMatrix","infiniteDistance","pickable","isPickable","receiveShadows","billboardMode","visibility","checkCollisions","isBlocker","parentId","isUnIndexed","geometryId","subIndex","doNotSerialize","materialId","morphTargetManagerId","skeletonId","numBoneInfluencers","_getComponent","getPhysicsImpostor","physicsMass","getParam","physicsFriction","physicsRestitution","serializationInstance","serializeAnimationRanges","matrixData","thinInstances","_userThinInstanceBuffersStorage","userThinInstance","sizes","strides","layerMask","alphaIndex","hasVertexAlpha","overlayAlpha","overlayColor","renderOverlay","applyFog","actionManager","actions","vertexCount","numInfluencers","morphTarget","getActiveTarget","getPositions","getNormals","tangents","getTangents","getUVs","Parse","parsedMesh","rootUrl","_GroundMeshParser","setPreTransformMatrix","showBoundingBox","showSubMeshesBoundingBox","useFlatShading","freezeWorldMatrix","_waitingData","boundingBoxMinimum","boundingBoxMaximum","_binaryInfo","hasUVs","hasUVs2","hasUVs3","hasUVs4","hasUVs5","hasUVs6","hasColors","hasMatricesIndices","hasMatricesWeights","getMorphTargetManagerById","getLastSkeletonByID","animationIndex","parsedAnimation","internalClass","N","autoAnimate","beginAnimation","autoAnimateFrom","autoAnimateTo","autoAnimateLoop","autoAnimateSpeed","isNaN","parseInt","lodMeshIds","lods","ids","distances","lodDistances","coverages","lodCoverages","parsedInstance","thinInstanceSetBuffer","CreateRibbon","pathArray","closeArray","closePath","CreateDisc","radius","tessellation","CreateBox","size","CreateSphere","diameter","CreateHemisphere","CreateCylinder","diameterTop","diameterBottom","subdivisions","CreateTorus","thickness","CreateTorusKnot","tube","radialSegments","tubularSegments","p","q","CreateLines","points","CreateDashedLines","dashSize","gapSize","dashNb","CreatePolygon","shape","holes","earcutInjection","earcut","ExtrudePolygon","depth","ExtrudeShape","path","scale","cap","ExtrudeShapeCustom","scaleFunction","rotationFunction","ribbonCloseArray","ribbonClosePath","CreateLathe","CreatePlane","CreateGround","CreateTiledGround","xmin","zmin","xmax","zmax","precision","CreateGroundFromHeightMap","onReady","alphaFilter","CreateTube","radiusFunction","CreatePolyhedron","CreateIcoSphere","CreateDecal","sourceMesh","angle","CreateCapsule","setPositionsForCPUSkinning","setNormalsForCPUSkinning","_softwareSkinningFrameId","getFrameId","hasNormals","positionsData","normalsData","matricesIndicesData","matricesWeightsData","inf","needExtras","matricesIndicesExtraData","matricesWeightsExtraData","skeletonMatrices","getTransformMatrices","tempVector3","finalMatrix","tempMatrix","matWeightIdx","weight","floor","addToSelf","reset","MinMax","minVector","maxVector","boundingBox","minimizeInPlace","minimumWorld","maximizeInPlace","maximumWorld","min","max","Center","meshesOrMinMaxVector","minMaxVector","MergeMeshes","disposeSource","allow32BitsIndices","meshSubclass","subdivideWithSubMeshes","multiMultiMaterials","matIndex","newMultiMaterial","otherVertexData","materialArray","materialIndexArray","indiceArray","isAnInstance","wm","merge","subMaterials","addInstance","_indexInSourceMeshInstanceArray","removeInstance","last","pop","BACKSIDE","DOUBLESIDE","NO_CAP","CAP_START","CAP_END","CAP_ALL","NO_FLIP","FLIP_TILE","ROTATE_TILE","FLIP_ROW","ROTATE_ROW","FLIP_N_ROTATE_TILE","FLIP_N_ROTATE_ROW","CENTER","LEFT","RIGHT","TOP","BOTTOM"],"sourceRoot":""}