Preparing search index...

    Enables drag, rotate, and scale interactions on a scene object.

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

    const obj = scene.createSceneObject('Manipulable');
    const mc = obj.addComponent('ManipulateComponent') as Editor.Components.ManipulateComponent;

    mc.drag = true;
    mc.rotate = true;
    mc.scale = true;
    mc.minScale = 0.5;
    mc.maxScale = 3.0;
    mc.minDistance = 10;
    mc.maxDistance = 200;
    console.log(`Manipulate: drag=${mc.drag}, rotate=${mc.rotate}, scale=${mc.scale}`);
    console.log(` scale: [${mc.minScale}, ${mc.maxScale}], distance: [${mc.minDistance}, ${mc.maxDistance}]`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    drag: boolean

    Whether dragging is enabled.

    enabled: boolean

    Whether the component is active.

    id: Uuid

    The unique id of the entity.

    maxDistance: number

    Maximum distance objects can be dragged.

    maxScale: number

    Maximum allowed scale factor.

    meta: Meta

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

    minDistance: number

    Minimum distance objects can be dragged.

    minScale: number

    Minimum allowed scale factor.

    name: string

    Name of the component.

    rotate: boolean

    Whether rotation is enabled.

    scale: boolean

    Whether scaling is enabled.

    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