Threepipe gltf-transform Plugins
    Preparing search index...

    Class GLTFSpecGlossinessConverterPlugin

    GLTFSpecGlossinessConverterPlugin

    Plugin that adds a gltf loader extension that automatically converts GLTF files with specular glossiness materials (KHR_materials_pbrSpecularGlossiness) to metallic roughness during import.

    To use this plugin, simply add it to the viewer and import a file with specular glossiness materials. If confirm is set to true, a confirmation dialog will be shown before the conversion.

    Hierarchy

    • AViewerPluginSync
      • GLTFSpecGlossinessConverterPlugin
    Index

    Constructors

    Properties

    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    confirm: boolean = true

    Whether to show the confirmation dialog when loading a GLTF file with specular glossiness materials. If set to false, the conversion will be done automatically without confirmation. To disable the conversion entirely, disable the plugin.

    confirmMessage: string = 'GLTF Load: This file includes specular glossiness materials, do you want to convert it to metallic roughness before load?'

    The message to show in the confirmation dialog when loading a GLTF file with specular glossiness materials.

    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    enabled: boolean = true
    toJSON: any = undefined
    uiConfig?: UiObjectConfig<any, string, any> = undefined
    OldPluginType?: string
    PluginType: "GLTFSpecGlossinessConverterPlugin" = 'GLTFSpecGlossinessConverterPlugin'

    Accessors

    Methods

    • 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>