Threepipe gltf-transform Plugins
    Preparing search index...

    Class GLTFDracoExportPlugin

    GLTF Draco Export Plugin

    Overloads the default gltf exporter in the asset manager with GLTFDracoExporter. When exporting with compress = true, the output will be compressed. Note - Only glb supported right now.

    Hierarchy

    • AViewerPluginSync
      • GLTFDracoExportPlugin
    Index

    Constructors

    Properties

    _ctor: (
        assetExporter: IAssetExporter,
        exporter: IExporter,
    ) => undefined | IExportWriter = ...
    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    enabled: boolean = true
    extraExtensions: [string, undefined | Record<string, string | number>][] = ...

    These are added here, but also added as plugins. Added here by default so that the data is not lost if some plugin is not added in an app. To explicitly remove the data, use removeExtension with the name of the extension

    uiConfig?: UiObjectConfig<any, string, any> = undefined
    OldPluginType?: string
    PluginType: "GLTFDracoExportPlugin" = 'GLTFDracoExportPlugin'

    Accessors

    Methods

    • Parameters

      • exporter: AssetExporterPlugin

      Returns (
          | {
              children?: undefined;
              hidden?: undefined;
              label: string;
              onChange: () => undefined | void;
              property: (string | ExportAssetOptions)[];
              type: string;
          }
          | {
              children: (
                  | {
                      bounds: number[];
                      children?: undefined;
                      label: string;
                      property: (undefined | string | EncoderOptions)[];
                      type: string;
                  }
                  | {
                      bounds?: undefined;
                      children: { label: string }[];
                      label: string;
                      property: (undefined | string | EncoderOptions)[];
                      type: string;
                  }
                  | {
                      bounds?: undefined;
                      children: {
                          bounds: number[];
                          label: string;
                          property: (undefined | string | { [key: ...]: ... })[];
                          stepSize: number;
                          type: string;
                      }[];
                      label: string;
                      property?: undefined;
                      type: string;
                  }
              )[];
              hidden: () => boolean;
              label: string;
              onChange?: undefined;
              property?: undefined;
              type: string;
          }
      )[]

    • Parameters

      • e: IViewerEvent

      Returns IViewerEvent

    • Parameters

      • Optionalprefix: string

      Returns string

    • Parameters

      • key: any
      • setDirty: boolean = true

      Returns void

    • Parameters

      • key: any
      • setDirty: boolean = true

      Returns void

    • Returns ISerializedConfig | Record<string, never>

    • Parameters

      • state: any

      Returns Promise<void>

    • Note - don't remove an extension when removing a plugin.

      extensions can be removed if you don't want to save the data of some plugin when transforming glb. But since this is not desirable in most cases, it is not recommended.

      Parameters

      • name: string

      Returns void

    • Parameters

      • Optionalmeta: SerializationMetaType

      Returns ISerializedConfig