Skip to content

Instantly share code, notes, and snippets.

@aaronbeall
Created December 8, 2017 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronbeall/cd5b302656f60a038d45435ab6f4068c to your computer and use it in GitHub Desktop.
Save aaronbeall/cd5b302656f60a038d45435ab6f4068c to your computer and use it in GitHub Desktop.
[WIP] SnapSVG-Animator TypeScript definitions
// From: https://github.com/cjgammon/SnapSVG-Animator/wiki/API
declare class SVGAnim {
public linkage: object;
public mc: MovieClip;
public s: Snap.Element;
public resourceManager: any;
constructor(json: any, width: string | number, height: string | number, fps: string | number);
}
declare namespace SVGAnim {
interface MovieClip {
constructor(timelineData: any, SnapSurface: SVGAnim["s"], resourceManager: SVGAnim["resourceManager"], name: string);
play();
stop();
gotoAndPlay(frame);
gotoAndStop(frame);
addChild(child: MovieClip);
click(callback: Function);
mouseover(callback: Function);
mouseout(callback: Function);
mousedown(callback: Function);
mousemove(callback: Function);
el: Snap.Element;
loops: boolean; // not in API wiki
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment