Preparing search index...

    Handles touch and interaction detection on 3D meshes.

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

    const obj = scene.createSceneObject('Touchable');
    const ic = obj.addComponent('InteractionComponent') as Editor.Components.InteractionComponent;

    ic.minimumTouchSize = 44;
    ic.depthFilter = true;

    const cam = scene.mainCamera;
    if (!Editor.isNull(cam)) {
    ic.camera = cam;
    }
    console.log(`InteractionComponent: touchSize=${ic.minimumTouchSize}, depthFilter=${ic.depthFilter}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    camera: Camera

    Camera used to raycast interactions.

    depthFilter: boolean

    Whether depth-based filtering is enabled for interactions.

    enabled: boolean

    Whether the component is active.

    id: Uuid

    The unique id of the entity.

    meshVisuals: BaseMeshVisual[]

    Mesh visuals that respond to touch interactions.

    meta: Meta

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

    minimumTouchSize: number

    Minimum touch area in pixels to register an interaction.

    name: string

    Name of the component.

    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