~flashback/flashback-engine

The webgl rendering engine which can project flashback project files to an HTML5 canvas
b816f89f — Josh Cole 10 months ago
Implement basic scripting
4d8b2826 — Josh Cole 10 months ago
Fix a bug with the FPS Runaway system. By stopping the project when the user tabs away (and then resuming when they tab back) the calculations for FPS Runaway won't be messed up.
03dcf4f6 — Josh Cole 10 months ago
npm-ify the project so it is in-line with the studio app.

You can also use your local clone with git send-email.

#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-engine

#Using 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 build

#Rebuilding on demand

npm run watch

#Help

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.