Class DRACOLoader2

Hierarchy

Implements

Constructors

Properties

encoderConfig: any = ...
encoderPending: null | Promise<any> = null
DRACO_LIBRARY_PATH: string = 'https://cdn.jsdelivr.net/gh/google/[email protected]/javascript/'
LibraryValueMap: Record<string, any> = {}

This is a hack to allow bundling the draco decoder js file with your app source See DRACOLoader2.SetDecoderJsString for example

Methods

  • Set the decoder js string Sample for how to set LibraryValueMap This is useful for bundling the draco decoder js file with your app source

    Parameters

    • jsString: string

      the contents of draco_decoder.js file

    Returns void

    Example

    First put the draco_decoder.js file in your src folder, then import it in js/ts as a string

    import draco_decoder from './libs/draco_decoder.1.5.6.js?raw' // vite will load this as a string
    // console.log(draco_decoder) // this should be a string with js content
    DRACOLoader2.SetDecoderJsString(draco_decoder)

Generated using TypeDoc