Comments (12)
You need to set the workerScript url if it's not in the same dir as the page
from gif.js.
@1j01 thanks a lot, I used file loader minutes ago, it is now working well :) Blob is not compatible well with some IE browser
from gif.js.
Probably due to you running it from disk instead of a web server
from gif.js.
Not the case. Thank you for the prompt response, and I apologize for the lack of detail. Was writing this very late at night and exhausted.
See here: http://vincentrubinetti.com/apps/test/Gyrographer.html Press "Export Animated GIF" and look in the console.
Here's my set up:
animate step function
{
animate step++
draw new canvas
add frame with gif.js
if animate done
{
render gif.js
}
else
{
setTimeout this step function 10 ms
}
}
It might have something to do with the htaccess... I'll fool around with that.
from gif.js.
I did:
encoder = new GIF({width: Canvas.width, height: Canvas.height, workers: 2, quality: 10, workerScript: 'App/gif'});
Does it have to be an absolute path?
from gif.js.
it needs to be a url to the actual script, not the directory it resides in
from gif.js.
Very good, got it working. Thank you! Perhaps you should make that clear in the workerScript description in the readme to avoid future confusion.
from gif.js.
It's pretty clear already IMHO
from gif.js.
@jnordberg Is there any suggestion to use it in a webpack project(like vuejs), since it is a one-js-file project.
from gif.js.
@ionull No, not really. The worker script is loaded through the browsers loading system, maybe that can be monkeypatched to do something but i doubt it.
from gif.js.
@jnordberg I found something like worker-loader workerjs project which will load worker from file. But in gif.js project we must use a file path instead of worker instance.
from gif.js.
See #58, #47; @ZigGreen was able to load the worker with a blob URL.
You could use webpack-contrib/raw-loader or similar to dynamically inline the file in the resulting bundle.
from gif.js.
Related Issues (20)
- ._. HOT 2
- Undefined variables in gif.js HOT 3
- Rendered GIF has black frames HOT 1
- How do I use this on Nodejs?
- Part of the generated gif has a black background ,please help me how to deal with it?
- Is there a c version? HOT 1
- Is there a way to convert css animation into gif? HOT 3
- TypeError: Super expression must either be null or a function
- 释放内存 Releasing memory HOT 1
- Using window.postmessage causes gifworker to trigger renderFrame indefinitely.
- how can I prevent the script from blocking the page?
- addFrame makes parts of image flash
- How to debug and why gif.js does not work on mobile? HOT 1
- How to reduce GIF size but keep it look good? HOT 2
- U
- Y HOT 1
- How can Watermark GIF with an animated Watermark....
- Delay issue
- GIF.js flashing and has black background
- SecurityError: The operation is insecure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gif.js.