UNPKG

@threlte/core

Version:

A 3D framework for the web, built on top of Svelte and Three.js

23 lines (22 loc) 406 B
export class Task { key; stage; callback; runTask = true; stop() { this.runTask = false; } start() { this.runTask = true; } constructor(stage, key, callback) { this.stage = stage; this.key = key; this.callback = callback; } run(delta) { if (!this.runTask) return; this.callback(delta); } }