⚡️
VOLTS
Work in progress
🚧 🚧 🚧
An extensive non-reactive Typescript framework that eases the development experience in Spark AR
Highlights
- Non-reactive: This framework takes an imperative approach, and tries to abstract away the SparkAR Reactive API as much as possible
- Typescript: You'll have a smoother and richer experience while developing. Use VSC to take full advantage, with autocompletion and intellisense
Please make sure to read this list of reasons why you should prefer the ReactiveAPI over vanilla js: Reactive programming, SparkAR before using
volts
, as it might not be the right thing for every project
Documentation
How to add VOLTS to your project
How to use
Read this guide on getting started with VOLTS
Template
You can use this template as a quick start if you're already familiar with the library
npm i sparkar-volts
Or use this download link
// main.ts
// using [email protected]
import Diagnostics from 'Diagnostics';
import Volts, { PublicOnly } from './volts';
const World = Volts.World.getInstance({
mode: 'DEV',
snapshot: {},
assets: {},
loadStates: undefined,
});
World.onEvent('load', function (this: PublicOnly<typeof World>, snapshot) {
Diagnostics.log(`Loaded 🧪.\nAssets: ${Object.keys(World.assets) || 'no assets were loaded'}`);
});
World.onEvent('frameUpdate', function (this: PublicOnly<typeof World>, snapshot, data) {
if (data.frameCount == 0) Diagnostics.log(`Running... 🚀\n`);
});
❤️
Contributing
You can contribute to the development of VOLTS.
PRs & Issues welcomed!
Check the issues to see if there's anything that requires help, or want to discuss aspects of the project — feel free to open an issue if you encounter a bug/ want to request a feature/ other
Please check the contributing.md file if you wish to contribute to the development of the project.
If you want to open a PR/Issue, please make sure to read the code-of-conduct.md before doing so.
Donations
All proceeds will be split amongst all major contributors