Class XRInputSourceEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The WebXR Device API's XRInputSourceEvent interface describes an event which has occurred on a WebXR user input device such as a hand controller, gaze tracking system, or motion tracking system. More specifically, they represent a change in the state of an XRInputSource.
[Value("XRInputSourceEvent")]
public class XRInputSourceEvent : Event
- Inheritance
-
XRInputSourceEvent
- Inherited Members
Remarks
To learn more about handling inputs in a WebXR project, see the article Inputs and input sources.
Constructors
XRInputSourceEvent()
public XRInputSourceEvent()
XRInputSourceEvent(string, XRInputSourceEventInit)
The XRInputSourceEvent()
constructor creates and returns a new XRInputSourceEvent object
describing an event (state change) which has occurred on a WebXR user input device
represented by an XRInputSource.
public XRInputSourceEvent(string type, XRInputSourceEventInit eventInitDict)
Parameters
typestringeventInitDictXRInputSourceEventInit
Remarks
Properties
Frame
The read-only XRInputSourceEvent propertyframe specifies an XRFrame object
representing the event frame during which a WebXR user input occurred.
This may thus be an event which occurred in the past rather than a current or impending
event.
[Value("frame")]
public XRFrame Frame { get; }
Property Value
- XRFrame
An XRFrame indicating the event frame at which the user input event
described by the object took place.
Remarks
InputSource
The XRInputSourceEvent interface's read-onlyinputSource property specifies the
XRInputSource which generated the input event. This information
lets you handle the event appropriately given the particulars of the user input device
being manipulated.
[Value("inputSource")]
public XRInputSource InputSource { get; }
Property Value
- XRInputSource
An XRInputSource object identifying the source of the user input event.
This event indicates an action the user has taken using a WebXR input controller, such
as a hand controller, motion sensing device, or other input apparatus.