Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Run Flare-JS in a WebWorker with an offscreencanvas #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanbornhilland
Copy link
Contributor

This is not intended to be merged. The intention is to provide a working example of how Flare-JS, with some minor changes, could be run in a WebWorker using an OffscreenCanvas. In principle being able to run in a WebWorker is extremely useful for applications that need to keep the main thread free for heavy UIs or other intensive tasks that need to run on the main thread like video. For some reason the frame rate in this example rapidly declines but I have another more heavily modified example that maintains a high frame rate and I'm not sure what the difference is.

The key change here is swapping in svg.js for createElementNS in order to decouple Flare-JS from the DOM. The rest is fairly straightforward, though I don't know if there are other features that rely on the DOM that just aren't being used in this example.

The key change here is swapping in svg.js for createElementNS
in order to decouple Flare-JS from the DOM. The rest is fairly
straightforward.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant