Last active
May 27, 2019 05:25
-
-
Save anchetaWern/79923a48ea6e89c02bbb05ae8d8c6981 to your computer and use it in GitHub Desktop.
React Native Accelerometer Maze: Add physics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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