Last active
May 27, 2019 05:20
-
-
Save anchetaWern/a79eb4609a401bd99171d1e8a2c97003 to your computer and use it in GitHub Desktop.
React Native Accelerometer Maze: Set up goal
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 | |
| const GOAL_SIZE = Math.floor(width * .04); | |
| const goalPoint = GetRandomPoint(GRID_X, GRID_Y); | |
| const goal = Matter.Bodies.rectangle(goalPoint.x, goalPoint.y, GOAL_SIZE, GOAL_SIZE, { | |
| isStatic: true, | |
| isSensor: true, | |
| label: 'goal' | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment