Skip to content

Components

Oleh Saveniuk edited this page May 12, 2020 · 4 revisions

XRManager

  • Use it to process XR session, operate with XRInputSource, set and update controllers view.

ActionController

  • The core class has public methods such as on, once, off and fire to operate with the events.
  • Protected update method is used to create event data and fire the event.

Custom ActionController

  • To create custom ActionController extend it from the core one.
  • Add event listeners which interpret event names based on device type.
  • Use update to fire events by the ActionController agent.

Event names

  • We need unified event names to make the ActionController cross-platform.
  • ActionControllerEventName is an enum with declared names.

Update

  • EventName - ActionControllerEventName.
  • Raycaster - three.js doc.
  • ControllerNumber - some of the devices have more than one controller, so we must understand which one is sending the event.
Clone this wiki locally