1 |
- {"ast":null,"code":"import { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { Buffer, VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { PickingInfo } from \"../../Collisions/pickingInfo.js\";\nimport { DeepCopier } from \"../../Misc/deepCopier.js\";\nimport { GreasedLineTools } from \"../../Misc/greasedLineTools.js\";\nimport { GreasedLineBaseMesh } from \"./greasedLineBaseMesh.js\";\nMesh._GreasedLineMeshParser = (parsedMesh, scene) => {\n return GreasedLineMesh.Parse(parsedMesh, scene);\n};\n/**\n * GreasedLineMesh\n * Use the GreasedLineBuilder.CreateGreasedLine function to create an instance of this class.\n */\nexport class GreasedLineMesh extends GreasedLineBaseMesh {\n /**\n * GreasedLineMesh\n * @param name name of the mesh\n * @param scene the scene\n * @param _options mesh options\n */\n constructor(name, scene, _options) {\n super(name, scene, _options);\n this.name = name;\n /**\n * Treshold used to pick the mesh\n */\n this.intersectionThreshold = 0.1;\n this._previousAndSide = [];\n this._nextAndCounters = [];\n if (_options.points) {\n this.addPoints(GreasedLineTools.ConvertPoints(_options.points));\n }\n }\n /**\n * \"GreasedLineMesh\"\n * @returns \"GreasedLineMesh\"\n */\n getClassName() {\n return \"GreasedLineMesh\";\n }\n _updateColorPointers() {\n if (this._options.colorPointers) {\n return;\n }\n let colorPointer = 0;\n this._colorPointers = [];\n this._points.forEach(p => {\n for (let jj = 0; jj < p.length; jj += 3) {\n this._colorPointers.push(colorPointer);\n this._colorPointers.push(colorPointer++);\n }\n });\n }\n _updateWidths() {\n // intentionally left blank\n }\n _setPoints(points) {\n this._points = points;\n this._options.points = points;\n this._initGreasedLine();\n let indiceOffset = 0;\n let vertexPositionsLen = 0,\n indicesLength = 0,\n uvLength = 0,\n previousAndSideLength = 0;\n points.forEach(p => {\n vertexPositionsLen += p.length * 2;\n indicesLength += (p.length - 3) * 2;\n uvLength += p.length * 4 / 3;\n previousAndSideLength += p.length * 8 / 3;\n });\n const vertexPositionsArr = new Float32Array(vertexPositionsLen);\n const indicesArr = vertexPositionsLen > 65535 ? new Uint32Array(indicesLength) : new Uint16Array(indicesLength);\n const uvArr = new Float32Array(uvLength);\n const previousAndSide = new Float32Array(previousAndSideLength);\n // it's the same length here\n const nextAndCounters = new Float32Array(previousAndSideLength);\n let vertexPositionsOffset = 0,\n indicesOffset = 0,\n uvOffset = 0,\n previousAndSideOffset = 0,\n nextAndCountersOffset = 0;\n points.forEach(p => {\n const lengthArray = GreasedLineTools.GetLineLengthArray(p);\n const totalLength = lengthArray[lengthArray.length - 1];\n for (let j = 0, jj = 0; jj < p.length; j++, jj += 3) {\n const baseOffset = vertexPositionsOffset + jj * 2;\n vertexPositionsArr[baseOffset + 0] = p[jj + 0];\n vertexPositionsArr[baseOffset + 1] = p[jj + 1];\n vertexPositionsArr[baseOffset + 2] = p[jj + 2];\n vertexPositionsArr[baseOffset + 3] = p[jj + 0];\n vertexPositionsArr[baseOffset + 4] = p[jj + 1];\n vertexPositionsArr[baseOffset + 5] = p[jj + 2];\n if (jj < p.length - 3) {\n const n = j * 2 + indiceOffset;\n const baseIndicesOffset = indicesOffset + jj * 2;\n indicesArr[baseIndicesOffset + 0] = n;\n indicesArr[baseIndicesOffset + 1] = n + 1;\n indicesArr[baseIndicesOffset + 2] = n + 2;\n indicesArr[baseIndicesOffset + 3] = n + 2;\n indicesArr[baseIndicesOffset + 4] = n + 1;\n indicesArr[baseIndicesOffset + 5] = n + 3;\n }\n }\n indiceOffset += p.length / 3 * 2;\n const currVertexPositionsOffsetLength = p.length * 2;\n const positions = vertexPositionsArr.subarray(vertexPositionsOffset, vertexPositionsOffset + currVertexPositionsOffsetLength);\n vertexPositionsOffset += currVertexPositionsOffsetLength;\n indicesOffset += (p.length - 3) * 2;\n const previous = new Float32Array(positions.length);\n const next = new Float32Array(positions.length);\n const l = positions.length / 6;\n let v;\n if (GreasedLineMesh._CompareV3(0, l - 1, positions)) {\n v = positions.subarray((l - 2) * 6, (l - 1) * 6);\n } else {\n v = positions.subarray(0, 6);\n }\n previous.set(v);\n previous.set(positions.subarray(0, positions.length - 6), 6);\n next.set(positions.subarray(6));\n if (GreasedLineMesh._CompareV3(l - 1, 0, positions)) {\n v = positions.subarray(6, 12);\n } else {\n v = positions.subarray((l - 1) * 6, l * 6);\n }\n next.set(v, next.length - 6);\n for (let i = 0, sidesLength = positions.length / 3; i < sidesLength; i++) {\n previousAndSide[previousAndSideOffset++] = previous[i * 3];\n previousAndSide[previousAndSideOffset++] = previous[i * 3 + 1];\n previousAndSide[previousAndSideOffset++] = previous[i * 3 + 2];\n // side[i] = i % 2 ? -1 : 1;\n // side[i] = 1 - ((i & 1) << 1);\n previousAndSide[previousAndSideOffset++] = 1 - ((i & 1) << 1);\n nextAndCounters[nextAndCountersOffset++] = next[i * 3];\n nextAndCounters[nextAndCountersOffset++] = next[i * 3 + 1];\n nextAndCounters[nextAndCountersOffset++] = next[i * 3 + 2];\n // counters[i] = lengthArray[i >> 1] / totalLength;\n nextAndCounters[nextAndCountersOffset++] = lengthArray[i >> 1] / totalLength;\n }\n if (this._options.uvs) {\n for (let i = 0; i < this._options.uvs.length; i++) {\n uvArr[uvOffset++] = this._options.uvs[i];\n }\n } else {\n for (let j = 0; j < l; j++) {\n // uvs\n const lengthRatio = lengthArray[j] / totalLength;\n const uvOffsetBase = uvOffset + j * 4;\n uvArr[uvOffsetBase + 0] = lengthRatio;\n uvArr[uvOffsetBase + 1] = 0;\n uvArr[uvOffsetBase + 2] = lengthRatio;\n uvArr[uvOffsetBase + 3] = 1;\n }\n }\n });\n this._vertexPositions = vertexPositionsArr;\n this._indices = indicesArr;\n this._uvs = uvArr;\n this._previousAndSide = previousAndSide;\n this._nextAndCounters = nextAndCounters;\n if (!this._lazy) {\n if (!this._options.colorPointers) {\n this._updateColorPointers();\n }\n this._createVertexBuffers();\n !this.doNotSyncBoundingInfo && this.refreshBoundingInfo();\n }\n }\n /**\n * Clones the GreasedLineMesh.\n * @param name new line name\n * @param newParent new parent node\n * @returns cloned line\n */\n clone(name = `${this.name}-cloned`, newParent) {\n const lineOptions = this._createLineOptions();\n const deepCopiedLineOptions = {};\n DeepCopier.DeepCopy(lineOptions, deepCopiedLineOptions, [\"instance\"], undefined, true);\n const cloned = new GreasedLineMesh(name, this._scene, deepCopiedLineOptions);\n if (newParent) {\n cloned.parent = newParent;\n }\n cloned.material = this.material;\n return cloned;\n }\n /**\n * Serializes this GreasedLineMesh\n * @param serializationObject object to write serialization to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.type = this.getClassName();\n serializationObject.lineOptions = this._createLineOptions();\n }\n /**\n * Parses a serialized GreasedLineMesh\n * @param parsedMesh the serialized GreasedLineMesh\n * @param scene the scene to create the GreasedLineMesh in\n * @returns the created GreasedLineMesh\n */\n static Parse(parsedMesh, scene) {\n const lineOptions = parsedMesh.lineOptions;\n const name = parsedMesh.name;\n const result = new GreasedLineMesh(name, scene, lineOptions);\n return result;\n }\n _initGreasedLine() {\n super._initGreasedLine();\n this._previousAndSide = [];\n this._nextAndCounters = [];\n }\n /**\n * Checks whether a ray is intersecting this GreasedLineMesh\n * @param ray ray to check the intersection of this mesh with\n * @param fastCheck not supported\n * @param trianglePredicate not supported\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param worldToUse not supported\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @returns the picking info\n */\n intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {\n const pickingInfo = new PickingInfo();\n const intersections = this.findAllIntersections(ray, fastCheck, trianglePredicate, onlyBoundingInfo, worldToUse, skipBoundingInfo, true);\n if ((intersections === null || intersections === void 0 ? void 0 : intersections.length) === 1) {\n const intersection = intersections[0];\n pickingInfo.hit = true;\n pickingInfo.distance = intersection.distance;\n pickingInfo.ray = ray;\n pickingInfo.pickedMesh = this;\n pickingInfo.pickedPoint = intersection.point;\n }\n return pickingInfo;\n }\n /**\n * Gets all intersections of a ray and the line\n * @param ray Ray to check the intersection of this mesh with\n * @param _fastCheck not supported\n * @param _trianglePredicate not supported\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param _worldToUse not supported\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @param firstOnly If true, the first and only intersection is immediatelly returned if found\n * @returns intersection(s)\n */\n findAllIntersections(ray, _fastCheck, _trianglePredicate, onlyBoundingInfo = false, _worldToUse, skipBoundingInfo = false, firstOnly = false) {\n var _this$greasedLineMate, _this$greasedLineMate2;\n if (onlyBoundingInfo && !skipBoundingInfo && ray.intersectsSphere(this._boundingSphere, this.intersectionThreshold) === false) {\n return;\n }\n const indices = this.getIndices();\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\n const widths = this._widths;\n const lineWidth = (_this$greasedLineMate = (_this$greasedLineMate2 = this.greasedLineMaterial) === null || _this$greasedLineMate2 === void 0 ? void 0 : _this$greasedLineMate2.width) !== null && _this$greasedLineMate !== void 0 ? _this$greasedLineMate : 1;\n const intersects = [];\n if (indices && positions && widths) {\n let i = 0,\n l = 0;\n for (i = 0, l = indices.length - 1; i < l; i += 3) {\n const a = indices[i];\n const b = indices[i + 1];\n GreasedLineMesh._V_START.fromArray(positions, a * 3);\n GreasedLineMesh._V_END.fromArray(positions, b * 3);\n if (this._offsets) {\n GreasedLineMesh._V_OFFSET_START.fromArray(this._offsets, a * 3);\n GreasedLineMesh._V_OFFSET_END.fromArray(this._offsets, b * 3);\n GreasedLineMesh._V_START.addInPlace(GreasedLineMesh._V_OFFSET_START);\n GreasedLineMesh._V_END.addInPlace(GreasedLineMesh._V_OFFSET_END);\n }\n const iFloored = Math.floor(i / 3);\n const width = widths[iFloored] !== undefined ? widths[iFloored] : 1;\n const precision = this.intersectionThreshold * (lineWidth * width) / 2;\n const distance = ray.intersectionSegment(GreasedLineMesh._V_START, GreasedLineMesh._V_END, precision);\n if (distance !== -1) {\n intersects.push({\n distance: distance,\n point: ray.direction.normalize().multiplyByFloats(distance, distance, distance).add(ray.origin)\n });\n if (firstOnly) {\n return intersects;\n }\n }\n }\n i = l;\n }\n return intersects;\n }\n get _boundingSphere() {\n return this.getBoundingInfo().boundingSphere;\n }\n static _CompareV3(positionIdx1, positionIdx2, positions) {\n const arrayIdx1 = positionIdx1 * 6;\n const arrayIdx2 = positionIdx2 * 6;\n return positions[arrayIdx1] === positions[arrayIdx2] && positions[arrayIdx1 + 1] === positions[arrayIdx2 + 1] && positions[arrayIdx1 + 2] === positions[arrayIdx2 + 2];\n }\n _createVertexBuffers() {\n const vertexData = super._createVertexBuffers();\n const engine = this._scene.getEngine();\n const previousAndSideBuffer = new Buffer(engine, this._previousAndSide, false, 4);\n this.setVerticesBuffer(previousAndSideBuffer.createVertexBuffer(\"grl_previousAndSide\", 0, 4));\n const nextAndCountersBuffer = new Buffer(engine, this._nextAndCounters, false, 4);\n this.setVerticesBuffer(nextAndCountersBuffer.createVertexBuffer(\"grl_nextAndCounters\", 0, 4));\n const widthBuffer = new Buffer(engine, this._widths, this._updatable, 1);\n this.setVerticesBuffer(widthBuffer.createVertexBuffer(\"grl_widths\", 0, 1));\n this._widthsBuffer = widthBuffer;\n const colorPointersBuffer = new Buffer(engine, this._colorPointers, this._updatable, 1);\n this.setVerticesBuffer(colorPointersBuffer.createVertexBuffer(\"grl_colorPointers\", 0, 1));\n this._colorPointersBuffer = colorPointersBuffer;\n return vertexData;\n }\n}\nGreasedLineMesh._V_START = new Vector3();\nGreasedLineMesh._V_END = new Vector3();\nGreasedLineMesh._V_OFFSET_START = new Vector3();\nGreasedLineMesh._V_OFFSET_END = new Vector3();","map":{"version":3,"names":["Vector3","Mesh","Buffer","VertexBuffer","PickingInfo","DeepCopier","GreasedLineTools","GreasedLineBaseMesh","_GreasedLineMeshParser","parsedMesh","scene","GreasedLineMesh","Parse","constructor","name","_options","intersectionThreshold","_previousAndSide","_nextAndCounters","points","addPoints","ConvertPoints","getClassName","_updateColorPointers","colorPointers","colorPointer","_colorPointers","_points","forEach","p","jj","length","push","_updateWidths","_setPoints","_initGreasedLine","indiceOffset","vertexPositionsLen","indicesLength","uvLength","previousAndSideLength","vertexPositionsArr","Float32Array","indicesArr","Uint32Array","Uint16Array","uvArr","previousAndSide","nextAndCounters","vertexPositionsOffset","indicesOffset","uvOffset","previousAndSideOffset","nextAndCountersOffset","lengthArray","GetLineLengthArray","totalLength","j","baseOffset","n","baseIndicesOffset","currVertexPositionsOffsetLength","positions","subarray","previous","next","l","v","_CompareV3","set","i","sidesLength","uvs","lengthRatio","uvOffsetBase","_vertexPositions","_indices","_uvs","_lazy","_createVertexBuffers","doNotSyncBoundingInfo","refreshBoundingInfo","clone","newParent","lineOptions","_createLineOptions","deepCopiedLineOptions","DeepCopy","undefined","cloned","_scene","parent","material","serialize","serializationObject","type","result","intersects","ray","fastCheck","trianglePredicate","onlyBoundingInfo","worldToUse","skipBoundingInfo","pickingInfo","intersections","findAllIntersections","intersection","hit","distance","pickedMesh","pickedPoint","point","_fastCheck","_trianglePredicate","_worldToUse","firstOnly","_this$greasedLineMate","_this$greasedLineMate2","intersectsSphere","_boundingSphere","indices","getIndices","getVerticesData","PositionKind","widths","_widths","lineWidth","greasedLineMaterial","width","a","b","_V_START","fromArray","_V_END","_offsets","_V_OFFSET_START","_V_OFFSET_END","addInPlace","iFloored","Math","floor","precision","intersectionSegment","direction","normalize","multiplyByFloats","add","origin","getBoundingInfo","boundingSphere","positionIdx1","positionIdx2","arrayIdx1","arrayIdx2","vertexData","engine","getEngine","previousAndSideBuffer","setVerticesBuffer","createVertexBuffer","nextAndCountersBuffer","widthBuffer","_updatable","_widthsBuffer","colorPointersBuffer","_colorPointersBuffer"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Meshes/GreasedLine/greasedLineMesh.js"],"sourcesContent":["import { Vector3 } from \"../../Maths/math.vector.js\";\nimport { Mesh } from \"../mesh.js\";\nimport { Buffer, VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { PickingInfo } from \"../../Collisions/pickingInfo.js\";\nimport { DeepCopier } from \"../../Misc/deepCopier.js\";\nimport { GreasedLineTools } from \"../../Misc/greasedLineTools.js\";\nimport { GreasedLineBaseMesh } from \"./greasedLineBaseMesh.js\";\nMesh._GreasedLineMeshParser = (parsedMesh, scene) => {\n return GreasedLineMesh.Parse(parsedMesh, scene);\n};\n/**\n * GreasedLineMesh\n * Use the GreasedLineBuilder.CreateGreasedLine function to create an instance of this class.\n */\nexport class GreasedLineMesh extends GreasedLineBaseMesh {\n /**\n * GreasedLineMesh\n * @param name name of the mesh\n * @param scene the scene\n * @param _options mesh options\n */\n constructor(name, scene, _options) {\n super(name, scene, _options);\n this.name = name;\n /**\n * Treshold used to pick the mesh\n */\n this.intersectionThreshold = 0.1;\n this._previousAndSide = [];\n this._nextAndCounters = [];\n if (_options.points) {\n this.addPoints(GreasedLineTools.ConvertPoints(_options.points));\n }\n }\n /**\n * \"GreasedLineMesh\"\n * @returns \"GreasedLineMesh\"\n */\n getClassName() {\n return \"GreasedLineMesh\";\n }\n _updateColorPointers() {\n if (this._options.colorPointers) {\n return;\n }\n let colorPointer = 0;\n this._colorPointers = [];\n this._points.forEach((p) => {\n for (let jj = 0; jj < p.length; jj += 3) {\n this._colorPointers.push(colorPointer);\n this._colorPointers.push(colorPointer++);\n }\n });\n }\n _updateWidths() {\n // intentionally left blank\n }\n _setPoints(points) {\n this._points = points;\n this._options.points = points;\n this._initGreasedLine();\n let indiceOffset = 0;\n let vertexPositionsLen = 0, indicesLength = 0, uvLength = 0, previousAndSideLength = 0;\n points.forEach((p) => {\n vertexPositionsLen += p.length * 2;\n indicesLength += (p.length - 3) * 2;\n uvLength += (p.length * 4) / 3;\n previousAndSideLength += (p.length * 8) / 3;\n });\n const vertexPositionsArr = new Float32Array(vertexPositionsLen);\n const indicesArr = vertexPositionsLen > 65535 ? new Uint32Array(indicesLength) : new Uint16Array(indicesLength);\n const uvArr = new Float32Array(uvLength);\n const previousAndSide = new Float32Array(previousAndSideLength);\n // it's the same length here\n const nextAndCounters = new Float32Array(previousAndSideLength);\n let vertexPositionsOffset = 0, indicesOffset = 0, uvOffset = 0, previousAndSideOffset = 0, nextAndCountersOffset = 0;\n points.forEach((p) => {\n const lengthArray = GreasedLineTools.GetLineLengthArray(p);\n const totalLength = lengthArray[lengthArray.length - 1];\n for (let j = 0, jj = 0; jj < p.length; j++, jj += 3) {\n const baseOffset = vertexPositionsOffset + jj * 2;\n vertexPositionsArr[baseOffset + 0] = p[jj + 0];\n vertexPositionsArr[baseOffset + 1] = p[jj + 1];\n vertexPositionsArr[baseOffset + 2] = p[jj + 2];\n vertexPositionsArr[baseOffset + 3] = p[jj + 0];\n vertexPositionsArr[baseOffset + 4] = p[jj + 1];\n vertexPositionsArr[baseOffset + 5] = p[jj + 2];\n if (jj < p.length - 3) {\n const n = j * 2 + indiceOffset;\n const baseIndicesOffset = indicesOffset + jj * 2;\n indicesArr[baseIndicesOffset + 0] = n;\n indicesArr[baseIndicesOffset + 1] = n + 1;\n indicesArr[baseIndicesOffset + 2] = n + 2;\n indicesArr[baseIndicesOffset + 3] = n + 2;\n indicesArr[baseIndicesOffset + 4] = n + 1;\n indicesArr[baseIndicesOffset + 5] = n + 3;\n }\n }\n indiceOffset += (p.length / 3) * 2;\n const currVertexPositionsOffsetLength = p.length * 2;\n const positions = vertexPositionsArr.subarray(vertexPositionsOffset, vertexPositionsOffset + currVertexPositionsOffsetLength);\n vertexPositionsOffset += currVertexPositionsOffsetLength;\n indicesOffset += (p.length - 3) * 2;\n const previous = new Float32Array(positions.length);\n const next = new Float32Array(positions.length);\n const l = positions.length / 6;\n let v;\n if (GreasedLineMesh._CompareV3(0, l - 1, positions)) {\n v = positions.subarray((l - 2) * 6, (l - 1) * 6);\n }\n else {\n v = positions.subarray(0, 6);\n }\n previous.set(v);\n previous.set(positions.subarray(0, positions.length - 6), 6);\n next.set(positions.subarray(6));\n if (GreasedLineMesh._CompareV3(l - 1, 0, positions)) {\n v = positions.subarray(6, 12);\n }\n else {\n v = positions.subarray((l - 1) * 6, l * 6);\n }\n next.set(v, next.length - 6);\n for (let i = 0, sidesLength = positions.length / 3; i < sidesLength; i++) {\n previousAndSide[previousAndSideOffset++] = previous[i * 3];\n previousAndSide[previousAndSideOffset++] = previous[i * 3 + 1];\n previousAndSide[previousAndSideOffset++] = previous[i * 3 + 2];\n // side[i] = i % 2 ? -1 : 1;\n // side[i] = 1 - ((i & 1) << 1);\n previousAndSide[previousAndSideOffset++] = 1 - ((i & 1) << 1);\n nextAndCounters[nextAndCountersOffset++] = next[i * 3];\n nextAndCounters[nextAndCountersOffset++] = next[i * 3 + 1];\n nextAndCounters[nextAndCountersOffset++] = next[i * 3 + 2];\n // counters[i] = lengthArray[i >> 1] / totalLength;\n nextAndCounters[nextAndCountersOffset++] = lengthArray[i >> 1] / totalLength;\n }\n if (this._options.uvs) {\n for (let i = 0; i < this._options.uvs.length; i++) {\n uvArr[uvOffset++] = this._options.uvs[i];\n }\n }\n else {\n for (let j = 0; j < l; j++) {\n // uvs\n const lengthRatio = lengthArray[j] / totalLength;\n const uvOffsetBase = uvOffset + j * 4;\n uvArr[uvOffsetBase + 0] = lengthRatio;\n uvArr[uvOffsetBase + 1] = 0;\n uvArr[uvOffsetBase + 2] = lengthRatio;\n uvArr[uvOffsetBase + 3] = 1;\n }\n }\n });\n this._vertexPositions = vertexPositionsArr;\n this._indices = indicesArr;\n this._uvs = uvArr;\n this._previousAndSide = previousAndSide;\n this._nextAndCounters = nextAndCounters;\n if (!this._lazy) {\n if (!this._options.colorPointers) {\n this._updateColorPointers();\n }\n this._createVertexBuffers();\n !this.doNotSyncBoundingInfo && this.refreshBoundingInfo();\n }\n }\n /**\n * Clones the GreasedLineMesh.\n * @param name new line name\n * @param newParent new parent node\n * @returns cloned line\n */\n clone(name = `${this.name}-cloned`, newParent) {\n const lineOptions = this._createLineOptions();\n const deepCopiedLineOptions = {};\n DeepCopier.DeepCopy(lineOptions, deepCopiedLineOptions, [\"instance\"], undefined, true);\n const cloned = new GreasedLineMesh(name, this._scene, deepCopiedLineOptions);\n if (newParent) {\n cloned.parent = newParent;\n }\n cloned.material = this.material;\n return cloned;\n }\n /**\n * Serializes this GreasedLineMesh\n * @param serializationObject object to write serialization to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.type = this.getClassName();\n serializationObject.lineOptions = this._createLineOptions();\n }\n /**\n * Parses a serialized GreasedLineMesh\n * @param parsedMesh the serialized GreasedLineMesh\n * @param scene the scene to create the GreasedLineMesh in\n * @returns the created GreasedLineMesh\n */\n static Parse(parsedMesh, scene) {\n const lineOptions = parsedMesh.lineOptions;\n const name = parsedMesh.name;\n const result = new GreasedLineMesh(name, scene, lineOptions);\n return result;\n }\n _initGreasedLine() {\n super._initGreasedLine();\n this._previousAndSide = [];\n this._nextAndCounters = [];\n }\n /**\n * Checks whether a ray is intersecting this GreasedLineMesh\n * @param ray ray to check the intersection of this mesh with\n * @param fastCheck not supported\n * @param trianglePredicate not supported\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param worldToUse not supported\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @returns the picking info\n */\n intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {\n const pickingInfo = new PickingInfo();\n const intersections = this.findAllIntersections(ray, fastCheck, trianglePredicate, onlyBoundingInfo, worldToUse, skipBoundingInfo, true);\n if (intersections?.length === 1) {\n const intersection = intersections[0];\n pickingInfo.hit = true;\n pickingInfo.distance = intersection.distance;\n pickingInfo.ray = ray;\n pickingInfo.pickedMesh = this;\n pickingInfo.pickedPoint = intersection.point;\n }\n return pickingInfo;\n }\n /**\n * Gets all intersections of a ray and the line\n * @param ray Ray to check the intersection of this mesh with\n * @param _fastCheck not supported\n * @param _trianglePredicate not supported\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param _worldToUse not supported\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @param firstOnly If true, the first and only intersection is immediatelly returned if found\n * @returns intersection(s)\n */\n findAllIntersections(ray, _fastCheck, _trianglePredicate, onlyBoundingInfo = false, _worldToUse, skipBoundingInfo = false, firstOnly = false) {\n if (onlyBoundingInfo && !skipBoundingInfo && ray.intersectsSphere(this._boundingSphere, this.intersectionThreshold) === false) {\n return;\n }\n const indices = this.getIndices();\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\n const widths = this._widths;\n const lineWidth = this.greasedLineMaterial?.width ?? 1;\n const intersects = [];\n if (indices && positions && widths) {\n let i = 0, l = 0;\n for (i = 0, l = indices.length - 1; i < l; i += 3) {\n const a = indices[i];\n const b = indices[i + 1];\n GreasedLineMesh._V_START.fromArray(positions, a * 3);\n GreasedLineMesh._V_END.fromArray(positions, b * 3);\n if (this._offsets) {\n GreasedLineMesh._V_OFFSET_START.fromArray(this._offsets, a * 3);\n GreasedLineMesh._V_OFFSET_END.fromArray(this._offsets, b * 3);\n GreasedLineMesh._V_START.addInPlace(GreasedLineMesh._V_OFFSET_START);\n GreasedLineMesh._V_END.addInPlace(GreasedLineMesh._V_OFFSET_END);\n }\n const iFloored = Math.floor(i / 3);\n const width = widths[iFloored] !== undefined ? widths[iFloored] : 1;\n const precision = (this.intersectionThreshold * (lineWidth * width)) / 2;\n const distance = ray.intersectionSegment(GreasedLineMesh._V_START, GreasedLineMesh._V_END, precision);\n if (distance !== -1) {\n intersects.push({\n distance: distance,\n point: ray.direction.normalize().multiplyByFloats(distance, distance, distance).add(ray.origin),\n });\n if (firstOnly) {\n return intersects;\n }\n }\n }\n i = l;\n }\n return intersects;\n }\n get _boundingSphere() {\n return this.getBoundingInfo().boundingSphere;\n }\n static _CompareV3(positionIdx1, positionIdx2, positions) {\n const arrayIdx1 = positionIdx1 * 6;\n const arrayIdx2 = positionIdx2 * 6;\n return positions[arrayIdx1] === positions[arrayIdx2] && positions[arrayIdx1 + 1] === positions[arrayIdx2 + 1] && positions[arrayIdx1 + 2] === positions[arrayIdx2 + 2];\n }\n _createVertexBuffers() {\n const vertexData = super._createVertexBuffers();\n const engine = this._scene.getEngine();\n const previousAndSideBuffer = new Buffer(engine, this._previousAndSide, false, 4);\n this.setVerticesBuffer(previousAndSideBuffer.createVertexBuffer(\"grl_previousAndSide\", 0, 4));\n const nextAndCountersBuffer = new Buffer(engine, this._nextAndCounters, false, 4);\n this.setVerticesBuffer(nextAndCountersBuffer.createVertexBuffer(\"grl_nextAndCounters\", 0, 4));\n const widthBuffer = new Buffer(engine, this._widths, this._updatable, 1);\n this.setVerticesBuffer(widthBuffer.createVertexBuffer(\"grl_widths\", 0, 1));\n this._widthsBuffer = widthBuffer;\n const colorPointersBuffer = new Buffer(engine, this._colorPointers, this._updatable, 1);\n this.setVerticesBuffer(colorPointersBuffer.createVertexBuffer(\"grl_colorPointers\", 0, 1));\n this._colorPointersBuffer = colorPointersBuffer;\n return vertexData;\n }\n}\nGreasedLineMesh._V_START = new Vector3();\nGreasedLineMesh._V_END = new Vector3();\nGreasedLineMesh._V_OFFSET_START = new Vector3();\nGreasedLineMesh._V_OFFSET_END = new Vector3();\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,4BAA4B;AACpD,SAASC,IAAI,QAAQ,YAAY;AACjC,SAASC,MAAM,EAAEC,YAAY,QAAQ,yBAAyB;AAC9D,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9DN,IAAI,CAACO,sBAAsB,GAAG,CAACC,UAAU,EAAEC,KAAK,KAAK;EACjD,OAAOC,eAAe,CAACC,KAAK,CAACH,UAAU,EAAEC,KAAK,CAAC;AACnD,CAAC;AACD;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,SAASJ,mBAAmB,CAAC;EACrD;AACJ;AACA;AACA;AACA;AACA;EACIM,WAAWA,CAACC,IAAI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