CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.11k stars 1.97k forks source link

Cannot use Easeljs inside webworker #1057

Open nicolasgoudard opened 3 years ago

nicolasgoudard commented 3 years ago

TODO

Hi I am using the last version of CreateJS (EaselJS 1.0.0 ) We cannot use easeljs functionalites in Webworker because it is impossible to include by the "importScripts " keyword : I think because the library use the javascript "window" or "document" objects that refer to the DOM this is a serious problem if you want to do complex geometric figure position calculations in the background before refreshing the canvas without the user losing control Best Regards

danzen commented 3 years ago

Hi @nicolasgoudard - will this help? https://github.com/CreateJS/EaselJS-NodeJS - oh, maybe not as it is built on-top of node-canvas. Hmmm. Perhaps someone else has a better answer.

We had someone who succeeded running without a DOM here - perhaps you can find some clues... https://github.com/danzen/zimjs/issues/39 this was on the ZIM GitHub which runs on CreateJS.

danzen commented 3 years ago

@nicolasgoudard - did you find a work-around for this at all?