Skip to main content

Editor

Class

Namespace that provides access to the components of Lens Studio.

Index

Example

// Get the model component
const model = this.pluginSystem.findInterface(Editor.Model.IModel);
// Get the AssetManager in the current project (e.g. to import file).
const assetManager = model.project.assetManager;

Methods

createAnimationClip()

static createAnimationClip(scene): AnimationClip

Create a new animation clip for the given scene.

Parameters

ParameterType
sceneScene

Returns

AnimationClip


isNull()

static isNull(object): boolean

Check if a native object is null or destroyed.

Parameters

ParameterType
objectany

Returns

boolean

Nested types

Namespaces

NamespaceDescription
Alignment-

Enumerations

EnumerationDescription
AnimationLayerBlendModeEnum defining how animation layers blend with the base animation.
AnimationLayerScaleModeDefines how animation layer scaling is applied to the base animation.
AxisEnum of spatial axes.
PlaybackModeEnumeration of animation playback modes.
TargetPlatformEnum of platforms a Lens Studio plugin or project can target.

Classes

ClassDescription
AiAccess AI chat functionality and message history.
AnimationClipRepresents an animation clip instance with playback configuration.
AssetsNamespace containing all asset types for Lens Studio projects.
BufferWraps a byte array for data serialization and deserialization.
ComponentsContainer for all scene component types and related enums.
CompressionProvides compression and decompression utilities.
ContextActionAn action in a Editor.IContextActionRegistry.
DockContainer for dock panel management functionality.
GaussianSplattingNamespace providing utilities to create and import Gaussian splatting (GSAF) assets from PLY input files.
GraphUtility class for converting between binary and YAML representations of graph files.
IAuthorizationComponent that allows you to check whether Lens Studio is authorized, as well as get authorization. Requires snap_auth_token in the module.json of your plugin.
IconAn icon to be used in the Editor UI.
IContextEditor context passed to context action callbacks when a right-click menu is triggered.
IContextActionRegistryA registry of Editor.ContextAction which will be shown in a contextual menu (i.e. right click).
IEntityPickerPopup window that allows the user to choose specific objects in the Scene hierarchy, or assets in the Asset Browser.
IGuardRepresents ownership of a resource. If this object is garbage collected, or dispose() method is called – the associated resource is freed.
IInterfaceBase interface type for Editor plugin system objects.
InterfaceIdUnique identifier for plugin interfaces.
IPackageActionsInterface for package-level actions.
IPackageRegistryInterface for package discovery and registration.
IPluginInterface representing a plugin.
IPluginComponentInterface for plugin component registration.
IRuntimeBundleExporterInterface for exporting an asset, together with the assets it references, as a runtime bundle file. Resolve it through pluginSystem.findInterface().
ModelThe model object is a core concept in the plugin development environment. It serves as a central point for accessing key elements such as the scene, project, and Editor.Model.AssetManager. The model object encapsulates the data model representing a Lens Studio project. It brings together environment entities and functionalities that are essential for developing plugins. It plays a role analogous to the "Model" component found in Model-View-Controller architectural patterns, containing both data and business logic. In order to get the model object, which many key objects are stored within, you need the pluginSystem object which is being passed into the constructor of the plugin class, along with the ID of the model component (which can be accessed through the Editor namespace)
MyLensesNamespace for Lens Studio's My Lenses account integration. It has no public members; account state is available through Editor.IAuthorization.
PackageMetadataMetadata information about a package.
PathA path in the filesystem, or Asset Manager. Useful for things like importing files into Lens Studio through the Editor.Model.AssetManager.
PluginSystemProvides access to the Lens Studio editor plugins, components, and interfaces
PointRepresents a 2D point with x and y coordinates.
RectRepresents a 2D rectangle with position and dimensions.
RuntimeBundleExporterLens Studio's built-in implementation of Editor.IRuntimeBundleExporter. Obtain it through pluginSystem.findInterface(Editor.IRuntimeBundleExporter) instead of constructing it.
ScopedConnectionStores event listener connections, automatically cleaned up on scope exit.
ShapeRepresents a 2D or 3D shape object.
SizeUsed with Editor.Assets.RenderTarget.
TransformRepresents position, rotation, and scale in 3D space.
VersionVersion information for the editor or plugin.