fixed FPS for gif version

This commit is contained in:
jdescottes 2013-04-07 21:26:51 +02:00
parent 944f1a53df
commit 198bbaa65d

View File

@ -176,9 +176,10 @@ $.namespace("pskl");
uploadAsGIF : function () { uploadAsGIF : function () {
var encoder = new GIFEncoder(), var encoder = new GIFEncoder(),
dpi = 8; dpi = 10;
encoder.setRepeat(0); encoder.setRepeat(0);
encoder.setDelay(200); var fps = piskel.animationController.fps;
encoder.setDelay(1000/fps);
encoder.start(); encoder.start();
encoder.setSize(frameSheet.getWidth() * dpi, frameSheet.getHeight() * dpi); encoder.setSize(frameSheet.getWidth() * dpi, frameSheet.getHeight() * dpi);