Description

Handles input information from user touch input via the TouchComponent to control Scale, Rotation, and Translation of objects.

Example

// Disables the scale functionality on a manipulate component when a user taps
//@input Component.ManipulateComponent manip

function onTap(eventData)
{
script.manip.enableManipulateType(ManipulateType.Scale, false);
}
var tapEvent = script.createEvent("TapEvent");
tapEvent.bind(onTap);
interface ManipulateComponent {
    enabled: boolean;
    isContextualSwivel: boolean;
    isManipulating: boolean;
    maxDistance: number;
    maxHeight: number;
    maxScale: number;
    minDistance: number;
    minHeight: number;
    minScale: number;
    onManipulateEnd: event1<ManipulateEndEventArgs, void>;
    onManipulateStart: event1<ManipulateStartEventArgs, void>;
    rotationScale: number;
    uniqueIdentifier: string;
    clampWorldPosition(): void;
    destroy(): void;
    enableManipulateType(type, enable): void;
    getSceneObject(): SceneObject;
    getTransform(): Transform;
    getTypeName(): string;
    intersectManipulateFrame(screenSpacePoint): ManipulateFrameIntersectResult;
    isManipulateTypeEnabled(type): boolean;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

enabled: boolean

Description

If disabled, the Component will stop enacting its behavior.

isContextualSwivel: boolean

Description

Changes swivel behavior based on the object's height relative to the camera.

isManipulating: boolean

Description

Returns whether the object that the Manipulate Component is on is currently being manipulated

maxDistance: number

Description

The maximum distance the object can travel from the user.

maxHeight: number

Description

The maximum height of the object.

maxScale: number

Description

The maximum size the object can scale to.

minDistance: number

Description

The minimum distance the object can be from the user.

minHeight: number

Description

The minimum height of the object.

minScale: number

Description

The minimum size the object can shrink to.

onManipulateEnd: event1<ManipulateEndEventArgs, void>

Description

Event fired when manipulation ends.

onManipulateStart: event1<ManipulateStartEventArgs, void>

Description

Event fired when manipulation starts.

rotationScale: number

Description

Multiplier for swivel rotation speed. For example, a value of 0.5 will cut rotation speed in half, and a value of 2.0 will double rotation speed.

uniqueIdentifier: string

Methods

  • Returns void

    Description

    Repositions the object to be within the bounds of minDistance, maxDistance.

  • Returns void

    Description

    Destroys the component.

  • Parameters

    Returns void

    Description

    Enables or disables the specified ManipulateType for this ManipulateComponent.

  • Returns string

    Description

    Returns the name of this object's type.

  • Parameters

    • screenSpacePoint: vec2

    Returns ManipulateFrameIntersectResult

    Description

    Checks for an intersection point between the manipulation plane and a line extending from the camera through the specified screen space point. The screen point is passed in as (x, y) with both values ranging from ([0-1], [0-1]), (0,0) being left-top and (1,1) being right-bottom. The result is returned as a ManipulateFrameIntersectResult object.

  • Parameters

    Returns boolean

    Description

    Returns whether the specified ManipulateType is enabled for this ManipulateComponent.

  • Parameters

    • type: string

    Returns boolean

    Description

    Returns true if the object matches or derives from the passed in type.

  • Parameters

    Returns boolean

    Description

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Generated using TypeDoc