Plugin that processes tile geometry buffer attributes into smaller data types on load and disables texture mipmaps to save memory. Can reduce geometry memory footprint by more than half and texture memory by around a third. Note that the default attribute size when compression is enabled is fairly aggressive and may cause visual artifacts.
On this page
Methods
new TileCompressionPlugin(
options?: {
// Generate vertex normals if absent.
generateNormals: boolean = false,
// Disable mipmap generation on tile textures.
disableMipmaps: boolean = true,
// Compress index buffers to the smallest fitting integer type.
compressIndex: boolean = true,
// Compress normal attributes.
compressNormals: boolean = false,
// Compress UV attributes.
compressUvs: boolean = false,
// Compress position attributes.
compressPosition: boolean = false,
// Target type for UV compression.
uvType: TypedArrayConstructor = Int8Array,
// Target type for normal compression.
normalType: TypedArrayConstructor = Int8Array,
// Target type for position compression.
positionType: TypedArrayConstructor = Int16Array
}
)