From aa990a34136a3f3b58e954f604ec014841cd2320 Mon Sep 17 00:00:00 2001 From: Piero Dotti Date: Sat, 30 Apr 2016 21:29:19 +0200 Subject: [PATCH 1/2] Exposed frames object. --- libgif.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgif.js b/libgif.js index b14e0e9..16ec179 100644 --- a/libgif.js +++ b/libgif.js @@ -799,6 +799,7 @@ playing: playing, move_relative: stepFrame, current_frame: function() { return i; }, + frames: function() { return frames }, length: function() { return frames.length }, move_to: function ( frame_idx ) { i = frame_idx; @@ -917,6 +918,7 @@ move_to: player.move_to, // getters for instance vars + get_frames : function() { return player.frames() }, get_playing : function() { return playing }, get_canvas : function() { return canvas }, get_canvas_scale : function() { return get_canvas_scale() }, From 68c8e4a0e0c9bb1b7e4b62d2668bc7585ff7975a Mon Sep 17 00:00:00 2001 From: Piero Dotti Date: Sat, 30 Apr 2016 21:41:56 +0200 Subject: [PATCH 2/2] Added `get_frames` to the README. --- README.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/README.markdown b/README.markdown index 898ac26..0745229 100644 --- a/README.markdown +++ b/README.markdown @@ -74,6 +74,7 @@ Of note to the developer, libjs.gif contains a class SuperGif, which can be used #### getters * **get_canvas** - The canvas element that the gif is playing in. Handy for assigning event handlers to. +* **get_frames** - The list of frames objects, containing an `ImageData` instance and a `delay` amount. * **get_playing** - Whether or not the gif is currently playing * **get_loading** - Whether or not the gif has finished loading/parsing * **get\_auto_play** - Whether or not the gif is set to play automatically