Created
December 8, 2017 17:13
-
-
Save aaronbeall/cd5b302656f60a038d45435ab6f4068c to your computer and use it in GitHub Desktop.
[WIP] SnapSVG-Animator TypeScript definitions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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