Options
All
  • Public
  • Public/Protected
  • All
V1.7
  • V1.6
  • V1.7
Menu

Class LandscapeApp

Base class for Lumin Runtime landscape apps.

Hierarchy

Index

Constructors

Methods

Constructors

constructor

  • Creates a landscape application instance.

    Parameters

    • Optional a_fTimeDelta: number

      default = 0.0
      - the preferred update rate as a time interval in seconds. As a special case, 0.0f represents event-based mode, where update callbacks will not happen at regular intervals -- only in response to events.

    Returns LandscapeApp

Methods

addNamed6DOFPoseAction

  • addNamed6DOFPoseAction(a_actionName: string): number
  • Maps Control's 6DoF to a NamedInputEventData.

    Parameters

    • a_actionName: string

      The name of the NamedInputEventData.

    Returns number

    The Id that can be used to identify this event when received in the eventListener

addNamedButtonAction

  • addNamedButtonAction(a_actionName: string, a_keyCode: KeyCodes, a_longPress?: boolean): number
  • Maps a Control button to a NamedInputEventData.

    Parameters

    • a_actionName: string

      The name of the NamedInputEventData.

    • a_keyCode: KeyCodes

      The button's key code

    • Optional a_longPress: boolean

      default = false
      Whether the event should be emitted on long press (true) or short press (false)

    Returns number

    The Id that can be used to identify this event when received in the eventListener

addNamedEyeTrackingAction

  • addNamedEyeTrackingAction(a_actionName: string): number
  • Maps eye tracking events to a NamedInputEventData.

    Parameters

    • a_actionName: string

      The name of the NamedInputEventData.

    Returns number

    The Id that can be used to identify this event when received in the eventListener

addNamedHandGestureAction

  • addNamedHandGestureAction(a_actionName: string, a_handGesture: GestureType, a_hold?: boolean, a_once?: boolean, a_handIndex?: number): number
  • Maps the hand gesture to a NamedInputEventData.

    Parameters

    • a_actionName: string

      The name of the NamedInputEventData.

    • a_handGesture: GestureType

      Hand gesture type.

    • Optional a_hold: boolean

      default = false
      Whether the event should be sent immediately (true), or send only if the gesture is held for 1.5 seconds (false).

    • Optional a_once: boolean

      default = true
      Whether the event should be repeated (true), or send only once (false).

    • Optional a_handIndex: number

      default = 0xFFFFFFFF
      Hand index that the event should be associated with (Left = 0, Right = 1, Both = 0xFFFFFFFF).

    Returns number

    The Id that can be used to identify this event when received in the eventListener.

addNamedTouchAction

  • Maps a Control gesture to a NamedInputEventData.

    Parameters

    • a_actionName: string

      The name of the NamedInputEventData.

    • a_touchGesture: GestureType

      Touch gesture type.

    • Optional a_touchDirection: GestureDirection

      default = input.GestureDirection.UNKNOWN
      Gesture's direction (GestureDirection::UNKNOWN for all).

    Returns number

    The Id that can be used to identify this event when received in the eventListener

checkPrivilege

deInit

  • deInit(): number

deletePrism

  • deletePrism(prism: Prism | null): void

deregisterForConnectionsInviteEvents

  • deregisterForConnectionsInviteEvents(): boolean

disableContentPersistence

  • disableContentPersistence(a_prism: Prism | null): boolean
  • Stops persisting a given Prism's content across reboots

    By default a Prism's content persists across reboots. This means that all opened Prisms are saved when the device shuts down. Prisms that are explicitly closed by the user or app prior to shutdown are not saved. When the device boots up, and the area (dense mesh) is recognized, then all saved Prisms are restored by automatically starting the apps associated with the Prisms and asking them to request new Prisms. If the app saved their content persistence ID locally prior to shutdown, then for each restored Prism they can figure out how exactly to restore it.

    Parameters

    • a_prism: Prism | null

      the Prism

    Returns boolean

    whether this call was successful or not

dismissAllNotifications

  • dismissAllNotifications(): void

dismissNotification

eventListener

getBodyDynamic

  • Retrieves the current body dynamic type for the Prism

    See setBodyDynamic for information on body dynamics.

    Parameters

    • a_prism: Prism | null

      the Prism

    Returns BodyDynamicType | null

    the body dynamic of the Prism

getCollisionBoxTransform

  • getCollisionBoxTransform(a_prism: Prism | null): [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] | null
  • Get the transform of the collision box attached to the given prism.

    Parameters

    • a_prism: Prism | null

      the prism.

    Returns [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] | null

    transform of collision box attached to the given prism or null if call was not successful

getCollisionsEnabled

  • getCollisionsEnabled(a_prism: Prism | null): boolean | null
  • Get whether the given prism participates in collisions when prisms are in motion.

    Parameters

    • a_prism: Prism | null

      Prism to get whether collisions are enabled.

    Returns boolean | null

    True if collisions are enabled for the given prism; false otherwise.

getComponentName

  • getComponentName(): string

getContentPersistenceId

  • getContentPersistenceId(a_prism: Prism | null): string | null
  • Gets the Content Persistence ID assigned to the Prism

    This is the ID assigned to a Prism that is saved across reboots. Note that if this Prism is destroyed before the device shuts down, then this ID is no longer valid. See disableContentPersistence for more information on content persistence.

    Parameters

    • a_prism: Prism | null

      the Prism

    Returns string | null

    the Content Persistence ID assigned to this Prism

getCurrentLocaleHelper

getDirectManipulationEnabled

  • getDirectManipulationEnabled(a_prism: Prism | null): boolean | null
  • Gets the bool for whether direct manipulation is enabled or not for this Prism

    See setDirectManipulationEnabled for information on direct manipulation.

    Parameters

    • a_prism: Prism | null

      the Prism

    Returns boolean | null

    whether direct manipulation is enabled for the prism

getFloorHeight

  • getFloorHeight(): number | null
  • Returns the height (y-value) of the floor, if known, in world coordinates.

    priv

    WorldReconstruction

    Returns number | null

    Returned floor height.

getHeadposeConfidence

  • getHeadposeConfidence(): number

getHeadposeError

  • getHeadposeError(): Error

getHeadposeMode

  • getHeadposeMode(): Mode

getHeadposeWorldForwardVector

  • getHeadposeWorldForwardVector(): [number, number, number]

getHeadposeWorldPosition

  • getHeadposeWorldPosition(): [number, number, number]

getHeadposeWorldUpVector

  • getHeadposeWorldUpVector(): [number, number, number]

getInput

  • Get the input state tracking system (used to maintain the list of active input devices and track their input)

    Returns InputHelper | null

    a pointer to the input state tracking system

getLocaleCode

  • getLocaleCode(): string | null

getNearestPCF

  • getNearestPCF(worldLocation: [number, number, number] | Float32Array): PCFId
  • Returns the nearest Persistent Coordinate Frame to a given world location. NOTE: This function can be slow, use sparingly.

    priv

    PcfRead

    Parameters

    • worldLocation: [number, number, number] | Float32Array

      Position to get the PCF from.

    Returns PCFId

    The PCF. If it is INVALID_PCF, it is likely the world mesh hasn't been built up enough to create the PCF data, or the app doesn't have the PcfRead privilege set.

getPCFCount

  • getPCFCount(): number

getPCFData

  • Gets data associated with a given PCF.

    priv

    PcfRead

    Parameters

    • pcf: PCFId

      The PCF to fetch data for.

    Returns PCFData

    PCF data. Check the state value of the returned data to verify that it is good.

getPCFs

  • getPCFs(): Array<PCFId>
  • Returns a list of the Persistent Coordinate Frames the system knows about. It is suggested that this function should only be called when getPCFCount() > 0 and has changed since the previous call.

    priv

    PcfRead

    Returns Array<PCFId>

    PCF list.

getPackageName

  • getPackageName(): string

getPackagePath

  • getPackagePath(): string

getPhysicalSizeRange

  • getPhysicalSizeRange(a_prism: Prism | null): [number, number] | null
  • Gets the physical size range of the Prism

    See setPhysicalSizeRange for information on size ranges.

    Parameters

    • a_prism: Prism | null

      the Prism

    Returns [number, number] | null

    pair of minimum/maximum phisical size this prism can be, in meters or null if call was not successful

getPreloadedResources

getPrism

  • getPrism(prismId: bigint): Prism | null

getPrismPosition

  • getPrismPosition(a_prism: Prism | null): [number, number, number]

getPrismRotation

  • getPrismRotation(a_prism: Prism | null): [number, number, number, number]

getPrismTransform

  • getPrismTransform(a_prism: Prism | null): [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]
  • Returns the transform of a volume in world space

    Parameters

    • a_prism: Prism | null

      the prism

    Returns [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]

    The transform of the Prism in world space

getScaleMode

  • Gets the scale mode of the Prism

    See setBodyDynamic for information on scale modes.

    Parameters

    • a_prism: Prism | null

      the Prism

    Returns ScaleModeType | null

    the scale mode retrieved from the Prism

getSnap

  • getSnap(a_prism: Prism | null): boolean | null
  • Gets whether this Prism should snap while being moved or not

    See setSnap for information on snapping.

    Parameters

    • a_prism: Prism | null

      the Prism

    Returns boolean | null

    whether this Prism is snapping or not

getTempPath

  • getTempPath(): string
  • Returns the application's path for temporary files

    note

    the path will have a trailing / appended to it e.g. /data/local/tmp/

    priv

    none

    Returns string

getVisibleName

  • getVisibleName(): string

getWritablePath

  • getWritablePath(): string
  • Returns the application's writable path.

    This folder is accessible to the application when the user has logged in once, even if the device is locked and not in use. An application that needs to write data when running in the background (e.g. a music app) should use this path. The same application can continue using this path when the device is unlocked afterwards.

    note

    the path will have a trailing / appended to it e.g. /data/user/1/apps/com.magicleap.app/documents/C2/

    priv

    none

    Returns string

getWritablePathWhenUnlocked

  • getWritablePathWhenUnlocked(): string
  • Returns the application's writable path while unlocked.

    This folder is accessible to the application when the user has logged in and the device is unlocked and being used.

    note

    the path will have a trailing / appended to it e.g. /data/user/1/apps/com.magicleap.app/documents/C2/

    priv

    none

    Returns string

isImageTrackingReady

  • isImageTrackingReady(): boolean
  • Returns if the image tracking system is ready to be used. Do not call any image tracking functions until this function returns true.

    Currently image tracking is only available for immersive apps.

    priv

    CameraCapture

    Returns boolean

    true if we can start tracking images.

isInternetConnected

  • isInternetConnected(): boolean

isShareableApp

  • isShareableApp(): boolean

isWiFiConnected

  • isWiFiConnected(): boolean

isWiFiEnabled

  • isWiFiEnabled(): boolean

lockCurrentLocaleHelperToLocale

  • lockCurrentLocaleHelperToLocale(localeCode: string): void

onAppPause

  • onAppPause(): void

onAppResume

  • onAppResume(): void

onAppStart

  • onAppStart(initArg: InitArg): void

onAppUnloadResources

  • onAppUnloadResources(): void

onDeviceActive

  • onDeviceActive(): void

onDeviceReality

  • onDeviceReality(): void

onDeviceStandby

  • onDeviceStandby(): void

onSharingStart

  • onSharingStart(sessionId: bigint, sceneGraphIDs: Array<bigint>): void

onSharingStop

  • onSharingStop(sessionId: bigint): void

orientPrism

  • orientPrism(a_prism: Prism | null, a_orientation: [number, number, number, number] | Float32Array): void
  • Sets the Orientation of the Prism

    Parameters

    • a_prism: Prism | null

      the prism

    • a_orientation: [number, number, number, number] | Float32Array

      the new prism orientation quaternion

    Returns void

orientPrismRelativeToCamera

  • orientPrismRelativeToCamera(a_prism: Prism | null, a_orientation: [number, number, number, number] | Float32Array): void

positionPrism

  • positionPrism(a_prism: Prism | null, a_position: [number, number, number] | Float32Array): void

positionPrismRelativeToCamera

  • positionPrismRelativeToCamera(a_prism: Prism | null, a_position: [number, number, number] | Float32Array): void

postNotification

  • postNotification(notification: Notification | null): boolean
  • Post the given notification

    priv

    NormalNotificationsUsage

    Parameters

    • notification: Notification | null

      the notification to post

    Returns boolean

    true if the notification was posted successfully, false otherwise

quit

  • quit(): void
  • The application will terminate on the next update loop when this is called.

    priv

    none

    Returns void

raycastNodes

  • raycastNodes(a_prism: Prism | null, a_rayStart: [number, number, number] | Float32Array, a_rayEnd: [number, number, number] | Float32Array): RayCastResultLight | null
  • Do a raycast in a prism and return the results.

    Parameters

    • a_prism: Prism | null

      Prism to do the ray in.

    • a_rayStart: [number, number, number] | Float32Array

      Ray starting position, in volume coordinates.

    • a_rayEnd: [number, number, number] | Float32Array

      Ray end position, in volume coordinates.

    Returns RayCastResultLight | null

    Hit data.

registerForConnectionsInviteEvents

  • registerForConnectionsInviteEvents(): boolean

registerOnLocaleChangedCallback

  • registerOnLocaleChangedCallback(callbackFunction: ((arg0: string) => void) | null): CallbackID
  • Register a callback for when the system locale is changed

    Parameters

    • callbackFunction: ((arg0: string) => void) | null

      the function to be called (the new locale code is given as a parameter)

    Returns CallbackID

    the internal ID of the callback, can be used to unregister the callback

requestNewPrism

  • requestNewPrism(a_size: [number, number, number] | Float32Array): Prism | null
  • Get a new Prism for use by the Application

    priv

    none

    Parameters

    • a_size: [number, number, number] | Float32Array

      width, height, and breadth of the prism.

    Returns Prism | null

    Prism - The prism

requestPrivilege

requestPrivilegeBlocking

requestWorldPlaneCast

  • requestWorldPlaneCast(center: [number, number, number] | Float32Array, maxDistance: number, maxPlaneCount: number, flags: PlanecastFlags, userValue: bigint): boolean
  • Sends a request to the server to search for planes in the environment that match given criteria. A WorldPlaneCastEventData instance will be sent to the app's eventListener function when the data is ready.

    priv

    WorldReconstruction

    Parameters

    • center: [number, number, number] | Float32Array

      Position in world-space that is the center of the search space.

    • maxDistance: number

      Max distance from the center to search for planes.

    • maxPlaneCount: number

      Maximum number of planes to return.

    • flags: PlanecastFlags

      Flags to determine what kind of planes to look for.

    • userValue: bigint

      Value that will be sent back in the WorldPlaneCastEventData instance.

    Returns boolean

    true if the request was sent, false on error

requestWorldRayCast

  • requestWorldRayCast(rayStart: [number, number, number] | Float32Array, rayDir: [number, number, number] | Float32Array, userValue: bigint, confidenceThreshold?: number): boolean
  • requestWorldRayCast(rayStart: [number, number, number] | Float32Array, rayDir: [number, number, number] | Float32Array, width: number, height: number, horizFovDeg: number, userValue: bigint, confidenceThreshold?: number): boolean
  • Performs a single ray cast against the world around you. Results are returned as a WorldRayCastEventData to the app's eventListener function.

    priv

    WorldReconstruction

    Parameters

    • rayStart: [number, number, number] | Float32Array

      The start point of the ray, in world space.

    • rayDir: [number, number, number] | Float32Array

      Direction to shoot the ray

    • userValue: bigint

      Custom data that you wish to record with this request

    • Optional confidenceThreshold: number

      default = 0.199
      Confidence level (between 0 and 1) that must be reached for the raycast to be considered valid

    Returns boolean

    true if the request was sent, false on error

  • Performs an area ray cast against the world around you. Results are returned as a WorldRayCastEventData to the app's eventListener function.

    priv

    WorldReconstruction

    Parameters

    • rayStart: [number, number, number] | Float32Array

      The start point of the ray, in world space.

    • rayDir: [number, number, number] | Float32Array

      Direction to shoot the ray

    • width: number

      Number of horizontal rays

    • height: number

      Number of vertical rays

    • horizFovDeg: number

      Horizontal field-of-view, in degrees

    • userValue: bigint

      Custom data that you wish to record with this request

    • Optional confidenceThreshold: number

      default = 0.199
      Confidence level (between 0 and 1) that must be reached for the raycast to be considered valid

    Returns boolean

    true if the request was sent, false on error

resizePrism

  • resizePrism(a_prism: Prism | null, a_size: [number, number, number] | Float32Array): void
  • Resizes the Prism

    Parameters

    • a_prism: Prism | null

      the prism to resize

    • a_size: [number, number, number] | Float32Array

      the new size of the prism

    Returns void

setAudioOutputDeviceChangeCallback

  • setAudioOutputDeviceChangeCallback(callback: ((arg0: AudioOutputDevice) => void) | null): void
  • Sets the callback function to be called when audio output device is changed. Note: The callback will run on main thread. No need to use runOnMainThread() inside the callback.

    Parameters

    • callback: ((arg0: AudioOutputDevice) => void) | null

      std::function to be called as callback. See AudioOutputDeviceChangedCallback.

    Returns void

setBodyDynamic

  • Sets a body dynamic with the given parameters to the Prism

    A body dynamic is how the Prism behaves passively in the landscape. For example, one body dynamic can make a Prism rotate (billboard) towards the user as they walk around the Prism. By default Prisms are static (un-moving) once placed in the landscape.

    Parameters

    • a_prism: Prism | null

      the Prism

    • a_bodyDynamicType: BodyDynamicType

      the body dynamic type to set to the prism

    Returns boolean

    whether this call was successful or not

setCollisionBoxTransform

  • setCollisionBoxTransform(a_prism: Prism | null, a_position: [number, number, number] | Float32Array, a_rotation: [number, number, number, number] | Float32Array, a_scale: [number, number, number] | Float32Array): boolean
  • Set the components of the transform of the collision box attached to the given prism.

    The transform of the collision box is relative to the boundaries of the prism. It is required that the final transformed collision box not exceed the boundaries of the prism itself along any axis.

    Parameters

    • a_prism: Prism | null

      Prism whose collision box will be affected.

    • a_position: [number, number, number] | Float32Array

      Position to set for the collision box attached to the given prism. The default value is the origin: (0, 0, 0).

    • a_rotation: [number, number, number, number] | Float32Array

      Rotation to set for the collision box attached to the given prism, which must be normalized. The default value is unrotated.

    • a_scale: [number, number, number] | Float32Array

      Scale to set for the collision box attached to the given prism. The default value is unscaled: (1, 1, 1).

    Returns boolean

    True if the call was successful and the collision-box transform was set; false otherwise, in which case additional information will be posted in the log.

setCollisionsEnabled

  • setCollisionsEnabled(a_prism: Prism | null, a_enableCollisions: boolean): boolean
  • Set whether the given prism participates in collisions when prisms are in motion.

    This capability has been provided for app developers to handle edge cases involving multi-prism apps. By default, collisions are enabled when new prisms are created. It is recommended to change it only with discretion.

    Parameters

    • a_prism: Prism | null

      Prism to enable/disable collisions.

    • a_enableCollisions: boolean

      Collisions will be enabled if true; disabled if false.

    Returns boolean

    True if this call was successful; false otherwise.

setDirectManipulationEnabled

  • setDirectManipulationEnabled(a_prism: Prism | null, a_enableDirectManipulation: boolean): boolean
  • Sets whether this Prism can be directly manipulated while being moved or not

    Whether to support direct manipulation of the Prism's position in 6dof. Direct manipulation is analogous to grabbing an object with your hand, but using the Control instead. The grabbed prism is attached to the Control's pose while moving it. This is true by default.

    Parameters

    • a_prism: Prism | null

      the Prism

    • a_enableDirectManipulation: boolean

      Whether this prism can be directly manipulated or not.

    Returns boolean

    whether this call was successful or not

setEventSleepTime

  • setEventSleepTime(a_fSleepTime: number): void
  • Set the Event Sleep Time

    This is the amount of time the client should sleep before firing the updateloop callback, if no other events have occured.

    priv

    none

    Parameters

    • a_fSleepTime: number

      Time to sleep in seconds, or 0.0f to sleep indefinitely, until an event occurs.

    Returns void

setPhysicalSizeRange

  • setPhysicalSizeRange(a_prism: Prism | null, a_min: number, a_max: number): boolean
  • Sets the physical size range for the Prism

    The range of physical sizes (extent * scale) that this prism's largest extent can be scaled to.

    Parameters

    • a_prism: Prism | null

      the Prism

    • a_min: number

      the minimum physical size this prism can be, in meters

    • a_max: number

      the maximum physical size this prism can be, in meters

    Returns boolean

    whether this call was successful or not

setScaleMode

  • Sets the scale mode for the Prism

    When a Prism is directly manipulated, the user can scale it. This sets which dimension for the Prism to be scaled (by default width, height, and depth are scaled).

    Parameters

    • a_prism: Prism | null

      the Prism

    • a_scaleModeType: ScaleModeType

      the scale mode to set to the Prism

    Returns boolean

    whether this call was successful or not

setSnap

  • setSnap(a_prism: Prism | null, a_snap: boolean): boolean
  • Sets whether this Prism should snap while being moved or not

    "snapping" basically means that while a Prism is being moved by the user and it is near a stationary Prism, then the moving Prism will suddenly move adjacent to the stationary Prism.

    Parameters

    • a_prism: Prism | null

      the Prism

    • a_snap: boolean

      whether this Prism should snap or not

    Returns boolean

    whether this call was successful or not

startExclusiveModeGL

  • Start a full screen exclusive mode for a landscape app which does its own rendering full screen

    Parameters

    • options: ClientOptions

      exclusive client options

    • ctxGl: void | null

      OpenGL render context

    • clientVol: bigint

      owner volume id

    Returns ExclusiveRender | null

    exclusive mode renderer

stopExclusiveMode

  • stopExclusiveMode(): boolean

stopTrackImage

  • stopTrackImage(imageName: string): boolean
  • Stops tracking an image. If no images are being tracked, will disable tracking.

    Currently image tracking is only available for immersive apps.

    priv

    CameraCapture

    Parameters

    • imageName: string

      Name of the image. Should be the same as the name passed to one of the the trackImage functions.

    Returns boolean

    true if tracking the image was stopped

trackMovingImage

  • trackMovingImage(imageName: string, dimensions: [number, number] | Float32Array, file: string, prism: Prism | null): boolean
  • Starts a request to track a moving image, based on an image file. Moving images are harder to track than non-moving ones; use this function only if sure the image is moving. This will enable tracking if it is not already enabled.

    Currently image tracking is only available for immersive apps.

    priv

    CameraCapture

    Parameters

    • imageName: string

      Unique name for the image.

    • dimensions: [number, number] | Float32Array

      Approximate size of the image, in meters. This is used to help identify the image.

    • file: string

      File name of the image to track. Name is relative to the app's location.

    • prism: Prism | null

      Where to send the image position info

    Returns boolean

    true if tracking was started, false if there was an error.

trackStaticImage

  • trackStaticImage(imageName: string, dimensions: [number, number] | Float32Array, file: string, prism: Prism | null): boolean
  • Starts a request to track an non-moving image, based on an image file. Static images are easier to track than moving ones, so use this method if possible. This will enable tracking if it is not already enabled.

    Currently image tracking is only available for immersive apps.

    priv

    CameraCapture

    Parameters

    • imageName: string

      Unique name for the image.

    • dimensions: [number, number] | Float32Array

      Approximate size of the image, in meters. This is used to help identify the image.

    • file: string

      File name of the image to track. Name is relative to the app's location.

    • prism: Prism | null

      Where to send the image position info

    Returns boolean

    true if tracking was started, false if there was an error.

triggerControlBodyHaptics

  • triggerControlBodyHaptics(pattern: VibePattern, duration?: number, intensity?: VibeIntensity, controlID?: number, deviceID?: number): void
  • Request vibration haptics on the body of the control device

    priv

    none

    Parameters

    • pattern: VibePattern

      the vibration pattern to use

    • Optional duration: number

      default = 100
      the duration to play the pattern over (ms)

    • Optional intensity: VibeIntensity

      default = haptics.VibeIntensity.MEDIUM
      the intensity of the vibration

    • Optional controlID: number

      default = INVALID_CONTROL_ID
      the ID of the control to use (0 will be the primary control)

    • Optional deviceID: number

      default = INVALID_DEVICE_ID
      the internal ID of the device to use (note, this takes precedence over the control ID)

    Returns void

triggerControlCustomHaptic

  • triggerControlCustomHaptic(haptic: HapticInfo, controlID?: number, deviceID?: number): void
  • Trigger a custom control haptic

    priv

    none

    Parameters

    • haptic: HapticInfo

      and individual custom haptic

    • Optional controlID: number

      default = INVALID_CONTROL_ID
      the ID of the control to use (0 will be the primary control)

    • Optional deviceID: number

      default = INVALID_DEVICE_ID
      the internal ID of the device to use (note, this takes precedence over the control ID)

    Returns void

triggerControlCustomHaptics

  • triggerControlCustomHaptics(haptics: Array<HapticInfo>, controlID?: number, deviceID?: number): void
  • Trigger a list of custom control haptics

    priv

    none

    Parameters

    • haptics: Array<HapticInfo>

      the combined list of haptics

    • Optional controlID: number

      default = INVALID_CONTROL_ID
      the ID of the control to use (0 will be the primary control)

    • Optional deviceID: number

      default = INVALID_DEVICE_ID
      the internal ID of the device to use (note, this takes precedence over the control ID)

    Returns void

triggerControlHaptic

  • triggerControlHaptic(haptic: VibePattern, controlID?: number, deviceID?: number): void
  • triggerControlHaptic(haptic: LedPattern, controlID?: number, deviceID?: number): void
  • Trigger a control vibration haptic

    priv

    none

    Parameters

    • haptic: VibePattern

      the VibePattern to trigger

    • Optional controlID: number

      default = INVALID_CONTROL_ID
      the ID of the control to use (0 will be the primary control)

    • Optional deviceID: number

      default = INVALID_DEVICE_ID
      the internal ID of the device to use (note, this takes precedence over the control ID)

    Returns void

  • Trigger a control LED haptic

    priv

    none

    Parameters

    • haptic: LedPattern

      the LedPattern to trigger

    • Optional controlID: number

      default = INVALID_CONTROL_ID
      the ID of the control to use (0 will be the primary control)

    • Optional deviceID: number

      default = INVALID_DEVICE_ID
      the internal ID of the device to use (note, this takes precedence over the control ID)

    Returns void

triggerControlLEDHaptics

  • triggerControlLEDHaptics(pattern: LedPattern, duration?: number, intensity?: VibeIntensity, controlID?: number, deviceID?: number): void
  • Request light haptics on the LEDs of the control device

    priv

    none

    Parameters

    • pattern: LedPattern

      the LED light pattern to use

    • Optional duration: number

      default = 100
      the duration to play the pattern over (ms)

    • Optional intensity: VibeIntensity

      default = haptics.VibeIntensity.MEDIUM
      the intensity of the haptic

    • Optional controlID: number

      default = INVALID_CONTROL_ID
      the ID of the control to use (0 will be the primary control)

    • Optional deviceID: number

      default = INVALID_DEVICE_ID
      the internal ID of the device to use (note, this takes precedence over the control ID)

    Returns void

unlockCurrentLocaleHelper

  • unlockCurrentLocaleHelper(): void

unregisterOnLocaleChangedCallback

  • unregisterOnLocaleChangedCallback(callbackID: CallbackID): boolean

updateLoop

  • updateLoop(a_fDelta: number): boolean

waitForTermination

  • waitForTermination(): void
  • This call will block the caller thread until the app has finished running. It must NOT be called from the client update thread or it will assert.

    priv

    none

    Returns void

Generated using TypeDoc