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