MCPcopy Index your code
hub / github.com/sparkjsdev/spark / getSplat

Method getSplat

src/ExtSplats.ts:475–486  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

473 // center: THREE.Vector3, scales: THREE.Vector3, quaternion: THREE.Quaternion,
474 // opacity: number 0..1, color: THREE.Color 0..1.
475 getSplat(index: number): {
476 center: THREE.Vector3;
477 scales: THREE.Vector3;
478 quaternion: THREE.Quaternion;
479 opacity: number;
480 color: THREE.Color;
481 } {
482 if (index >= this.numSplats) {
483 throw new Error("Invalid index");
484 }
485 return decodeExtSplat(this.extArrays, index);
486 }
487
488 // Set all ExtSplat components at index with the provided Gsplat attributes
489 // (can be the same objects returned by getSplat). Ensures there is capacity

Callers 1

extractSplatsMethod · 0.95

Calls 1

decodeExtSplatFunction · 0.90

Tested by

no test coverage detected