SurfaceTouchDataArgs
ClassClass in the Lens Scripting API.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- 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
Experimental
Index
Extends
Properties
confidence
readonlyconfidence: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
readonlyplaneId: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
readonlyrayDirectionInWorld: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
readonlyrayOriginInWorld:vec3
ExperimentalSPECS only
Origin of the finger ray in world coordinates, in centimeters.
Methods
getTypeName()
staticgetTypeName():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
getTypeName()
getTypeName():
string
Experimental
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Experimental
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
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
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean