Skip to content

Instantly share code, notes, and snippets.

@superhighfives
Created January 7, 2017 22:21
Show Gist options
  • Save superhighfives/a42ebb74afdaba02ef69df89eca99482 to your computer and use it in GitHub Desktop.
Save superhighfives/a42ebb74afdaba02ef69df89eca99482 to your computer and use it in GitHub Desktop.
A quick set up guide for Sandpit
npm install create-react-app -g
create-react-app party
cd party
npm install sandpit --save
npm start

You can delete everything in src/index.js and replace it with:

import Sandpit from 'sandpit'

var sandpit = new Sandpit('body', Sandpit.CANVAS)
sandpit.settings = {youAreGreat: {value: true}}
sandpit.loop = () => { console.log(sandpit.time) }
sandpit.start()

And then you can do fancy stuff—the docs are here: http://sandpitjs.com/docs/tutorial-01-documentation.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment