MCPcopy
hub / github.com/sparkjsdev/spark / getTexture

Method getTexture

src/PackedSplats.ts:685–697  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

683 // Returns a THREE.DataArrayTexture representing the PackedSplats content as
684 // a Uint32x4 data array texture (2048 x 2048 x depth in size)
685 getTexture(): THREE.DataArrayTexture {
686 if (this.target) {
687 // Return the render target's texture
688 return this.target.texture;
689 }
690 if (this.source || this.packedArray) {
691 // Update source texture if needed and return
692 const source = this.maybeUpdateSource();
693 return source;
694 }
695
696 return PackedSplats.getEmptyArray;
697 }
698
699 // Check if source texture needs to be created/updated
700 private maybeUpdateSource(): THREE.DataArrayTexture {

Callers 1

constructorMethod · 0.45

Calls 1

maybeUpdateSourceMethod · 0.95

Tested by

no test coverage detected