Skip to main content

LensStudio:CoreService.Descriptor

Class

Defines a service's identity, name, description, and dependencies for registration with the plugin system.

Index

Example

// The CoreService Descriptor configures a plugin's identity and dependencies.
// Fields: id (unique string), name (display name), description (optional),
// dependencies (array of interfaces the plugin needs).

const d = new Descriptor();
d.id = 'com.example.myPlugin';
d.name = 'My Plugin';
d.description = 'A sample CoreService plugin descriptor';
d.dependencies = [Editor.Model.IModel];

console.log(`Descriptor id: ${d.id}`);
console.log(`Descriptor name: ${d.name}`);
console.log(`Descriptor description: ${d.description}`);
console.log(`Descriptor dependencies count: ${d.dependencies.length}`);

Extends

Constructors

Constructor

new Descriptor(): Descriptor

Constructs a new service descriptor for registering a CoreService plugin with the plugin system.

Returns

Descriptor

Overrides

BaseDescriptor.constructor

Properties

dependencies

dependencies: InterfaceId[]

Array of interface IDs that this plugin requires to function.

Inherited from

BaseDescriptor.dependencies


description

description: string

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

Inherited from

BaseDescriptor.description


id

id: string

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

Inherited from

BaseDescriptor.id


intendedPlatforms

intendedPlatforms: TargetPlatform[]

Array of target platforms (Snapchat, Spectacles) where this plugin is intended to run.

Inherited from

BaseDescriptor.intendedPlatforms


interfaces

interfaces: InterfaceId[]

Array of interface IDs that this plugin provides or implements.

Inherited from

BaseDescriptor.interfaces


name

name: string

Display name of the plugin.

Inherited from

BaseDescriptor.name

Methods

getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

BaseDescriptor.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

BaseDescriptor.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

BaseDescriptor.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

BaseDescriptor.isSame