Binds scripts to Events and executes them when triggered. Any script can access the ScriptComponent executing them through the variable script. See also: Scripting Overview, Script Events Guide.

// Bind a function to the MouthOpened event
function onMouthOpen(eventData)
{
print("mouth was opened");
}
var event = script.createEvent("MouthOpenedEvent");
event.bind(onMouthOpen);

Hierarchy (view full)

Constructors

Properties

api: Record<string, any>
beta: number = 0.015
dcutoff: number = 1
enabled: boolean

If disabled, the Component will stop enacting its behavior.

enableStretchZ: boolean = true
maximumScaleFactor: number = 20
minCutoff: number = 2
minimumScaleFactor: number = 0.25
name: string
onManipulationEnd: PublicApi<TransformEventArg> = ...

Callback for when any manipulation ends

onManipulationStart: PublicApi<TransformEventArg> = ...

Callback for when any manipulation begins

onManipulationUpdate: PublicApi<TransformEventArg> = ...

Callback for when any manipulation updates

onRotationEnd: PublicApi<RotationEventArg> = ...

Callback for when rotation has ended

onRotationStart: PublicApi<RotationEventArg> = ...

Callback for when rotation begins

onRotationUpdate: PublicApi<RotationEventArg> = ...

Callback for when rotation updates each frame

onScaleEnd: PublicApi<ScaleEventArg> = ...

Callback for when scale has ended

onScaleLimitReached: PublicApi<ScaleLimitEventArg> = ...

Callback for when scale has reached the minimum or maximum limit

onScaleStart: PublicApi<ScaleEventArg> = ...

Callback for when scale begins

onScaleUpdate: PublicApi<ScaleEventArg> = ...

Callback for when scale updates each frame

onTranslationEnd: PublicApi<TranslateEventArg> = ...

Callback for when translation has ended

onTranslationStart: PublicApi<TranslateEventArg> = ...

Callback for when translation begins

onTranslationUpdate: PublicApi<TranslateEventArg> = ...

Callback for when translation updates each frame

sceneObject: SceneObject
showRotationProperties: boolean = false
showStretchZProperties: boolean = false
showTranslationProperties: boolean = false
uniqueIdentifier: string
updatePriority: number
zStretchFactorMax: number = 12.0
zStretchFactorMin: number = 1.0

Accessors

  • get enableXTranslation(): boolean
  • Returns if translation along world X-axis is enabled.

    Returns boolean

  • set enableXTranslation(enabled): void
  • Set if translation along world X-axis is enabled.

    Parameters

    • enabled: boolean

    Returns void

  • get enableYTranslation(): boolean
  • Returns if translation along world Y-axis is enabled.

    Returns boolean

  • set enableYTranslation(enabled): void
  • Set if translation along world Y-axis is enabled.

    Parameters

    • enabled: boolean

    Returns void

  • get enableZTranslation(): boolean
  • Returns if translation along world Z-axis is enabled.

    Returns boolean

  • set enableZTranslation(enabled): void
  • Set if translation along world Z-axis is enabled.

    Parameters

    • enabled: boolean

    Returns void

  • get rotationAxis(): RotationAxis
  • Get if rotation occurs about all axes or a single world axis (x,y,z) when using to two hands..

    Returns RotationAxis

  • set rotationAxis(axis): void
  • Set if rotation occurs about all axes or a single world axis (x,y,z) when using to two hands.

    Parameters

    Returns void

Methods

  • Returns true if any of rotation x, y, or z is enabled

    Returns boolean

  • Returns true if any of scale x, y, or z is enabled

    Returns boolean

  • Returns true translation is enabled

    Returns boolean

  • Gets the transform of the root of the manipulated object(s).

    Returns Transform

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

    Parameters

    • type: string

    Returns boolean

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

    Parameters

    Returns boolean

  • Returns void

  • Resets the interactable's position

    Parameters

    • local: boolean = false

    Returns void

  • Resets the interactable's rotation

    Parameters

    • local: boolean = false

    Returns void

  • Resets the interactable's scale

    Parameters

    • local: boolean = false

    Returns void

  • Resets the interactable's transform

    Parameters

    • local: boolean = false

    Returns void

  • Toggle for allowing an object to rotate

    Parameters

    • enabled: boolean

    Returns void

  • Toggle for allowing an object to scale

    Parameters

    • enabled: boolean

    Returns void

  • Toggle for allowing an object to translate

    Parameters

    • enabled: boolean

    Returns void

  • Sets the transform of the passed SceneObject as the root of the manipulated object(s).

    Parameters

    Returns void