mrjs
volumetrics
Anchors
Anchors enhance your spatial app by taking advantage of the real world environment.
They can be used for table top games, turning any room into a virtual gallery, or ripping open the ceiling to get a view of another world
Examples
fixed
floor
table
ceiling
wall
reset
data-comp-anchor
Anchoring is achieved using the anchoring component, data-comp-anchor, it has 4 attributes:
type
There are currently three types of anchors:
fixed
positions the anchored element directly in front of the user whenever an XR sessions is started.
plane
anchors the element to the nearest plane that matches the specified label or orientation.
if no label or orientation is specified, the element will be anchored to the nearest plane.
Plane anchor attributes
These attributes are only relevant to plane anchors
orientation
This attribute is useful when you wish to anchor to a plane of any given orientation, regardless of label.
supported values: horizontal, vertical
label (optional)
Use this to target a specific type of plane, such as a table or wall.
supported values: wall, floor, ceiling, table
occlusion
by default, planes occlude virtual content behind them, use this flag disable occlusion.
values: true (default), false