Interface INeedleGLTFExtensionPlugin

Interface for registering custom glTF extensions to the Needle Engine GLTFLoaders. Register your plugin via addCustomExtensionPlugin

interface INeedleGLTFExtensionPlugin {
    name: string;
    onExport?: OnExportCallback;
    onImport?: OnImportCallback;
    onLoaded?: ((url: string, gltf: GLTF, context: Context) => void);
}

Properties

name: string

The Name of your plugin

onExport?: OnExportCallback

Called before starting to export a glTF file. This callback can be used to add custom extensions to the GLTFExporter

onImport?: OnImportCallback

Called before starting to load a glTF file. This callback can be used to add custom extensions to the GLTFLoader

onLoaded?: ((url: string, gltf: GLTF, context: Context) => void)

Called after the glTF has been loaded