Skip to main content

SurfaceTouchDataArgs

Class

Class in the Lens Scripting API.

  • Snapchat: not supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
1 platform note
  • SnapchatNot supported — SPECS only
  • SPECSFully supported
    • Experimental API; it may change or be removed.
  • Camera Kit WebNot supported — SPECS only
  • Camera Kit MobileNot supported — SPECS only

Platform details

  • Snapchat — Not supported — SPECS only.

  • SPECS — Fully supported. Experimental API; it may change or be removed

  • Camera Kit Web — Not supported — SPECS only.

  • Camera Kit Mobile — Not supported — SPECS only.

Experimental

Index

Extends

Properties

confidence

readonly confidence: number

ExperimentalSPECS only

Tracker confidence that the finger is touching the configured plane, in [0, 1]. Values close to 1 indicate a confident touch; lower values indicate uncertainty.


planeId

readonly planeId: number

ExperimentalSPECS only

Id of the plane this data was computed against, as returned by SurfaceTouchModule#setPlane. Treat it as an opaque token: compare it for equality against the id you received from setPlane to confirm the event corresponds to your plane (the module holds a single shared plane, so another caller's setPlane changes the active id). Only equality is meaningful — do not rely on its magnitude or ordering.


rayDirectionInWorld

readonly rayDirectionInWorld: vec3

ExperimentalSPECS only

Direction of the finger ray in world coordinates. The vector points from SurfaceTouchDataArgs#rayOriginInWorld along the finger toward the touched surface.


rayOriginInWorld

readonly rayOriginInWorld: vec3

ExperimentalSPECS only

Origin of the finger ray in world coordinates, in centimeters.

Methods

getTypeName()

static getTypeName(): TypeName<SurfaceTouchDataArgs>

ExperimentalSPECS only

Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

Returns

TypeName<SurfaceTouchDataArgs>

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Experimental

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

Experimental

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

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


isSame()

isSame(other): boolean

Experimental

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

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame