ab020b18b55f852b5f9faa751c18a5dca0d46c9211f672476fa7e0f37e4f6f59.json 25 KB

1
  1. {"ast":null,"code":"import { Vector3 } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"./buffer.js\";\nimport { Clamp } from \"../Maths/math.scalar.functions.js\";\n/**\n * Class used to represent a lattice\n * #MDVD75#18 - Moving lattice bounds\n * #MDVD75#23 - Twist\n */\nexport class Lattice {\n /**\n * @returns the string \"Lattice\"\n */\n getClassName() {\n return \"Lattice\";\n }\n /**\n * Gets the resolution on x axis\n */\n get resolutionX() {\n return this._resolutionX;\n }\n /**\n * Gets the resolution on y axis\n */\n get resolutionY() {\n return this._resolutionY;\n }\n /**\n * Gets the resolution on z axis\n */\n get resolutionZ() {\n return this._resolutionZ;\n }\n /**\n * Gets the size of the lattice along each axis in object space\n * Updating the size requires you to call update afterwards\n */\n get size() {\n return this._size;\n }\n /**\n * Gets the lattice position in object space\n */\n get position() {\n return this._position;\n }\n /**\n * Gets the data of the lattice\n */\n get data() {\n return this._data;\n }\n /**\n * Gets the size of each cell in the lattice\n */\n get cellSize() {\n return this._cellSize;\n }\n /**\n * Gets the min bounds of the lattice\n */\n get min() {\n return this._min;\n }\n /**\n * Gets the max bounds of the lattice\n */\n get max() {\n return this._max;\n }\n /**\n * Creates a new Lattice\n * @param options options for creating\n */\n constructor(options) {\n this._cellSize = new Vector3();\n // Cache\n this._min = new Vector3(-0.5, -0.5, -0.5);\n this._max = new Vector3(0.5, 0.5, 0.5);\n this._localPos = new Vector3();\n this._tmpVector = new Vector3();\n this._lerpVector0 = new Vector3();\n this._lerpVector1 = new Vector3();\n this._lerpVector2 = new Vector3();\n this._lerpVector3 = new Vector3();\n this._lerpVector4 = new Vector3();\n this._lerpVector5 = new Vector3();\n const localOptions = {\n resolutionX: 3,\n resolutionY: 3,\n resolutionZ: 3,\n position: Vector3.Zero(),\n size: Vector3.One(),\n ...options\n };\n this._resolutionX = localOptions.resolutionX;\n this._resolutionY = localOptions.resolutionY;\n this._resolutionZ = localOptions.resolutionZ;\n this._position = localOptions.position;\n this._size = localOptions.autoAdaptToMesh ? localOptions.autoAdaptToMesh.getBoundingInfo().boundingBox.extendSize.scale(2) : localOptions.size;\n // Allocate data\n this._allocateData();\n this.update();\n }\n _allocateData() {\n this._data = new Array(this.resolutionX);\n for (let i = 0; i < this.resolutionX; i++) {\n this._data[i] = new Array(this.resolutionY);\n for (let j = 0; j < this.resolutionY; j++) {\n this._data[i][j] = new Array(this.resolutionZ);\n for (let k = 0; k < this.resolutionZ; k++) {\n this._data[i][j][k] = Vector3.Zero();\n }\n }\n }\n }\n /**\n * Update of the lattice data\n */\n update() {\n for (let i = 0; i < this.resolutionX; i++) {\n for (let j = 0; j < this.resolutionY; j++) {\n for (let k = 0; k < this.resolutionZ; k++) {\n const x = -this.size.x / 2 + this.size.x * (i / (this.resolutionX - 1));\n const y = -this.size.y / 2 + this.size.y * (j / (this.resolutionY - 1));\n const z = -this.size.z / 2 + this.size.z * (k / (this.resolutionZ - 1));\n this._data[i][j][k].set(x, y, z);\n }\n }\n }\n }\n /**\n * Apply the lattice to a mesh\n * @param mesh mesh to deform\n */\n deformMesh(mesh) {\n const positions = mesh.getVerticesData(VertexBuffer.PositionKind);\n if (!positions) {\n return;\n }\n // Apply the lattice\n this.deform(positions);\n // Update back the mesh\n mesh.setVerticesData(VertexBuffer.PositionKind, positions, true);\n }\n /**\n * Update the lattice internals (like min, max and cell size)\n */\n updateInternals() {\n const nx = this._resolutionX;\n const ny = this._resolutionY;\n const nz = this._resolutionZ;\n // Calculate the size of each cell in the lattice\n this._cellSize.set(this.size.x / (nx - 1), this.size.y / (ny - 1), this.size.z / (nz - 1));\n // Calculate the lattice bounds\n this._min.set(this.position.x - this.size.x / 2, this.position.y - this.size.y / 2, this.position.z - this.size.z / 2);\n this._min.addToRef(this._size, this._max);\n }\n /**\n * Apply the lattice to a set of points\n * @param positions vertex data to deform\n * @param target optional target array to store the result (operation will be done in place in not defined)\n */\n deform(positions, target) {\n const nx = this._resolutionX;\n const ny = this._resolutionY;\n const nz = this._resolutionZ;\n this.updateInternals();\n const min = this._min;\n const max = this._max;\n // Loop over each vertex\n for (let i = 0; i < positions.length; i += 3) {\n const vertex = this._tmpVector.fromArray(positions, i);\n // Check we are inside\n if (vertex.x < min.x || vertex.x > max.x || vertex.y < min.y || vertex.y > max.y || vertex.z < min.z || vertex.z > max.z) {\n if (target) {\n vertex.toArray(target, i);\n }\n continue;\n }\n // Map vertex position to lattice local coordinates\n const localPos = this._localPos.set((vertex.x - min.x) / this._cellSize.x, (vertex.y - min.y) / this._cellSize.y, (vertex.z - min.z) / this._cellSize.z);\n // Get integer lattice indices\n const i0 = Math.floor(localPos.x);\n const j0 = Math.floor(localPos.y);\n const k0 = Math.floor(localPos.z);\n const i1 = Math.min(i0 + 1, nx - 1);\n const j1 = Math.min(j0 + 1, ny - 1);\n const k1 = Math.min(k0 + 1, nz - 1);\n // Compute interpolation weights\n const tx = localPos.x - i0;\n const ty = localPos.y - j0;\n const tz = localPos.z - k0;\n // Ensure indices are within bounds\n const ii0 = Clamp(i0, 0, nx - 1);\n const jj0 = Clamp(j0, 0, ny - 1);\n const kk0 = Clamp(k0, 0, nz - 1);\n const ii1 = Clamp(i1, 0, nx - 1);\n const jj1 = Clamp(j1, 0, ny - 1);\n const kk1 = Clamp(k1, 0, nz - 1);\n // Get lattice control points\n const p000 = this._data[ii0][jj0][kk0];\n const p100 = this._data[ii1][jj0][kk0];\n const p010 = this._data[ii0][jj1][kk0];\n const p110 = this._data[ii1][jj1][kk0];\n const p001 = this._data[ii0][jj0][kk1];\n const p101 = this._data[ii1][jj0][kk1];\n const p011 = this._data[ii0][jj1][kk1];\n const p111 = this._data[ii1][jj1][kk1];\n // Trilinear interpolation\n const p00 = Vector3.LerpToRef(p000, p100, tx, this._lerpVector0);\n const p01 = Vector3.LerpToRef(p001, p101, tx, this._lerpVector1);\n const p10 = Vector3.LerpToRef(p010, p110, tx, this._lerpVector2);\n const p11 = Vector3.LerpToRef(p011, p111, tx, this._lerpVector3);\n const p0 = Vector3.LerpToRef(p00, p10, ty, this._lerpVector4);\n const p1 = Vector3.LerpToRef(p01, p11, ty, this._lerpVector5);\n const deformedPos = Vector3.LerpToRef(p0, p1, tz, this._lerpVector0);\n deformedPos.addInPlace(this.position);\n // Apply deformation to the vertex\n deformedPos.toArray(target || positions, i);\n }\n }\n}","map":{"version":3,"names":["Vector3","VertexBuffer","Clamp","Lattice","getClassName","resolutionX","_resolutionX","resolutionY","_resolutionY","resolutionZ","_resolutionZ","size","_size","position","_position","data","_data","cellSize","_cellSize","min","_min","max","_max","constructor","options","_localPos","_tmpVector","_lerpVector0","_lerpVector1","_lerpVector2","_lerpVector3","_lerpVector4","_lerpVector5","localOptions","Zero","One","autoAdaptToMesh","getBoundingInfo","boundingBox","extendSize","scale","_allocateData","update","Array","i","j","k","x","y","z","set","deformMesh","mesh","positions","getVerticesData","PositionKind","deform","setVerticesData","updateInternals","nx","ny","nz","addToRef","target","length","vertex","fromArray","toArray","localPos","i0","Math","floor","j0","k0","i1","j1","k1","tx","ty","tz","ii0","jj0","kk0","ii1","jj1","kk1","p000","p100","p010","p110","p001","p101","p011","p111","p00","LerpToRef","p01","p10","p11","p0","p1","deformedPos","addInPlace"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Meshes/lattice.js"],"sourcesContent":["import { Vector3 } from \"../Maths/math.vector.js\";\nimport { VertexBuffer } from \"./buffer.js\";\nimport { Clamp } from \"../Maths/math.scalar.functions.js\";\n/**\n * Class used to represent a lattice\n * #MDVD75#18 - Moving lattice bounds\n * #MDVD75#23 - Twist\n */\nexport class Lattice {\n /**\n * @returns the string \"Lattice\"\n */\n getClassName() {\n return \"Lattice\";\n }\n /**\n * Gets the resolution on x axis\n */\n get resolutionX() {\n return this._resolutionX;\n }\n /**\n * Gets the resolution on y axis\n */\n get resolutionY() {\n return this._resolutionY;\n }\n /**\n * Gets the resolution on z axis\n */\n get resolutionZ() {\n return this._resolutionZ;\n }\n /**\n * Gets the size of the lattice along each axis in object space\n * Updating the size requires you to call update afterwards\n */\n get size() {\n return this._size;\n }\n /**\n * Gets the lattice position in object space\n */\n get position() {\n return this._position;\n }\n /**\n * Gets the data of the lattice\n */\n get data() {\n return this._data;\n }\n /**\n * Gets the size of each cell in the lattice\n */\n get cellSize() {\n return this._cellSize;\n }\n /**\n * Gets the min bounds of the lattice\n */\n get min() {\n return this._min;\n }\n /**\n * Gets the max bounds of the lattice\n */\n get max() {\n return this._max;\n }\n /**\n * Creates a new Lattice\n * @param options options for creating\n */\n constructor(options) {\n this._cellSize = new Vector3();\n // Cache\n this._min = new Vector3(-0.5, -0.5, -0.5);\n this._max = new Vector3(0.5, 0.5, 0.5);\n this._localPos = new Vector3();\n this._tmpVector = new Vector3();\n this._lerpVector0 = new Vector3();\n this._lerpVector1 = new Vector3();\n this._lerpVector2 = new Vector3();\n this._lerpVector3 = new Vector3();\n this._lerpVector4 = new Vector3();\n this._lerpVector5 = new Vector3();\n const localOptions = {\n resolutionX: 3,\n resolutionY: 3,\n resolutionZ: 3,\n position: Vector3.Zero(),\n size: Vector3.One(),\n ...options,\n };\n this._resolutionX = localOptions.resolutionX;\n this._resolutionY = localOptions.resolutionY;\n this._resolutionZ = localOptions.resolutionZ;\n this._position = localOptions.position;\n this._size = localOptions.autoAdaptToMesh ? localOptions.autoAdaptToMesh.getBoundingInfo().boundingBox.extendSize.scale(2) : localOptions.size;\n // Allocate data\n this._allocateData();\n this.update();\n }\n _allocateData() {\n this._data = new Array(this.resolutionX);\n for (let i = 0; i < this.resolutionX; i++) {\n this._data[i] = new Array(this.resolutionY);\n for (let j = 0; j < this.resolutionY; j++) {\n this._data[i][j] = new Array(this.resolutionZ);\n for (let k = 0; k < this.resolutionZ; k++) {\n this._data[i][j][k] = Vector3.Zero();\n }\n }\n }\n }\n /**\n * Update of the lattice data\n */\n update() {\n for (let i = 0; i < this.resolutionX; i++) {\n for (let j = 0; j < this.resolutionY; j++) {\n for (let k = 0; k < this.resolutionZ; k++) {\n const x = -this.size.x / 2 + this.size.x * (i / (this.resolutionX - 1));\n const y = -this.size.y / 2 + this.size.y * (j / (this.resolutionY - 1));\n const z = -this.size.z / 2 + this.size.z * (k / (this.resolutionZ - 1));\n this._data[i][j][k].set(x, y, z);\n }\n }\n }\n }\n /**\n * Apply the lattice to a mesh\n * @param mesh mesh to deform\n */\n deformMesh(mesh) {\n const positions = mesh.getVerticesData(VertexBuffer.PositionKind);\n if (!positions) {\n return;\n }\n // Apply the lattice\n this.deform(positions);\n // Update back the mesh\n mesh.setVerticesData(VertexBuffer.PositionKind, positions, true);\n }\n /**\n * Update the lattice internals (like min, max and cell size)\n */\n updateInternals() {\n const nx = this._resolutionX;\n const ny = this._resolutionY;\n const nz = this._resolutionZ;\n // Calculate the size of each cell in the lattice\n this._cellSize.set(this.size.x / (nx - 1), this.size.y / (ny - 1), this.size.z / (nz - 1));\n // Calculate the lattice bounds\n this._min.set(this.position.x - this.size.x / 2, this.position.y - this.size.y / 2, this.position.z - this.size.z / 2);\n this._min.addToRef(this._size, this._max);\n }\n /**\n * Apply the lattice to a set of points\n * @param positions vertex data to deform\n * @param target optional target array to store the result (operation will be done in place in not defined)\n */\n deform(positions, target) {\n const nx = this._resolutionX;\n const ny = this._resolutionY;\n const nz = this._resolutionZ;\n this.updateInternals();\n const min = this._min;\n const max = this._max;\n // Loop over each vertex\n for (let i = 0; i < positions.length; i += 3) {\n const vertex = this._tmpVector.fromArray(positions, i);\n // Check we are inside\n if (vertex.x < min.x || vertex.x > max.x || vertex.y < min.y || vertex.y > max.y || vertex.z < min.z || vertex.z > max.z) {\n if (target) {\n vertex.toArray(target, i);\n }\n continue;\n }\n // Map vertex position to lattice local coordinates\n const localPos = this._localPos.set((vertex.x - min.x) / this._cellSize.x, (vertex.y - min.y) / this._cellSize.y, (vertex.z - min.z) / this._cellSize.z);\n // Get integer lattice indices\n const i0 = Math.floor(localPos.x);\n const j0 = Math.floor(localPos.y);\n const k0 = Math.floor(localPos.z);\n const i1 = Math.min(i0 + 1, nx - 1);\n const j1 = Math.min(j0 + 1, ny - 1);\n const k1 = Math.min(k0 + 1, nz - 1);\n // Compute interpolation weights\n const tx = localPos.x - i0;\n const ty = localPos.y - j0;\n const tz = localPos.z - k0;\n // Ensure indices are within bounds\n const ii0 = Clamp(i0, 0, nx - 1);\n const jj0 = Clamp(j0, 0, ny - 1);\n const kk0 = Clamp(k0, 0, nz - 1);\n const ii1 = Clamp(i1, 0, nx - 1);\n const jj1 = Clamp(j1, 0, ny - 1);\n const kk1 = Clamp(k1, 0, nz - 1);\n // Get lattice control points\n const p000 = this._data[ii0][jj0][kk0];\n const p100 = this._data[ii1][jj0][kk0];\n const p010 = this._data[ii0][jj1][kk0];\n const p110 = this._data[ii1][jj1][kk0];\n const p001 = this._data[ii0][jj0][kk1];\n const p101 = this._data[ii1][jj0][kk1];\n const p011 = this._data[ii0][jj1][kk1];\n const p111 = this._data[ii1][jj1][kk1];\n // Trilinear interpolation\n const p00 = Vector3.LerpToRef(p000, p100, tx, this._lerpVector0);\n const p01 = Vector3.LerpToRef(p001, p101, tx, this._lerpVector1);\n const p10 = Vector3.LerpToRef(p010, p110, tx, this._lerpVector2);\n const p11 = Vector3.LerpToRef(p011, p111, tx, this._lerpVector3);\n const p0 = Vector3.LerpToRef(p00, p10, ty, this._lerpVector4);\n const p1 = Vector3.LerpToRef(p01, p11, ty, this._lerpVector5);\n const deformedPos = Vector3.LerpToRef(p0, p1, tz, this._lerpVector0);\n deformedPos.addInPlace(this.position);\n // Apply deformation to the vertex\n deformedPos.toArray(target || positions, i);\n }\n }\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,KAAK,QAAQ,mCAAmC;AACzD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,OAAO,CAAC;EACjB;AACJ;AACA;EACIC,YAAYA,CAAA,EAAG;IACX,OAAO,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