Import
SPZLoader is an addon, and must be imported explicitly, see Installation#Addons.
import { SPZLoader } from 'three/addons/loaders/SPZLoader.js';
Constructor
new SPZLoader( manager : LoadingManager )
Constructs a new Gaussian splat SPZ loader.
| manager |
The loading manager. |
Methods
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback )
Starts loading from the given URL and passes the loaded splat data to
the onLoad() callback.
| url |
The path/URL of the file to be loaded. This can also be a data URI. |
| onLoad |
Executed when the loading process has been finished. |
| onProgress |
Executed while the loading is in progress. |
| onError |
Executed when errors occur. |
- Overrides: Loader#load
.parse( buffer : ArrayBuffer, onLoad : function, onError : onErrorCallback ) : BufferGeometry | Promise.<BufferGeometry> | undefined
Decompresses and parses the given .spz data.
| buffer |
The raw SPZ file as an array buffer. |
| onLoad |
Executed when the parsing process has been finished. |
| onError |
Executed when errors occur. |
- Overrides: Loader#parse
- Returns: The parsed splat geometry, or a promise for SPZ v4 data.
.parseRawSPZ( bytes : Uint8Array ) : BufferGeometry
Parses raw SPZ data after gzip decompression.
| bytes |
The decompressed SPZ data. |
- Returns: The parsed splat geometry.
.parseRawSPZV4( bytes : Uint8Array, zstd : ZSTDDecoder ) : BufferGeometry
Parses raw SPZ v4 data.
| bytes |
The raw SPZ v4 data. |
| zstd |
The initialized ZSTD decoder. |
- Returns: The parsed splat geometry.