diff --git a/README.md b/README.md index 4f91c97..844d66a 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,42 @@ Embedding examples: Playground manual, API and resources: [play.ertdfgcvb.xyz/abc.html](https://play.ertdfgcvb.xyz/abc.html) + +## Installation & usage + +To install this package: + +```shell +npm install https://github.com/ertdfgcvb/play.core +``` + +To import and run one of the examples: + +```javascript +import { run } from "play.core/src/run.js"; +import * as program from "play.core/src/programs/demos/spiral.js"; + +const settings = { + fps: 60, + element: document.querySelector("pre"), +}; + +run(program, settings).catch(function(e) { + console.warn(e.message); + console.log(e.error); +}); +``` + +## Building for `