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

Offscreen canvas transfer to dedicated worker #678

Closed
serzhiio opened this issue Oct 1, 2019 · 1 comment
Closed

Offscreen canvas transfer to dedicated worker #678

serzhiio opened this issue Oct 1, 2019 · 1 comment
Labels

Comments

@serzhiio
Copy link
Contributor

serzhiio commented Oct 1, 2019

Does somebody know the most efficient way of doing this?
I cant Ser/De canvas to transfer it to worker.

var htmlCanvas = document.getElementById("canvas");
var offscreen = htmlCanvas.transferControlToOffscreen();

var worker = new Worker("offscreencanvas.js"); 
worker.postMessage({canvas: offscreen}, [offscreen]);
@siku2
Copy link
Member

siku2 commented Apr 25, 2021

Closing this. See #1823 for details

@siku2 siku2 closed this as completed Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants