Class MeshoptCompression
Hierarchy
- MeshoptCompression
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Constructor
Returns MeshoptCompression
Properties
Static ConfigurationSearch playground for Configuration
The configuration. Defaults to the following:
decoder: {
url: "https://preview.babylonjs.com/meshopt_decoder.js"
}
Accessors
Static Default
-
Default instance for the meshoptimizer object.
Returns MeshoptCompression
Methods
decode Gltf Buffer Async
Decode meshopt data.
Parameters
-
source: Uint8Array
The input data.
-
count: number
The number of elements.
-
stride: number
The stride in bytes.
-
mode: "ATTRIBUTES" | "TRIANGLES" | "INDICES"
The compression mode.
-
Optional filter: string
The compression filter.
Returns Promise<Uint8Array>
a Promise that resolves to the decoded datadisposeSearch playground for dispose
-
Stop all async operations and release resources.
Returns void
Meshopt compression (https://github.com/zeux/meshoptimizer)
This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.
Encoder
The encoder is not currently implemented.
Decoder
By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).
To update the configuration, use the following code:
MeshoptCompression.Configuration = { decoder: { url: "<url to the meshopt decoder library>" } };