How to use the expo-core.SyntheticPlatformEmitter.emit function in expo-core

To help you get started, we’ve selected a few expo-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / packages / expo-sensors / src / ExponentAccelerometer.web.ts View on Github external
_handleMotion({ alpha, beta, gamma }) {
    SyntheticPlatformEmitter.emit('accelerometerDidUpdate', {
      x: gamma * scalar,
      y: beta * scalar,
      z: alpha * scalar,
    });
  },
  startObserving() {
github expo / expo / packages / expo-sensors / src / ExponentGyroscope.web.ts View on Github external
_handleMotion({ accelerationIncludingGravity }) {
    SyntheticPlatformEmitter.emit('gyroscopeDidUpdate', {
      x: accelerationIncludingGravity.x,
      y: accelerationIncludingGravity.y,
      z: accelerationIncludingGravity.z,
    });
  },
  startObserving() {