Retrieve the destination canvas
Retrieve the 2D-context attached to the destination canvas
Returns true if this viewport currently has focus and thus receives keyboard events
Static
defaultTo retrieve private static instance of xr viewport, readonly.
See EventTarget.addEventListener for reference. Works with EventListenerUnified and EventUnified
Optional
_options: boolean | AddEventListenerOptionsSee EventTarget.dispatchEvent for reference. Works with with EventUnified
Performs a pick on all ComponentPicks in the branch of this viewport
using a ray from its camera through the client coordinates given in the event.
Dispatches the event to all nodes hit.
If PICK.CAMERA was chosen as the method to pick, a pick property gets added to the event,
which holds the detailed information, but is overwritten for each node.
Draw the xr viewport displaying its branch. By default, the transforms in the branch are recalculated first.
Pass false
if calculation was already done for this frame
Called from loop method Loop again with the xrFrame parameter handover, as soon as FRAME_REQUEST_XR is called from creator.
Connects the viewport to the given canvas to render the given branch to using the given camera-component, and names the viewport as given.
The AR session could be initialized here. Up till now not implemented.
The VR Session is initialized here, also VR - Controller are initialized, if boolean is true. Creator has to call FrameRequestXR after this Method to run the viewport in virtual reality.
Returns a point on a projection surface in the hypothetical distance of 1 to the camera
matching the given point on the client rectangle
TODO: examine, if this should be a camera-method. Current implementation is for central-projection
See EventTarget.removeEventListener for reference. Works with EventListenerUnified and EventUnified
Optional
_options: boolean | AddEventListenerOptionsSet the branch to be drawn in the viewport.
XRViewport (webXR)-extension of Viewport, to displaying its branch on Head Mounted and AR (not implemted yet) Devices