The framerjs-apng is APNG(Animated Portable Network Graphics) support module for framerJS. It's based on apng-canvas
- Download "apng.coffee" file to modules directory in your project.
- Just type require "apng" on first line.
The default usage is the same as the FramerJS Layer except few properties.
- Create layer any size.
- set apngImage property.
- call playAPNG method.
require "apng"
apngLayer = new Layer
width: 400
height: 400
backgroundColor: "#FFFFFF"
apngImage: "images/clock.png"
apngLayer.center();
# Listen to the loading event
apngLayer.on Events.ImageLoaded, ->
print "The image loaded"
apngLayer.on Events.ImageLoadError, (err)->
print "The image couldn't be loaded"
# Play APNG Image
apngLayer.playAPNG();
# or Stop
# apngLayer.stopAPNG()
play APNG image animation.(If images are being downloaded, play after download.)
stop APNG image animation.