OptionaloriginOptionalphysicalCurrent viewer orientation in virtual space. NOTE: not yet implemented.
Set viewing direction/heading for the viewer programmatically. The client application should keep track of this.
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Optionaloptions: boolean | AddEventListenerOptionsAttach to an XR session and begin rendering to that session.
In theory, the control can be attached to multiple sessions at the same time.
Control will automatically detach from the session when the session ends.
The following options are supported:
The session to attach to.
Object with options.
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Returns true if no WebXR sessions are active
Detects if the main squeeze of an existing motion controller was released this frame.
that gets raised.
Detects if the main squeeze of an existing motion controller was pressed this frame.
that gets raised.
Attach InputSourcesChange Event to the default XRSession.
The inputsourceschange event is also fired once when the session's creation callback first completes execution, so you can use it to fetch the input source list as soon as it's available at startup time.
The event is delivered as an XRInputSourceChangeEvent, which includes three properties of interest: session: The XRSession for which the input source have changed added: An array of zero or more XRInputSource objects indicating the newly added objects removed: An array of zero or more XRInputSource objects indicating any removed object from the XRSystem.
that gets raised.
Detects if the user has stopped the pinching gesture and relaxed their hand.
that gets raised.
Detects if the user has started a pinching gesture.
that gets raised.
Detects if the main trigger of an existing motion controller was released this frame.
This event will determine what happens to any picked entity (if any) when the trigger is released.
that gets raised.
Detects if the main trigger of an existing motion controller was pressed this frame.
that gets raised.
Set up the already created session XR Aware session will want to manage some reference spaces in order to enable features such as teleport and picking. This method handles the creation and storage of the spaces.
Broadcasts a session started event for self managed client programs, forwarding a reference to the xrSession as soon as it is created. This can be captured outside of update cycles, removing unnecessary checks and overhead in client programs..
session that was successfully created and will be added to the map
group of session specific parameters.
that gets raised.
that gets raised.
that gets raised.
Thumbstick movement.
that gets raised.
Amount to multiply the base movement speed with.
Removes the event listener in target's event listener list with the same type, callback, and options.
Optionaloptions: boolean | EventListenerOptionsTries to request a new XRSession Attempts to request the navigator for a new xr session of the given mode
one of the valid web_xr session modes.
Object with options for the xr Session.
Move programatically to given position, given in Cogs coordinates.
Move the viewer around in relative, virtual coordinates.
Transform given position in physical space to virtual position, using virtual heading.
Position in physical space, absolute or relative to viewer pose.
Position in virtual space.
Compute rotation in virtual space from physical orientation and virtual heading.
Orientation in physical space
Orientation/rotation in virtual space
Owning Cogs.js Control