Open joedborg opened 8 years ago
When you instantiate the new object do you explicitly specify the location of the workerScript ?
For instance:
gif = new GIF({ repeat: 0 workers: 16, quality: 30, workerScript: "/js/gif.worker.js" });
Try specifying workerScripts path
Hi,
..trying to just use the dist/gif.js & dist/gif.worker.js
..tried to specify a path as kieranoreilly suggests: ... workerScript: "/js/gif.worker.js" ..also tried just putting them in the same dir as my html but get the same error "ReferenceError: index is not defined"
..any help would be absolutely appreciated
I can't make it work either. All I want to do really is require('./gifWorker') and make sure that this get bundled into one JS. Right now, I have no idea how to make this work.
Help would be appreciated :)
I did get it to run eventually, ..cant remember what the problem was? happy to see v2.0 but looks like it hasnt merged the fix for #46 (my real issue) ..here is my working snippet
this.GIF = new GIF({
repeat: 0,
transparent: 'rgba(0, 0, 0, 0)', //still does not handle transparency correctly
workers: 4,
workerScript: 'ui/lib/gif.worker.js',
dither: 'FloydSteinberg-serpentine',
width: renderRezW,
height: renderRezW / renderRatio,
quality: 15
});
Hi, I'm trying to use this library with require. I have added both files (gif and gif.worker) to the define and confirmed they are loaded in order (with a shim). The problem is, everytime I call render, it tries to import it by URL still:
Require config is:
If I change
exports
to'gif.worker'
, I get:Any ideas?