Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
ThePicks
API lets you create and manage objects for repeatedly calculating intersections.Properties
Name | Type | Summary |
---|---|---|
PICK_DOMAIN_ENTITIES | FilterFlags |
Include domain entities when intersecting. Read-only. |
PICK_AVATAR_ENTITIES | FilterFlags |
Include avatar entities when intersecting. Read-only. |
PICK_LOCAL_ENTITIES | FilterFlags |
Include local entities when intersecting. Read-only. |
PICK_AVATARS | FilterFlags |
Include avatars when intersecting. Read-only. |
PICK_HUD | FilterFlags |
Include the HUD surface when intersecting in HMD mode. Read-only. |
PICK_ENTITIES | FilterFlags |
Include domain and avatar entities when intersecting. Read-only. Deprecated: This property is deprecated and will be removed. Use |
PICK_OVERLAYS | FilterFlags |
Include local entities when intersecting. Read-only. Deprecated: This property is deprecated and will be removed. Use |
PICK_INCLUDE_VISIBLE | FilterFlags |
Include visible objects when intersecting. Read-only. Warning: Is currently always enabled by default but may not be in the future. |
PICK_INCLUDE_INVISIBLE | FilterFlags |
Include invisible objects when intersecting. Read-only. |
PICK_INCLUDE_COLLIDABLE | FilterFlags |
Include collidable objects when intersecting. Read-only. Warning: Is currently always enabled by default but may not be in the future. |
PICK_INCLUDE_NONCOLLIDABLE | FilterFlags |
Include non-collidable objects when intersecting. Read-only. |
PICK_PRECISE | FilterFlags |
Pick against exact meshes. Read-only. |
PICK_COARSE | FilterFlags |
Pick against coarse meshes. Read-only. |
PICK_ALL_INTERSECTIONS | FilterFlags |
If set, returns all intersections instead of just the closest. Read-only. Warning: Not yet implemented. |
PICK_BYPASS_IGNORE | FilterFlags |
Allows pick to intersect entities even when their
|
INTERSECTED_NONE | IntersectionType |
Intersected nothing. Read-only. |
INTERSECTED_ENTITY | IntersectionType |
Intersected an entity. Read-only. |
INTERSECTED_LOCAL_ENTITY | IntersectionType |
Intersected a local entity. Read-only. |
INTERSECTED_OVERLAY | IntersectionType |
Intersected a local entity. (3D overlays no longer exist.) Read-only. Deprecated: This property is deprecated and will be removed. Use
|
INTERSECTED_AVATAR | IntersectionType |
Intersected an avatar. Read-only. |
INTERSECTED_HUD | IntersectionType |
Intersected the HUD surface. Read-only. |
perFrameTimeBudget | number |
The maximum time, in microseconds, to spend per frame updating pick results. |
Methods
Name | Return Value | Summary |
---|---|---|
createPick
|
number |
Creates a new pick. Different PickTypes use different properties, and within one PickType the properties you
choose can lead to a wide range of behaviors. For example, with Warning: Picks created using this method currently always intersect at least visible and collidable things but this may not always be the case. |
disablePick
|
None |
Disables a pick. Disabled picks do not update their pick results. |
enablePick
|
None |
Enables a pick. Enabled picks update their pick results. |
getPickProperties
|
Picks.RayPickProperties | Picks.ParabolaPickProperties | Picks.StylusPickProperties | Picks.CollisionPickProperties |
Gets the current properties of the pick. |
getPicks
|
Array.<number> |
Gets all picks which currently exist, including disabled picks. |
getPickScriptParameters
|
Picks.RayPickProperties | Picks.ParabolaPickProperties | Picks.StylusPickProperties | Picks.CollisionPickProperties |
Gets the parameters that were passed in to Picks.createPick to create the pick, if the pick was created through a script. Note that these properties do not reflect the current state of the pick. See Picks.getPickProperties. |
getPrevPickResult
|
RayPickResult | ParabolaPickResult | StylusPickResult | CollisionPickResult |
Gets the most recent result from a pick. A pick continues to be updated ready to return a result, as long as it is enabled. Note: Stylus picks only intersect with objects in their include list, set using setIncludeItems. |
INTERSECTED_AVATAR
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
INTERSECTED_ENTITY
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
INTERSECTED_HUD
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
INTERSECTED_LOCAL_ENTITY
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
INTERSECTED_NONE
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
INTERSECTED_OVERLAY
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
isLeftHand
|
boolean |
Checks if a pick is associated with the left hand: a ray or parabola pick with |
isMouse
|
boolean |
Checks if a pick is associated with the system mouse: a ray or parabola pick with |
isPickEnabled
|
boolean |
Get the enabled status of a pick. Enabled picks update their pick results. |
isRightHand
|
boolean |
Checks if a pick is associated with the right hand: a ray or parabola pick with |
PICK_ALL_INTERSECTIONS
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_AVATAR_ENTITIES
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_AVATARS
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_COARSE
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_DOMAIN_ENTITIES
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_ENTITIES
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_HUD
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_INCLUDE_COLLIDABLE
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_INCLUDE_INVISIBLE
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_INCLUDE_NONCOLLIDABLE
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_INCLUDE_VISIBLE
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_LOCAL_ENTITIES
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_OVERLAYS
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
PICK_PRECISE
|
number |
Deprecated: This function is deprecated and will be removed. Use the |
removePick
|
None |
Removes (deletes) a pick. |
setIgnoreItems
|
None |
Sets a list of entity and avatar IDs that a pick should ignore during intersection. Note: Not used by stylus picks. |
setIncludeItems
|
None |
Sets a list of entity and avatar IDs that a pick should include during intersection, instead of intersecting with everything. Note: Stylus picks only intersect with items in their include list. |
setPrecisionPicking
|
None |
Sets whether or not a pick should use precision picking, i.e., whether it should pick against precise meshes or coarse
meshes.
This has the same effect as using the |
Type Definitions
CollisionPickProperties Type: object |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The properties of a collision pick. Properties
|
ParabolaPickProperties Type: object |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The properties of a parabola pick. Properties
|
RayPickProperties Type: object |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The properties of a ray pick. Properties
|
StylusPickProperties Type: object |
||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The properties of a stylus pick. Properties
|
Method Details
(static) createPick( type, properties ) → {number}
Returns: The ID of the pick created. 0 if invalid.
|
|||||||||
---|---|---|---|---|---|---|---|---|---|
Creates a new pick. Different PickTypes use different properties, and within one PickType the properties you
choose can lead to a wide range of behaviors. For example, with Warning: Picks created using this method currently always intersect at least visible and collidable things but this may not always be the case. Parameters
|
(static) disablePick( id ) | ||||||
---|---|---|---|---|---|---|
Disables a pick. Disabled picks do not update their pick results. Parameters
|
(static) enablePick( id ) | ||||||
---|---|---|---|---|---|---|
Enables a pick. Enabled picks update their pick results. Parameters
|
(static) getPickProperties( id ) → {Picks.RayPickProperties|Picks.ParabolaPickProperties|Picks.StylusPickProperties|Picks.CollisionPickProperties}
Returns: Properties of the pick, per the pick type .
|
||||||
---|---|---|---|---|---|---|
Gets the current properties of the pick. Parameters
|
(static) getPicks( ) → {Array.<number>}
Returns: picks - The IDs of the picks. |
---|
Gets all picks which currently exist, including disabled picks. |
(static) getPickScriptParameters( id ) → {Picks.RayPickProperties|Picks.ParabolaPickProperties|Picks.StylusPickProperties|Picks.CollisionPickProperties}
Returns: Script-provided properties, per the pick type .
|
||||||
---|---|---|---|---|---|---|
Gets the parameters that were passed in to Picks.createPick to create the pick, if the pick was created through a script. Note that these properties do not reflect the current state of the pick. See Picks.getPickProperties. Parameters
|
(static) getPrevPickResult( id ) → {RayPickResult|ParabolaPickResult|StylusPickResult|CollisionPickResult}
Returns: The most recent intersection result. |
||||||
---|---|---|---|---|---|---|
Gets the most recent result from a pick. A pick continues to be updated ready to return a result, as long as it is enabled. Note: Stylus picks only intersect with objects in their include list, set using setIncludeItems. Parameters
Example
|
(static) INTERSECTED_AVATAR( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) INTERSECTED_ENTITY( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) INTERSECTED_HUD( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) INTERSECTED_LOCAL_ENTITY( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) INTERSECTED_NONE( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) INTERSECTED_OVERLAY( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) isLeftHand( id ) → {boolean}
Returns: true if the pick is associated with the left hand, false if it isn't.
|
||||||
---|---|---|---|---|---|---|
Checks if a pick is associated with the left hand: a ray or parabola pick with Parameters
|
(static) isMouse( id ) → {boolean}
Returns: true if the pick is associated with the system mouse, false if it isn't.
|
||||||
---|---|---|---|---|---|---|
Checks if a pick is associated with the system mouse: a ray or parabola pick with Parameters
|
(static) isPickEnabled( id ) → {boolean}
Returns: enabled - Whether or not the pick is enabled. |
||||||
---|---|---|---|---|---|---|
Get the enabled status of a pick. Enabled picks update their pick results. Parameters
|
(static) isRightHand( id ) → {boolean}
Returns: true if the pick is associated with the right hand, false if it isn't.
|
||||||
---|---|---|---|---|---|---|
Checks if a pick is associated with the right hand: a ray or parabola pick with Parameters
|
(static) PICK_ALL_INTERSECTIONS( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_AVATAR_ENTITIES( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_AVATARS( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_COARSE( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_DOMAIN_ENTITIES( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_ENTITIES( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_HUD( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_INCLUDE_COLLIDABLE( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_INCLUDE_INVISIBLE( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_INCLUDE_NONCOLLIDABLE( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_INCLUDE_VISIBLE( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_LOCAL_ENTITIES( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_OVERLAYS( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) PICK_PRECISE( ) → {number}
Returns: number |
---|
Deprecated: This function is deprecated and will be removed. Use the |
(static) removePick( id ) | ||||||
---|---|---|---|---|---|---|
Removes (deletes) a pick. Parameters
|
(static) setIgnoreItems( id, ignoreItems ) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets a list of entity and avatar IDs that a pick should ignore during intersection. Note: Not used by stylus picks. Parameters
|
(static) setIncludeItems( id, includeItems ) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets a list of entity and avatar IDs that a pick should include during intersection, instead of intersecting with everything. Note: Stylus picks only intersect with items in their include list. Parameters
|
(static) setPrecisionPicking( id, precisionPicking ) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets whether or not a pick should use precision picking, i.e., whether it should pick against precise meshes or coarse
meshes.
This has the same effect as using the Parameters
|