40aec8efbbb42798e097e2923a59a7317d4ae23c167476e1f9221afc70bdad4c.json 51 KB

1
  1. {"ast":null,"code":"import { Mesh } from \"../Meshes/mesh.js\";\nimport { VertexBuffer, Buffer } from \"../Buffers/buffer.js\";\nimport { Matrix, Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { BoundingInfo } from \"../Culling/boundingInfo.js\";\nMesh.prototype.thinInstanceAdd = function (matrix, refresh = true) {\n if (!this.getScene().getEngine().getCaps().instancedArrays) {\n Logger.Error(\"Thin Instances are not supported on this device as Instanced Array extension not supported\");\n return -1;\n }\n this._thinInstanceUpdateBufferSize(\"matrix\", Array.isArray(matrix) ? matrix.length : 1);\n const index = this._thinInstanceDataStorage.instancesCount;\n if (Array.isArray(matrix)) {\n for (let i = 0; i < matrix.length; ++i) {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix[i], i === matrix.length - 1 && refresh);\n }\n } else {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix, refresh);\n }\n return index;\n};\nMesh.prototype.thinInstanceAddSelf = function (refresh = true) {\n return this.thinInstanceAdd(Matrix.IdentityReadOnly, refresh);\n};\nMesh.prototype.thinInstanceRegisterAttribute = function (kind, stride) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n this.removeVerticesData(kind);\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = stride * Math.max(32, this._thinInstanceDataStorage.instancesCount); // Initial size\n this._userThinInstanceBuffersStorage.data[kind] = new Float32Array(this._userThinInstanceBuffersStorage.sizes[kind]);\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userThinInstanceBuffersStorage.data[kind], kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n};\nMesh.prototype.thinInstanceSetMatrixAt = function (index, matrix, refresh = true) {\n if (!this._thinInstanceDataStorage.matrixData || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n matrix.copyToArray(matrixData, index * 16);\n if (this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices[index] = matrix;\n }\n if (refresh) {\n this.thinInstanceBufferUpdated(\"matrix\");\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n return true;\n};\nMesh.prototype.thinInstanceSetAttributeAt = function (kind, index, value, refresh = true) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.data[kind] || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n this._thinInstanceUpdateBufferSize(kind, 0); // make sur the buffer for the kind attribute is big enough\n this._userThinInstanceBuffersStorage.data[kind].set(value, index * this._userThinInstanceBuffersStorage.strides[kind]);\n if (refresh) {\n this.thinInstanceBufferUpdated(kind);\n }\n return true;\n};\nObject.defineProperty(Mesh.prototype, \"thinInstanceCount\", {\n get: function () {\n return this._thinInstanceDataStorage.instancesCount;\n },\n set: function (value) {\n var _this$_thinInstanceDa, _this$source;\n const matrixData = (_this$_thinInstanceDa = this._thinInstanceDataStorage.matrixData) !== null && _this$_thinInstanceDa !== void 0 ? _this$_thinInstanceDa : (_this$source = this.source) === null || _this$source === void 0 ? void 0 : _this$source._thinInstanceDataStorage.matrixData;\n const numMaxInstances = matrixData ? matrixData.length / 16 : 0;\n if (value <= numMaxInstances) {\n this._thinInstanceDataStorage.instancesCount = value;\n }\n },\n enumerable: true,\n configurable: true\n});\nMesh.prototype._thinInstanceCreateMatrixBuffer = function (kind, buffer, staticBuffer = true) {\n const matrixBuffer = new Buffer(this.getEngine(), buffer, !staticBuffer, 16, false, true);\n for (let i = 0; i < 4; i++) {\n this.setVerticesBuffer(matrixBuffer.createVertexBuffer(kind + i, i * 4, 4));\n }\n return matrixBuffer;\n};\nMesh.prototype.thinInstanceSetBuffer = function (kind, buffer, stride = 0, staticBuffer = true) {\n stride = stride || 16;\n if (kind === \"matrix\") {\n var _this$_thinInstanceDa2;\n (_this$_thinInstanceDa2 = this._thinInstanceDataStorage.matrixBuffer) === null || _this$_thinInstanceDa2 === void 0 || _this$_thinInstanceDa2.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n this._thinInstanceDataStorage.matrixBufferSize = buffer ? buffer.length : 32 * stride;\n this._thinInstanceDataStorage.matrixData = buffer;\n this._thinInstanceDataStorage.worldMatrices = null;\n if (buffer !== null) {\n this._thinInstanceDataStorage.instancesCount = buffer.length / stride;\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", buffer, staticBuffer);\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n } else {\n this._thinInstanceDataStorage.instancesCount = 0;\n if (!this.doNotSyncBoundingInfo) {\n // mesh has no more thin instances, so need to recompute the bounding box because it's the regular mesh that will now be displayed\n this.refreshBoundingInfo();\n }\n }\n } else if (kind === \"previousMatrix\") {\n var _this$_thinInstanceDa3;\n (_this$_thinInstanceDa3 = this._thinInstanceDataStorage.previousMatrixBuffer) === null || _this$_thinInstanceDa3 === void 0 || _this$_thinInstanceDa3.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = null;\n this._thinInstanceDataStorage.previousMatrixData = buffer;\n if (buffer !== null) {\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", buffer, staticBuffer);\n }\n } else {\n // color for instanced mesh is ColorInstanceKind and not ColorKind because of native that needs to do the differenciation\n // hot switching kind here to preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (buffer === null) {\n var _this$_userThinInstan;\n if ((_this$_userThinInstan = this._userThinInstanceBuffersStorage) !== null && _this$_userThinInstan !== void 0 && _this$_userThinInstan.data[kind]) {\n this.removeVerticesData(kind);\n delete this._userThinInstanceBuffersStorage.data[kind];\n delete this._userThinInstanceBuffersStorage.strides[kind];\n delete this._userThinInstanceBuffersStorage.sizes[kind];\n delete this._userThinInstanceBuffersStorage.vertexBuffers[kind];\n }\n } else {\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.data[kind] = buffer;\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = buffer.length;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), buffer, kind, !staticBuffer, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype.thinInstanceBufferUpdated = function (kind) {\n if (kind === \"matrix\") {\n var _this$_thinInstanceDa4;\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation && this._thinInstanceDataStorage.matrixBuffer && !this._thinInstanceDataStorage.matrixBuffer.isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n (_this$_thinInstanceDa4 = this._thinInstanceDataStorage.matrixBuffer) === null || _this$_thinInstanceDa4 === void 0 || _this$_thinInstanceDa4.updateDirectly(this._thinInstanceDataStorage.matrixData, 0, this._thinInstanceDataStorage.instancesCount);\n } else if (kind === \"previousMatrix\") {\n var _this$_thinInstanceDa5;\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation && this._thinInstanceDataStorage.previousMatrixBuffer && !this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n (_this$_thinInstanceDa5 = this._thinInstanceDataStorage.previousMatrixBuffer) === null || _this$_thinInstanceDa5 === void 0 || _this$_thinInstanceDa5.updateDirectly(this._thinInstanceDataStorage.previousMatrixData, 0, this._thinInstanceDataStorage.instancesCount);\n } else {\n var _this$_userThinInstan2;\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if ((_this$_userThinInstan2 = this._userThinInstanceBuffersStorage) !== null && _this$_userThinInstan2 !== void 0 && _this$_userThinInstan2.vertexBuffers[kind]) {\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation && !this._userThinInstanceBuffersStorage.vertexBuffers[kind].isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(this._userThinInstanceBuffersStorage.data[kind], 0);\n }\n }\n};\nMesh.prototype.thinInstancePartialBufferUpdate = function (kind, data, offset) {\n if (kind === \"matrix\") {\n if (this._thinInstanceDataStorage.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.updateDirectly(data, offset);\n }\n } else {\n var _this$_userThinInstan3;\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if ((_this$_userThinInstan3 = this._userThinInstanceBuffersStorage) !== null && _this$_userThinInstan3 !== void 0 && _this$_userThinInstan3.vertexBuffers[kind]) {\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(data, offset);\n }\n }\n};\nMesh.prototype.thinInstanceGetWorldMatrices = function () {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return [];\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (!this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices = [];\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n this._thinInstanceDataStorage.worldMatrices[i] = Matrix.FromArray(matrixData, i * 16);\n }\n }\n return this._thinInstanceDataStorage.worldMatrices;\n};\nMesh.prototype.thinInstanceRefreshBoundingInfo = function (forceRefreshParentInfo = false, applySkeleton = false, applyMorph = false) {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return;\n }\n const vectors = this._thinInstanceDataStorage.boundingVectors;\n if (forceRefreshParentInfo || !this.rawBoundingInfo) {\n vectors.length = 0;\n this.refreshBoundingInfo(applySkeleton, applyMorph);\n const boundingInfo = this.getBoundingInfo();\n this.rawBoundingInfo = new BoundingInfo(boundingInfo.minimum, boundingInfo.maximum);\n }\n const boundingInfo = this.getBoundingInfo();\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (vectors.length === 0) {\n for (let v = 0; v < boundingInfo.boundingBox.vectors.length; ++v) {\n vectors.push(boundingInfo.boundingBox.vectors[v].clone());\n }\n }\n TmpVectors.Vector3[0].setAll(Number.POSITIVE_INFINITY); // min\n TmpVectors.Vector3[1].setAll(Number.NEGATIVE_INFINITY); // max\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n Matrix.FromArrayToRef(matrixData, i * 16, TmpVectors.Matrix[0]);\n for (let v = 0; v < vectors.length; ++v) {\n Vector3.TransformCoordinatesToRef(vectors[v], TmpVectors.Matrix[0], TmpVectors.Vector3[2]);\n TmpVectors.Vector3[0].minimizeInPlace(TmpVectors.Vector3[2]);\n TmpVectors.Vector3[1].maximizeInPlace(TmpVectors.Vector3[2]);\n }\n }\n boundingInfo.reConstruct(TmpVectors.Vector3[0], TmpVectors.Vector3[1]);\n this._updateBoundingInfo();\n};\nMesh.prototype._thinInstanceRecreateBuffer = function (kind, staticBuffer = true) {\n if (kind === \"matrix\") {\n var _this$_thinInstanceDa6;\n (_this$_thinInstanceDa6 = this._thinInstanceDataStorage.matrixBuffer) === null || _this$_thinInstanceDa6 === void 0 || _this$_thinInstanceDa6.dispose();\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", this._thinInstanceDataStorage.matrixData, staticBuffer);\n } else if (kind === \"previousMatrix\") {\n if (this._scene.needsPreviousWorldMatrices) {\n var _this$_thinInstanceDa7, _this$_thinInstanceDa8;\n (_this$_thinInstanceDa7 = this._thinInstanceDataStorage.previousMatrixBuffer) === null || _this$_thinInstanceDa7 === void 0 || _this$_thinInstanceDa7.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", (_this$_thinInstanceDa8 = this._thinInstanceDataStorage.previousMatrixData) !== null && _this$_thinInstanceDa8 !== void 0 ? _this$_thinInstanceDa8 : this._thinInstanceDataStorage.matrixData, staticBuffer);\n }\n } else {\n var _this$_userThinInstan4;\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n (_this$_userThinInstan4 = this._userThinInstanceBuffersStorage.vertexBuffers[kind]) === null || _this$_userThinInstan4 === void 0 || _this$_userThinInstan4.dispose();\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userThinInstanceBuffersStorage.data[kind], kind, !staticBuffer, false, this._userThinInstanceBuffersStorage.strides[kind], true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n};\nMesh.prototype._thinInstanceUpdateBufferSize = function (kind, numInstances = 1) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n const kindIsMatrix = kind === \"matrix\";\n if (!kindIsMatrix && (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.strides[kind])) {\n return;\n }\n const stride = kindIsMatrix ? 16 : this._userThinInstanceBuffersStorage.strides[kind];\n const currentSize = kindIsMatrix ? this._thinInstanceDataStorage.matrixBufferSize : this._userThinInstanceBuffersStorage.sizes[kind];\n let data = kindIsMatrix ? this._thinInstanceDataStorage.matrixData : this._userThinInstanceBuffersStorage.data[kind];\n const bufferSize = (this._thinInstanceDataStorage.instancesCount + numInstances) * stride;\n let newSize = currentSize;\n while (newSize < bufferSize) {\n newSize *= 2;\n }\n if (!data || currentSize != newSize) {\n if (!data) {\n data = new Float32Array(newSize);\n } else {\n const newData = new Float32Array(newSize);\n newData.set(data, 0);\n data = newData;\n }\n if (kindIsMatrix) {\n var _this$_thinInstanceDa9;\n (_this$_thinInstanceDa9 = this._thinInstanceDataStorage.matrixBuffer) === null || _this$_thinInstanceDa9 === void 0 || _this$_thinInstanceDa9.dispose();\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", data, false);\n this._thinInstanceDataStorage.matrixData = data;\n this._thinInstanceDataStorage.matrixBufferSize = newSize;\n if (this._scene.needsPreviousWorldMatrices && !this._thinInstanceDataStorage.previousMatrixData) {\n var _this$_thinInstanceDa10;\n (_this$_thinInstanceDa10 = this._thinInstanceDataStorage.previousMatrixBuffer) === null || _this$_thinInstanceDa10 === void 0 || _this$_thinInstanceDa10.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", data, false);\n }\n } else {\n var _this$_userThinInstan5;\n (_this$_userThinInstan5 = this._userThinInstanceBuffersStorage.vertexBuffers[kind]) === null || _this$_userThinInstan5 === void 0 || _this$_userThinInstan5.dispose();\n this._userThinInstanceBuffersStorage.data[kind] = data;\n this._userThinInstanceBuffersStorage.sizes[kind] = newSize;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), data, kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype._thinInstanceInitializeUserStorage = function () {\n if (!this._userThinInstanceBuffersStorage) {\n this._userThinInstanceBuffersStorage = {\n data: {},\n sizes: {},\n vertexBuffers: {},\n strides: {}\n };\n }\n};\nMesh.prototype._disposeThinInstanceSpecificData = function () {\n var _this$_thinInstanceDa11;\n if ((_this$_thinInstanceDa11 = this._thinInstanceDataStorage) !== null && _this$_thinInstanceDa11 !== void 0 && _this$_thinInstanceDa11.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n }\n};","map":{"version":3,"names":["Mesh","VertexBuffer","Buffer","Matrix","Vector3","TmpVectors","Logger","BoundingInfo","prototype","thinInstanceAdd","matrix","refresh","getScene","getEngine","getCaps","instancedArrays","Error","_thinInstanceUpdateBufferSize","Array","isArray","length","index","_thinInstanceDataStorage","instancesCount","i","thinInstanceSetMatrixAt","thinInstanceAddSelf","IdentityReadOnly","thinInstanceRegisterAttribute","kind","stride","ColorKind","ColorInstanceKind","removeVerticesData","_thinInstanceInitializeUserStorage","_userThinInstanceBuffersStorage","strides","sizes","Math","max","data","Float32Array","vertexBuffers","setVerticesBuffer","matrixData","copyToArray","worldMatrices","thinInstanceBufferUpdated","doNotSyncBoundingInfo","thinInstanceRefreshBoundingInfo","thinInstanceSetAttributeAt","value","set","Object","defineProperty","get","_this$_thinInstanceDa","_this$source","source","numMaxInstances","enumerable","configurable","_thinInstanceCreateMatrixBuffer","buffer","staticBuffer","matrixBuffer","createVertexBuffer","thinInstanceSetBuffer","_this$_thinInstanceDa2","dispose","matrixBufferSize","refreshBoundingInfo","_this$_thinInstanceDa3","previousMatrixBuffer","previousMatrixData","_this$_userThinInstan","_this$_thinInstanceDa4","thinInstanceAllowAutomaticStaticBufferRecreation","isUpdatable","_thinInstanceRecreateBuffer","updateDirectly","_this$_thinInstanceDa5","_this$_userThinInstan2","thinInstancePartialBufferUpdate","offset","_this$_userThinInstan3","thinInstanceGetWorldMatrices","FromArray","forceRefreshParentInfo","applySkeleton","applyMorph","vectors","boundingVectors","rawBoundingInfo","boundingInfo","getBoundingInfo","minimum","maximum","v","boundingBox","push","clone","setAll","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","FromArrayToRef","TransformCoordinatesToRef","minimizeInPlace","maximizeInPlace","reConstruct","_updateBoundingInfo","_this$_thinInstanceDa6","_scene","needsPreviousWorldMatrices","_this$_thinInstanceDa7","_this$_thinInstanceDa8","_this$_userThinInstan4","numInstances","kindIsMatrix","currentSize","bufferSize","newSize","newData","_this$_thinInstanceDa9","_this$_thinInstanceDa10","_this$_userThinInstan5","_disposeThinInstanceSpecificData","_this$_thinInstanceDa11"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Meshes/thinInstanceMesh.js"],"sourcesContent":["import { Mesh } from \"../Meshes/mesh.js\";\nimport { VertexBuffer, Buffer } from \"../Buffers/buffer.js\";\nimport { Matrix, Vector3, TmpVectors } from \"../Maths/math.vector.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { BoundingInfo } from \"../Culling/boundingInfo.js\";\nMesh.prototype.thinInstanceAdd = function (matrix, refresh = true) {\n if (!this.getScene().getEngine().getCaps().instancedArrays) {\n Logger.Error(\"Thin Instances are not supported on this device as Instanced Array extension not supported\");\n return -1;\n }\n this._thinInstanceUpdateBufferSize(\"matrix\", Array.isArray(matrix) ? matrix.length : 1);\n const index = this._thinInstanceDataStorage.instancesCount;\n if (Array.isArray(matrix)) {\n for (let i = 0; i < matrix.length; ++i) {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix[i], i === matrix.length - 1 && refresh);\n }\n }\n else {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix, refresh);\n }\n return index;\n};\nMesh.prototype.thinInstanceAddSelf = function (refresh = true) {\n return this.thinInstanceAdd(Matrix.IdentityReadOnly, refresh);\n};\nMesh.prototype.thinInstanceRegisterAttribute = function (kind, stride) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n this.removeVerticesData(kind);\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = stride * Math.max(32, this._thinInstanceDataStorage.instancesCount); // Initial size\n this._userThinInstanceBuffersStorage.data[kind] = new Float32Array(this._userThinInstanceBuffersStorage.sizes[kind]);\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userThinInstanceBuffersStorage.data[kind], kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n};\nMesh.prototype.thinInstanceSetMatrixAt = function (index, matrix, refresh = true) {\n if (!this._thinInstanceDataStorage.matrixData || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n matrix.copyToArray(matrixData, index * 16);\n if (this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices[index] = matrix;\n }\n if (refresh) {\n this.thinInstanceBufferUpdated(\"matrix\");\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n return true;\n};\nMesh.prototype.thinInstanceSetAttributeAt = function (kind, index, value, refresh = true) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.data[kind] || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n this._thinInstanceUpdateBufferSize(kind, 0); // make sur the buffer for the kind attribute is big enough\n this._userThinInstanceBuffersStorage.data[kind].set(value, index * this._userThinInstanceBuffersStorage.strides[kind]);\n if (refresh) {\n this.thinInstanceBufferUpdated(kind);\n }\n return true;\n};\nObject.defineProperty(Mesh.prototype, \"thinInstanceCount\", {\n get: function () {\n return this._thinInstanceDataStorage.instancesCount;\n },\n set: function (value) {\n const matrixData = this._thinInstanceDataStorage.matrixData ?? this.source?._thinInstanceDataStorage.matrixData;\n const numMaxInstances = matrixData ? matrixData.length / 16 : 0;\n if (value <= numMaxInstances) {\n this._thinInstanceDataStorage.instancesCount = value;\n }\n },\n enumerable: true,\n configurable: true,\n});\nMesh.prototype._thinInstanceCreateMatrixBuffer = function (kind, buffer, staticBuffer = true) {\n const matrixBuffer = new Buffer(this.getEngine(), buffer, !staticBuffer, 16, false, true);\n for (let i = 0; i < 4; i++) {\n this.setVerticesBuffer(matrixBuffer.createVertexBuffer(kind + i, i * 4, 4));\n }\n return matrixBuffer;\n};\nMesh.prototype.thinInstanceSetBuffer = function (kind, buffer, stride = 0, staticBuffer = true) {\n stride = stride || 16;\n if (kind === \"matrix\") {\n this._thinInstanceDataStorage.matrixBuffer?.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n this._thinInstanceDataStorage.matrixBufferSize = buffer ? buffer.length : 32 * stride;\n this._thinInstanceDataStorage.matrixData = buffer;\n this._thinInstanceDataStorage.worldMatrices = null;\n if (buffer !== null) {\n this._thinInstanceDataStorage.instancesCount = buffer.length / stride;\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", buffer, staticBuffer);\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n else {\n this._thinInstanceDataStorage.instancesCount = 0;\n if (!this.doNotSyncBoundingInfo) {\n // mesh has no more thin instances, so need to recompute the bounding box because it's the regular mesh that will now be displayed\n this.refreshBoundingInfo();\n }\n }\n }\n else if (kind === \"previousMatrix\") {\n this._thinInstanceDataStorage.previousMatrixBuffer?.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = null;\n this._thinInstanceDataStorage.previousMatrixData = buffer;\n if (buffer !== null) {\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", buffer, staticBuffer);\n }\n }\n else {\n // color for instanced mesh is ColorInstanceKind and not ColorKind because of native that needs to do the differenciation\n // hot switching kind here to preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (buffer === null) {\n if (this._userThinInstanceBuffersStorage?.data[kind]) {\n this.removeVerticesData(kind);\n delete this._userThinInstanceBuffersStorage.data[kind];\n delete this._userThinInstanceBuffersStorage.strides[kind];\n delete this._userThinInstanceBuffersStorage.sizes[kind];\n delete this._userThinInstanceBuffersStorage.vertexBuffers[kind];\n }\n }\n else {\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.data[kind] = buffer;\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = buffer.length;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), buffer, kind, !staticBuffer, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype.thinInstanceBufferUpdated = function (kind) {\n if (kind === \"matrix\") {\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation && this._thinInstanceDataStorage.matrixBuffer && !this._thinInstanceDataStorage.matrixBuffer.isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._thinInstanceDataStorage.matrixData, 0, this._thinInstanceDataStorage.instancesCount);\n }\n else if (kind === \"previousMatrix\") {\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation &&\n this._thinInstanceDataStorage.previousMatrixBuffer &&\n !this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n this._thinInstanceDataStorage.previousMatrixBuffer?.updateDirectly(this._thinInstanceDataStorage.previousMatrixData, 0, this._thinInstanceDataStorage.instancesCount);\n }\n else {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (this._userThinInstanceBuffersStorage?.vertexBuffers[kind]) {\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation && !this._userThinInstanceBuffersStorage.vertexBuffers[kind].isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(this._userThinInstanceBuffersStorage.data[kind], 0);\n }\n }\n};\nMesh.prototype.thinInstancePartialBufferUpdate = function (kind, data, offset) {\n if (kind === \"matrix\") {\n if (this._thinInstanceDataStorage.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.updateDirectly(data, offset);\n }\n }\n else {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (this._userThinInstanceBuffersStorage?.vertexBuffers[kind]) {\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(data, offset);\n }\n }\n};\nMesh.prototype.thinInstanceGetWorldMatrices = function () {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return [];\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (!this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices = [];\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n this._thinInstanceDataStorage.worldMatrices[i] = Matrix.FromArray(matrixData, i * 16);\n }\n }\n return this._thinInstanceDataStorage.worldMatrices;\n};\nMesh.prototype.thinInstanceRefreshBoundingInfo = function (forceRefreshParentInfo = false, applySkeleton = false, applyMorph = false) {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return;\n }\n const vectors = this._thinInstanceDataStorage.boundingVectors;\n if (forceRefreshParentInfo || !this.rawBoundingInfo) {\n vectors.length = 0;\n this.refreshBoundingInfo(applySkeleton, applyMorph);\n const boundingInfo = this.getBoundingInfo();\n this.rawBoundingInfo = new BoundingInfo(boundingInfo.minimum, boundingInfo.maximum);\n }\n const boundingInfo = this.getBoundingInfo();\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (vectors.length === 0) {\n for (let v = 0; v < boundingInfo.boundingBox.vectors.length; ++v) {\n vectors.push(boundingInfo.boundingBox.vectors[v].clone());\n }\n }\n TmpVectors.Vector3[0].setAll(Number.POSITIVE_INFINITY); // min\n TmpVectors.Vector3[1].setAll(Number.NEGATIVE_INFINITY); // max\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n Matrix.FromArrayToRef(matrixData, i * 16, TmpVectors.Matrix[0]);\n for (let v = 0; v < vectors.length; ++v) {\n Vector3.TransformCoordinatesToRef(vectors[v], TmpVectors.Matrix[0], TmpVectors.Vector3[2]);\n TmpVectors.Vector3[0].minimizeInPlace(TmpVectors.Vector3[2]);\n TmpVectors.Vector3[1].maximizeInPlace(TmpVectors.Vector3[2]);\n }\n }\n boundingInfo.reConstruct(TmpVectors.Vector3[0], TmpVectors.Vector3[1]);\n this._updateBoundingInfo();\n};\nMesh.prototype._thinInstanceRecreateBuffer = function (kind, staticBuffer = true) {\n if (kind === \"matrix\") {\n this._thinInstanceDataStorage.matrixBuffer?.dispose();\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", this._thinInstanceDataStorage.matrixData, staticBuffer);\n }\n else if (kind === \"previousMatrix\") {\n if (this._scene.needsPreviousWorldMatrices) {\n this._thinInstanceDataStorage.previousMatrixBuffer?.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", this._thinInstanceDataStorage.previousMatrixData ?? this._thinInstanceDataStorage.matrixData, staticBuffer);\n }\n }\n else {\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n this._userThinInstanceBuffersStorage.vertexBuffers[kind]?.dispose();\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userThinInstanceBuffersStorage.data[kind], kind, !staticBuffer, false, this._userThinInstanceBuffersStorage.strides[kind], true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n};\nMesh.prototype._thinInstanceUpdateBufferSize = function (kind, numInstances = 1) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n const kindIsMatrix = kind === \"matrix\";\n if (!kindIsMatrix && (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.strides[kind])) {\n return;\n }\n const stride = kindIsMatrix ? 16 : this._userThinInstanceBuffersStorage.strides[kind];\n const currentSize = kindIsMatrix ? this._thinInstanceDataStorage.matrixBufferSize : this._userThinInstanceBuffersStorage.sizes[kind];\n let data = kindIsMatrix ? this._thinInstanceDataStorage.matrixData : this._userThinInstanceBuffersStorage.data[kind];\n const bufferSize = (this._thinInstanceDataStorage.instancesCount + numInstances) * stride;\n let newSize = currentSize;\n while (newSize < bufferSize) {\n newSize *= 2;\n }\n if (!data || currentSize != newSize) {\n if (!data) {\n data = new Float32Array(newSize);\n }\n else {\n const newData = new Float32Array(newSize);\n newData.set(data, 0);\n data = newData;\n }\n if (kindIsMatrix) {\n this._thinInstanceDataStorage.matrixBuffer?.dispose();\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", data, false);\n this._thinInstanceDataStorage.matrixData = data;\n this._thinInstanceDataStorage.matrixBufferSize = newSize;\n if (this._scene.needsPreviousWorldMatrices && !this._thinInstanceDataStorage.previousMatrixData) {\n this._thinInstanceDataStorage.previousMatrixBuffer?.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", data, false);\n }\n }\n else {\n this._userThinInstanceBuffersStorage.vertexBuffers[kind]?.dispose();\n this._userThinInstanceBuffersStorage.data[kind] = data;\n this._userThinInstanceBuffersStorage.sizes[kind] = newSize;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), data, kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype._thinInstanceInitializeUserStorage = function () {\n if (!this._userThinInstanceBuffersStorage) {\n this._userThinInstanceBuffersStorage = {\n data: {},\n sizes: {},\n vertexBuffers: {},\n strides: {},\n };\n }\n};\nMesh.prototype._disposeThinInstanceSpecificData = function () {\n if (this._thinInstanceDataStorage?.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n }\n};\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,mBAAmB;AACxC,SAASC,YAAY,EAAEC,MAAM,QAAQ,sBAAsB;AAC3D,SAASC,MAAM,EAAEC,OAAO,EAAEC,UAAU,QAAQ,yBAAyB;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,YAAY,QAAQ,4BAA4B;AACzDP,IAAI,CAACQ,SAAS,CAACC,eAAe,GAAG,UAAUC,MAAM,EAAEC,OAAO,GAAG,IAAI,EAAE;EAC/D,IAAI,CAAC,IAAI,CAACC,QAAQ,CAAC,CAAC,CAACC,SAAS,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC,CAACC,eAAe,EAAE;IACxDT,MAAM,CAACU,KAAK,CAAC,4FAA4F,CAAC;IAC1G,OAAO,CAAC,CAAC;EACb;EACA,IAAI,CAACC,6BAA6B,CAAC,QAAQ,EAAEC,KAAK,CAACC,OAAO,CAACT,MAAM,CAAC,GAAGA,MAAM,CAACU,MAAM,GAAG,CAAC,CAAC;EACvF,MAAMC,KAAK,GAAG,IAAI,CAACC,wBAAwB,CAACC,cAAc;EAC1D,IAAIL,KAAK,CAACC,OAAO,CAACT,MAAM,CAAC,EAAE;IACvB,KAAK,IAAIc,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGd,MAAM,CAACU,MAAM,EAAE,EAAEI,CAAC,EAAE;MACpC,IAAI,CAACC,uBAAuB,CAAC,IAAI,CAACH,wBAAwB,CAACC,cAAc,EAAE,EAAEb,MAAM,CAACc,CAAC,CAAC,EAAEA,CAAC,KAAKd,MAAM,CAACU,MAAM,GAAG,CAAC,IAAIT,OAAO,CAAC;IAC/H;EACJ,CAAC,MACI;IACD,IAAI,CAACc,uBAAuB,CAAC,IAAI,CAACH,wBAAwB,CAACC,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