()
| 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 { |
no test coverage detected