magic-script-components-react-native icon indicating copy to clipboard operation
magic-script-components-react-native copied to clipboard

Events

Open pleszkiewicz opened this issue 5 years ago • 0 comments

< Main issue

Description

There are some events that are not related to any particular component (system events) which should be able to be handled from magic-script side.

The list of events of interests:

  ControlPose3DofInputEventData,
  ControlPose6DofInputEventData,
  ControlTouchPadInputEventData,
  EyeTrackingEventData,
  GestureInputEventData,
  InputEventData,
  KeyInputEventData,
  RayCastEventData,
  SelectionEventData,
  UiEventData,
  VideoEventData
  • All components should support onLoopUpdate and onEvent callbacks (see Sample section below).
  • There can be multiple components in the hierarchy which handle onLoopUpdate and/or onEvent callbacks - each of them should deliver the same events. Here is the idea of how the events should be handled in JSX component:
<Content onLoopUpdate={...} onEvent={...} />

Sample

Events example

Completion status

  • [ ] Android
  • [ ] iOS

pleszkiewicz avatar Jan 22 '20 15:01 pleszkiewicz