Interface ISceneLoaderPluginFactory
interface ISceneLoaderPluginFactory {
extensions: string | ISceneLoaderPluginExtensions;
name: string;
canDirectLoad?(data: string): boolean;
createPlugin(
options: SceneLoaderPluginOptions,
):
| ISceneLoaderPlugin
| ISceneLoaderPluginAsync
| Promise<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
}
extensions: string | ISceneLoaderPluginExtensions;
name: string;
canDirectLoad?(data: string): boolean;
createPlugin(
options: SceneLoaderPluginOptions,
):
| ISceneLoaderPlugin
| ISceneLoaderPluginAsync
| Promise<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
}
Hierarchy (View Summary)
- ISceneLoaderPluginMetadata
- ISceneLoaderPluginFactory
Properties
Readonlyextensions
The file extensions supported by the plugin.
Readonlyname
name: string
The friendly name of the plugin.
Methods
Optionalcan Direct Load
-
The callback that returns true if the data can be directly loaded.
Parameters
- data: string
string containing the file data
Returns boolean
if the data can be loaded directly
- data: string
create Plugin
-
createPlugin(
options: SceneLoaderPluginOptions,
):
| ISceneLoaderPlugin
| ISceneLoaderPluginAsync
| Promise<ISceneLoaderPlugin | ISceneLoaderPluginAsync>Function called to create a new plugin
Parameters
- options: SceneLoaderPluginOptions
plugin options that were passed to the SceneLoader operation
Returns
| ISceneLoaderPlugin
| ISceneLoaderPluginAsync
| Promise<ISceneLoaderPlugin | ISceneLoaderPluginAsync>the new plugin
- options: SceneLoaderPluginOptions
Interface used by SceneLoader plugin factory