(
callback: (
index: number,
center: THREE.Vector3,
scales: THREE.Vector3,
quaternion: THREE.Quaternion,
opacity: number,
color: THREE.Color,
) => void,
)
| 552 | // Iterate over Gsplats index 0..=(this.numSplats-1), unpack each Gsplat |
| 553 | // and invoke the callback function with the Gsplat attributes. |
| 554 | forEachSplat( |
| 555 | callback: ( |
| 556 | index: number, |
| 557 | center: THREE.Vector3, |
| 558 | scales: THREE.Vector3, |
| 559 | quaternion: THREE.Quaternion, |
| 560 | opacity: number, |
| 561 | color: THREE.Color, |
| 562 | ) => void, |
| 563 | ) { |
| 564 | if (!this.numSplats) { |
| 565 | return; |
| 566 | } |
| 567 | for (let i = 0; i < this.numSplats; ++i) { |
| 568 | const unpacked = decodeExtSplat(this.extArrays, i); |
| 569 | callback( |
| 570 | i, |
| 571 | unpacked.center, |
| 572 | unpacked.scales, |
| 573 | unpacked.quaternion, |
| 574 | unpacked.opacity, |
| 575 | unpacked.color, |
| 576 | ); |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | // Check if source texture needs to be created/updated |
| 581 | private updateTextures() { |
nothing calls this directly
no test coverage detected