Preparing search index...

    Pins a scene object to a real-world location asset.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    const obj = scene.createSceneObject('LocationAnchor');
    const locatedAt = obj.addComponent('LocatedAtComponent') as Editor.Components.LocatedAtComponent;

    locatedAt.position = new vec3(0, 1, 0);
    console.log(`LocatedAtComponent: position=(${locatedAt.position.x}, ${locatedAt.position.y}, ${locatedAt.position.z})`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean

    Whether the component is active.

    id: Uuid

    The unique id of the entity.

    location: LocationAsset

    Location asset associated with this component.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    name: string

    Name of the component.

    position: vec3

    3D position offset from the location.

    sceneObject: SceneObject

    Scene object this component is attached to.

    type: string

    The entity's type.

    Methods

    • Returns the name of this object's type.

      Returns string

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

      Parameters

      • type: string

      Returns boolean