Skip to content

Instantly share code, notes, and snippets.

@anchetaWern
Last active May 27, 2019 05:25
Show Gist options
  • Select an option

  • Save anchetaWern/79923a48ea6e89c02bbb05ae8d8c6981 to your computer and use it in GitHub Desktop.

Select an option

Save anchetaWern/79923a48ea6e89c02bbb05ae8d8c6981 to your computer and use it in GitHub Desktop.
React Native Accelerometer Maze: Add physics
// App.js
physics = (entities, { time }) => {
let engine = entities["physics"].engine;
engine.world.gravity = {
x: 0,
y: 0
};
Matter.Engine.update(engine, time.delta);
return entities;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment