Options
All
  • Public
  • Public/Protected
  • All
Menu

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>"
        }
    };

Hierarchy

  • MeshoptCompression

Implements

Index

Constructors

Properties

The configuration. Defaults to the following:

decoder: {
  url: "https://preview.babylonjs.com/meshopt_decoder.js"
}

Accessors

  • Default instance for the meshoptimizer object.

    Returns MeshoptCompression

Methods

  • decodeGltfBufferAsync(source: Uint8Array, count: number, stride: number, mode: "ATTRIBUTES" | "TRIANGLES" | "INDICES", filter?: string): Promise<Uint8Array>

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 data
  • dispose(): void
  • Stop all async operations and release resources.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static property
  • Static method
  • Inherited constructor

Settings

Theme