Preparing search index...

    Configuration descriptor for the AssetInstantiator plugin, extending BaseDescriptor.

    // AssetInstantiator.Descriptor extends BaseDescriptor and adds canInstantiate,
    // a callback that determines whether this instantiator handles a given asset.
    // Lens Studio dispatches drops to the first registered instantiator whose
    // descriptor.canInstantiate returns true for the asset.
    const d = new Descriptor();
    d.id = 'com.docs.AssetInstantiatorDescriptorExample';
    d.name = 'Texture Drop Instantiator';
    d.description = 'Drops a Texture into the scene as a textured plane';
    d.dependencies = [Editor.Model.IModel];
    d.canInstantiate = (asset: Editor.Assets.Asset) => asset.isOfType('Texture');

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    canInstantiate: (arg1: Editor.Assets.Asset) => any

    Function that takes an asset and returns whether it can be instantiated by this descriptor.

    dependencies: InterfaceId[]

    Array of interface IDs that this plugin requires to function.

    description: string

    Human-readable description of the plugin shown in the plugin manager.

    id: string

    Unique identifier for the plugin, typically in reverse domain notation.

    interfaces: InterfaceId[]

    Array of interface IDs that this plugin provides or implements.

    name: string

    Display name of the plugin.

    Methods

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean