0.10.0 • Published 3 years ago
rp-paint v0.10.0
rp-paint
Doodling recorder and replayer for Liqvid/rp-recording.
Alpha version! Use at your own risk.
Installation
$ npm install rp-paint
Usage
import {Controls, Script, Player} from "liqvid";
import {RecordingControl} from "rp-recording";
import {PaintCanvas, PaintReplay} from "rp-paint";
import PaintRecorderPlugin from "rp-paint/recorder";
import {brushReplay} from "./recordings";
// controls
const controls = (<>
{Player.defaultControlsLeft}
<div className="rp-controls-right">
<RecordingControl plugins={[PaintRecorderPlugin]}/>
{Player.defaultControlsRight}
</div>
</>);
/* ... */
<Player controls={controls} script={script}>
{/* to record */}
<PaintCanvas recorder={PaintRecorderPlugin.recorder}/>
{/* to replay */}
<PaintReplay replay={brushReplay} start={0}/>
</Player>