ThreePipe
    Preparing search index...

    Class DRACOLoader2

    Hierarchy

    Implements

    Index

    Constructors

    Properties

    encoderConfig: any = ...
    encoderPending: null | Promise<any> = null
    isDRACOLoader2: true
    DRACO_LIBRARY_PATH: string = 'https://cdn.jsdelivr.net/gh/google/[email protected]/javascript/'

    Path to the draco decoder/encoder libraries, default uses jsdelivr CDN You may want to set this to your own path or use DRACOLoader2.SetDecoderJsString to bundle the draco decoder js file with your app source

    '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

      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)