flashback-engine
v0.0.10
Published
The webgl rendering engine for Flashback, an homage to 90s drawing tools!
Downloads
44
Readme
Flashback Engine
Flashback is an homage to drawing tools of the 90s! This library (the rendering engine) can load project files and render them in an HTML5 webgl canvas.
To better understand the project files, a full specification has been published here: https://git.sr.ht/~flashback/flashback-spec
Getting Started
Installing
You can add the flashback engine to any project with npm. It includes typescript typings.
npm install flashback-engineUsing the Engine
Processing a file is as simple as invoking a few commands.
import { loadProject, resizeCanvas } from 'flashback-engine';
import * as project from 'myProjectFile.json';
const canvas = document.createElement('canvas');
resizeCanvas(project, canvas);
loadProject(project, canvas).then((engine) => {
engine.start();
document.append(canvas);
});
Building
npm run buildRebuilding on demand
npm run watchHelp
At the moment, there are very little requirements to run flashback. In the future, a webassembly module may be added to enable scripting in the project files.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Inspiration, code snippets, etc.
