HitTestSessionOptions
ClassOptions for configuring a HitTestSession.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported — SPECS only
- SPECSFully supported
- Camera Kit WebNot supported — SPECS only
- Camera Kit MobileNot supported — SPECS only
Options for configuring a HitTestSession.
Index
Properties
Methods
Example
const worldQuery = require("LensStudio:WorldQueryModule");
var options = HitTestSessionOptions.create();
options.filter = true;
var hitTestSessionWithOptions = worldQuery.createHitTestSessionWithOptions(options);
Extends
Properties
classification
classification:
boolean
SPECS only
If set to true, the surface classification of the hit surface is enabled. By default the classification is set to false.
Since
Lens Scripting Version 377
Default Value
false
@wearableOnly
filter
filter:
boolean
SPECS only
If true - a double exponential filter is applied to filter/smooth over multiple hit test results.
Since
Lens Scripting Version 270
Default Value
false
@wearableOnly
highAccuracy
highAccuracy:
boolean
SPECS only
Enables high-accuracy hit tests for this session. This mode favors accuracy over response time and consumes more power while the session is active.
The additional power use continues until HitTestSession#stop is called. If multiple high-accuracy sessions are active, all must be stopped.
Since
Lens Scripting Version 377
Default Value
false
@wearableOnly
Example
const worldQuery = require("LensStudio:WorldQueryModule");
var options = HitTestSessionOptions.create();
options.highAccuracy = true;
var hitTestSession = worldQuery.createHitTestSessionWithOptions(options);
Methods
create()
staticcreate():HitTestSessionOptions
SPECS only
Create a new HitTestSessionOptions object.
Returns
HitTestSessionOptions
Since
Lens Scripting Version 270
getTypeName()
staticgetTypeName():TypeName<HitTestSessionOptions>
SPECS 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<HitTestSessionOptions>
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
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
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