three-stdlib 2.29.0 → 2.29.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -54,7 +54,7 @@ class LineSegmentsGeometry extends THREE.InstancedBufferGeometry {
|
|
54
54
|
}
|
55
55
|
const instanceColorBuffer = new THREE.InstancedInterleavedBuffer(colors, itemSize * 2, 1);
|
56
56
|
this.setAttribute("instanceColorStart", new THREE.InterleavedBufferAttribute(instanceColorBuffer, itemSize, 0));
|
57
|
-
this.setAttribute("instanceColorEnd", new THREE.InterleavedBufferAttribute(instanceColorBuffer, itemSize,
|
57
|
+
this.setAttribute("instanceColorEnd", new THREE.InterleavedBufferAttribute(instanceColorBuffer, itemSize, itemSize));
|
58
58
|
return this;
|
59
59
|
}
|
60
60
|
fromWireframeGeometry(geometry) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LineSegmentsGeometry.cjs","sources":["../../src/lines/LineSegmentsGeometry.js"],"sourcesContent":["import {\n Box3,\n Float32BufferAttribute,\n InstancedBufferGeometry,\n InstancedInterleavedBuffer,\n InterleavedBufferAttribute,\n Sphere,\n Vector3,\n WireframeGeometry,\n} from 'three'\n\nconst _box = new Box3()\nconst _vector = new Vector3()\n\nclass LineSegmentsGeometry extends InstancedBufferGeometry {\n constructor() {\n super()\n\n this.isLineSegmentsGeometry = true\n\n this.type = 'LineSegmentsGeometry'\n\n const positions = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0]\n const uvs = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2]\n const index = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5]\n\n this.setIndex(index)\n this.setAttribute('position', new Float32BufferAttribute(positions, 3))\n this.setAttribute('uv', new Float32BufferAttribute(uvs, 2))\n }\n\n applyMatrix4(matrix) {\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined) {\n start.applyMatrix4(matrix)\n\n end.applyMatrix4(matrix)\n\n start.needsUpdate = true\n }\n\n if (this.boundingBox !== null) {\n this.computeBoundingBox()\n }\n\n if (this.boundingSphere !== null) {\n this.computeBoundingSphere()\n }\n\n return this\n }\n\n setPositions(array) {\n let lineSegments\n\n if (array instanceof Float32Array) {\n lineSegments = array\n } else if (Array.isArray(array)) {\n lineSegments = new Float32Array(array)\n }\n\n const instanceBuffer = new InstancedInterleavedBuffer(lineSegments, 6, 1) // xyz, xyz\n\n this.setAttribute('instanceStart', new InterleavedBufferAttribute(instanceBuffer, 3, 0)) // xyz\n this.setAttribute('instanceEnd', new InterleavedBufferAttribute(instanceBuffer, 3, 3)) // xyz\n\n //\n\n this.computeBoundingBox()\n this.computeBoundingSphere()\n\n return this\n }\n\n setColors(array, itemSize = 3) {\n let colors\n\n if (array instanceof Float32Array) {\n colors = array\n } else if (Array.isArray(array)) {\n colors = new Float32Array(array)\n }\n\n const instanceColorBuffer = new InstancedInterleavedBuffer(colors, itemSize * 2, 1) // rgb(a), rgb(a)\n\n this.setAttribute('instanceColorStart', new InterleavedBufferAttribute(instanceColorBuffer, itemSize, 0)) // rgb(a)\n this.setAttribute('instanceColorEnd', new InterleavedBufferAttribute(instanceColorBuffer, itemSize,
|
1
|
+
{"version":3,"file":"LineSegmentsGeometry.cjs","sources":["../../src/lines/LineSegmentsGeometry.js"],"sourcesContent":["import {\n Box3,\n Float32BufferAttribute,\n InstancedBufferGeometry,\n InstancedInterleavedBuffer,\n InterleavedBufferAttribute,\n Sphere,\n Vector3,\n WireframeGeometry,\n} from 'three'\n\nconst _box = new Box3()\nconst _vector = new Vector3()\n\nclass LineSegmentsGeometry extends InstancedBufferGeometry {\n constructor() {\n super()\n\n this.isLineSegmentsGeometry = true\n\n this.type = 'LineSegmentsGeometry'\n\n const positions = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0]\n const uvs = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2]\n const index = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5]\n\n this.setIndex(index)\n this.setAttribute('position', new Float32BufferAttribute(positions, 3))\n this.setAttribute('uv', new Float32BufferAttribute(uvs, 2))\n }\n\n applyMatrix4(matrix) {\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined) {\n start.applyMatrix4(matrix)\n\n end.applyMatrix4(matrix)\n\n start.needsUpdate = true\n }\n\n if (this.boundingBox !== null) {\n this.computeBoundingBox()\n }\n\n if (this.boundingSphere !== null) {\n this.computeBoundingSphere()\n }\n\n return this\n }\n\n setPositions(array) {\n let lineSegments\n\n if (array instanceof Float32Array) {\n lineSegments = array\n } else if (Array.isArray(array)) {\n lineSegments = new Float32Array(array)\n }\n\n const instanceBuffer = new InstancedInterleavedBuffer(lineSegments, 6, 1) // xyz, xyz\n\n this.setAttribute('instanceStart', new InterleavedBufferAttribute(instanceBuffer, 3, 0)) // xyz\n this.setAttribute('instanceEnd', new InterleavedBufferAttribute(instanceBuffer, 3, 3)) // xyz\n\n //\n\n this.computeBoundingBox()\n this.computeBoundingSphere()\n\n return this\n }\n\n setColors(array, itemSize = 3) {\n let colors\n\n if (array instanceof Float32Array) {\n colors = array\n } else if (Array.isArray(array)) {\n colors = new Float32Array(array)\n }\n\n const instanceColorBuffer = new InstancedInterleavedBuffer(colors, itemSize * 2, 1) // rgb(a), rgb(a)\n\n this.setAttribute('instanceColorStart', new InterleavedBufferAttribute(instanceColorBuffer, itemSize, 0)) // rgb(a)\n this.setAttribute('instanceColorEnd', new InterleavedBufferAttribute(instanceColorBuffer, itemSize, itemSize)) // rgb(a)\n\n return this\n }\n\n fromWireframeGeometry(geometry) {\n this.setPositions(geometry.attributes.position.array)\n\n return this\n }\n\n fromEdgesGeometry(geometry) {\n this.setPositions(geometry.attributes.position.array)\n\n return this\n }\n\n fromMesh(mesh) {\n this.fromWireframeGeometry(new WireframeGeometry(mesh.geometry))\n\n // set colors, maybe\n\n return this\n }\n\n fromLineSegments(lineSegments) {\n const geometry = lineSegments.geometry\n\n this.setPositions(geometry.attributes.position.array) // assumes non-indexed\n\n // set colors, maybe\n\n return this\n }\n\n computeBoundingBox() {\n if (this.boundingBox === null) {\n this.boundingBox = new Box3()\n }\n\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined && end !== undefined) {\n this.boundingBox.setFromBufferAttribute(start)\n\n _box.setFromBufferAttribute(end)\n\n this.boundingBox.union(_box)\n }\n }\n\n computeBoundingSphere() {\n if (this.boundingSphere === null) {\n this.boundingSphere = new Sphere()\n }\n\n if (this.boundingBox === null) {\n this.computeBoundingBox()\n }\n\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined && end !== undefined) {\n const center = this.boundingSphere.center\n\n this.boundingBox.getCenter(center)\n\n let maxRadiusSq = 0\n\n for (let i = 0, il = start.count; i < il; i++) {\n _vector.fromBufferAttribute(start, i)\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector))\n\n _vector.fromBufferAttribute(end, i)\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector))\n }\n\n this.boundingSphere.radius = Math.sqrt(maxRadiusSq)\n\n if (isNaN(this.boundingSphere.radius)) {\n console.error(\n 'THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.',\n this,\n )\n }\n }\n }\n\n toJSON() {\n // todo\n }\n\n applyMatrix(matrix) {\n console.warn('THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4().')\n\n return this.applyMatrix4(matrix)\n }\n}\n\nexport { LineSegmentsGeometry }\n"],"names":["Box3","Vector3","InstancedBufferGeometry","Float32BufferAttribute","InstancedInterleavedBuffer","InterleavedBufferAttribute","WireframeGeometry","Sphere"],"mappings":";;;AAWA,MAAM,OA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itemSize * 2, 1);
|
54
54
|
this.setAttribute("instanceColorStart", new InterleavedBufferAttribute(instanceColorBuffer, itemSize, 0));
|
55
|
-
this.setAttribute("instanceColorEnd", new InterleavedBufferAttribute(instanceColorBuffer, itemSize,
|
55
|
+
this.setAttribute("instanceColorEnd", new InterleavedBufferAttribute(instanceColorBuffer, itemSize, itemSize));
|
56
56
|
return this;
|
57
57
|
}
|
58
58
|
fromWireframeGeometry(geometry) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LineSegmentsGeometry.js","sources":["../../src/lines/LineSegmentsGeometry.js"],"sourcesContent":["import {\n Box3,\n Float32BufferAttribute,\n InstancedBufferGeometry,\n InstancedInterleavedBuffer,\n InterleavedBufferAttribute,\n Sphere,\n Vector3,\n WireframeGeometry,\n} from 'three'\n\nconst _box = new Box3()\nconst _vector = new Vector3()\n\nclass LineSegmentsGeometry extends InstancedBufferGeometry {\n constructor() {\n super()\n\n this.isLineSegmentsGeometry = true\n\n this.type = 'LineSegmentsGeometry'\n\n const positions = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0]\n const uvs = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2]\n const index = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5]\n\n this.setIndex(index)\n this.setAttribute('position', new Float32BufferAttribute(positions, 3))\n this.setAttribute('uv', new Float32BufferAttribute(uvs, 2))\n }\n\n applyMatrix4(matrix) {\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined) {\n start.applyMatrix4(matrix)\n\n end.applyMatrix4(matrix)\n\n start.needsUpdate = true\n }\n\n if (this.boundingBox !== null) {\n this.computeBoundingBox()\n }\n\n if (this.boundingSphere !== null) {\n this.computeBoundingSphere()\n }\n\n return this\n }\n\n setPositions(array) {\n let lineSegments\n\n if (array instanceof Float32Array) {\n lineSegments = array\n } else if (Array.isArray(array)) {\n lineSegments = new Float32Array(array)\n }\n\n const instanceBuffer = new InstancedInterleavedBuffer(lineSegments, 6, 1) // xyz, xyz\n\n this.setAttribute('instanceStart', new InterleavedBufferAttribute(instanceBuffer, 3, 0)) // xyz\n this.setAttribute('instanceEnd', new InterleavedBufferAttribute(instanceBuffer, 3, 3)) // xyz\n\n //\n\n this.computeBoundingBox()\n this.computeBoundingSphere()\n\n return this\n }\n\n setColors(array, itemSize = 3) {\n let colors\n\n if (array instanceof Float32Array) {\n colors = array\n } else if (Array.isArray(array)) {\n colors = new Float32Array(array)\n }\n\n const instanceColorBuffer = new InstancedInterleavedBuffer(colors, itemSize * 2, 1) // rgb(a), rgb(a)\n\n this.setAttribute('instanceColorStart', new InterleavedBufferAttribute(instanceColorBuffer, itemSize, 0)) // rgb(a)\n this.setAttribute('instanceColorEnd', new InterleavedBufferAttribute(instanceColorBuffer, itemSize,
|
1
|
+
{"version":3,"file":"LineSegmentsGeometry.js","sources":["../../src/lines/LineSegmentsGeometry.js"],"sourcesContent":["import {\n Box3,\n Float32BufferAttribute,\n InstancedBufferGeometry,\n InstancedInterleavedBuffer,\n InterleavedBufferAttribute,\n Sphere,\n Vector3,\n WireframeGeometry,\n} from 'three'\n\nconst _box = new Box3()\nconst _vector = new Vector3()\n\nclass LineSegmentsGeometry extends InstancedBufferGeometry {\n constructor() {\n super()\n\n this.isLineSegmentsGeometry = true\n\n this.type = 'LineSegmentsGeometry'\n\n const positions = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0]\n const uvs = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2]\n const index = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5]\n\n this.setIndex(index)\n this.setAttribute('position', new Float32BufferAttribute(positions, 3))\n this.setAttribute('uv', new Float32BufferAttribute(uvs, 2))\n }\n\n applyMatrix4(matrix) {\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined) {\n start.applyMatrix4(matrix)\n\n end.applyMatrix4(matrix)\n\n start.needsUpdate = true\n }\n\n if (this.boundingBox !== null) {\n this.computeBoundingBox()\n }\n\n if (this.boundingSphere !== null) {\n this.computeBoundingSphere()\n }\n\n return this\n }\n\n setPositions(array) {\n let lineSegments\n\n if (array instanceof Float32Array) {\n lineSegments = array\n } else if (Array.isArray(array)) {\n lineSegments = new Float32Array(array)\n }\n\n const instanceBuffer = new InstancedInterleavedBuffer(lineSegments, 6, 1) // xyz, xyz\n\n this.setAttribute('instanceStart', new InterleavedBufferAttribute(instanceBuffer, 3, 0)) // xyz\n this.setAttribute('instanceEnd', new InterleavedBufferAttribute(instanceBuffer, 3, 3)) // xyz\n\n //\n\n this.computeBoundingBox()\n this.computeBoundingSphere()\n\n return this\n }\n\n setColors(array, itemSize = 3) {\n let colors\n\n if (array instanceof Float32Array) {\n colors = array\n } else if (Array.isArray(array)) {\n colors = new Float32Array(array)\n }\n\n const instanceColorBuffer = new InstancedInterleavedBuffer(colors, itemSize * 2, 1) // rgb(a), rgb(a)\n\n this.setAttribute('instanceColorStart', new InterleavedBufferAttribute(instanceColorBuffer, itemSize, 0)) // rgb(a)\n this.setAttribute('instanceColorEnd', new InterleavedBufferAttribute(instanceColorBuffer, itemSize, itemSize)) // rgb(a)\n\n return this\n }\n\n fromWireframeGeometry(geometry) {\n this.setPositions(geometry.attributes.position.array)\n\n return this\n }\n\n fromEdgesGeometry(geometry) {\n this.setPositions(geometry.attributes.position.array)\n\n return this\n }\n\n fromMesh(mesh) {\n this.fromWireframeGeometry(new WireframeGeometry(mesh.geometry))\n\n // set colors, maybe\n\n return this\n }\n\n fromLineSegments(lineSegments) {\n const geometry = lineSegments.geometry\n\n this.setPositions(geometry.attributes.position.array) // assumes non-indexed\n\n // set colors, maybe\n\n return this\n }\n\n computeBoundingBox() {\n if (this.boundingBox === null) {\n this.boundingBox = new Box3()\n }\n\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined && end !== undefined) {\n this.boundingBox.setFromBufferAttribute(start)\n\n _box.setFromBufferAttribute(end)\n\n this.boundingBox.union(_box)\n }\n }\n\n computeBoundingSphere() {\n if (this.boundingSphere === null) {\n this.boundingSphere = new Sphere()\n }\n\n if (this.boundingBox === null) {\n this.computeBoundingBox()\n }\n\n const start = this.attributes.instanceStart\n const end = this.attributes.instanceEnd\n\n if (start !== undefined && end !== undefined) {\n const center = this.boundingSphere.center\n\n this.boundingBox.getCenter(center)\n\n let maxRadiusSq = 0\n\n for (let i = 0, il = start.count; i < il; i++) {\n _vector.fromBufferAttribute(start, i)\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector))\n\n _vector.fromBufferAttribute(end, i)\n maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector))\n }\n\n this.boundingSphere.radius = Math.sqrt(maxRadiusSq)\n\n if (isNaN(this.boundingSphere.radius)) {\n console.error(\n 'THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.',\n this,\n )\n }\n }\n }\n\n toJSON() {\n // todo\n }\n\n applyMatrix(matrix) {\n console.warn('THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4().')\n\n return this.applyMatrix4(matrix)\n }\n}\n\nexport { LineSegmentsGeometry }\n"],"names":[],"mappings":";AAWA,MAAM,OAAO,IAAI,KAAM;AACvB,MAAM,UAAU,IAAI,QAAS;AAE7B,MAAM,6BAA6B,wBAAwB;AAAA,EACzD,cAAc;AACZ,UAAO;AAEP,SAAK,yBAAyB;AAE9B,SAAK,OAAO;AAEZ,UAAM,YAAY,CAAC,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,IAA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