PageRenderTime 979ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/greensock/greensock.d.ts

https://github.com/AP-Hunt/DefinitelyTyped
TypeScript Typings | 319 lines | 285 code | 23 blank | 11 comment | 0 complexity | dd0adb0e69c5b0e0bd9076921ebd6914 MD5 | raw file
Possible License(s): MIT
  1. // GreenSock Animation Platform (GSAP) - http://www.greensock.com/get-started-js/
  2. // JavaScript Docs http://api.greensock.com/js/
  3. // Version 1.0
  4. //com.greensock.core
  5. interface Animation {
  6. data:any;
  7. ticker:any;
  8. timeline:SimpleTimeline;
  9. vars:Object;
  10. Animation(duration:number, vars?:Object);
  11. delay(value:number):any;
  12. duration(value:number):any;
  13. eventCallback(type:string, callback?:Function, params?:any[], scope?:any):any;
  14. invalidate():any;
  15. kill(vars?:Object, target?:Object):any;
  16. pause(atTime?:any, suppressEvents?:bool):any;
  17. paused(value?:bool):any;
  18. play(from?:any, suppressEvents?:bool):any;
  19. restart(includeDelay?:bool, suppressEvents?:bool):any;
  20. resume(from?:any, suppressEvents?:bool):any;
  21. reverse(from?:any, suppressEvents?:bool):any;
  22. reversed(value?:bool):any;
  23. seek(time:any, suppressEvents?:bool):any;
  24. startTime(value:number):any;
  25. time(value:number, suppressEvents?:bool):any;
  26. timeScale(value:number):any;
  27. totalDuration(value:number):any;
  28. totalTime(time:number, suppressEvents?:bool):any;
  29. }
  30. interface SimpleTimeline extends Animation {
  31. autoRemoveChildren:bool;
  32. smoothChildTiming:bool;
  33. insert(tween:any, time:any):any;
  34. render(time:number, suppressEvents?:bool, force?:bool):void;
  35. }
  36. //com.greensock
  37. interface TimelineLite {
  38. addLabel(label:string, time:number):any;
  39. append(value:any, offset:number):any;
  40. appendMultiple(tweens:any[], offset:number, align:string, stagger:number):any;
  41. call(callback:Function, params?:any[], scope?:any, offset?:number, baseTimeOrLabel?:any):any;
  42. clear(labels?:bool):any;
  43. duration(value:number):any;
  44. exportRoot(vars?:Object, omitDelayedCalls?:bool):TimelineLite;
  45. from(target:Object, duration:number, vars:Object, offset:number, baseTimeOrLabel?:any):any;
  46. fromTo(target:Object, duration:number, fromVars:Object, toVars:Object, offset:number, baseTimeOrLabel?:any):any;
  47. getChildren(nested?:bool, tweens?:bool, timelines?:bool, ignoreBeforeTime?:number):any[];
  48. getLabelTime(label:string):number;
  49. getTweensOf(target:Object, nested?:bool):any[];
  50. insert(value:any, timeOrLabel:any):any;
  51. insertMultiple(tweens:any[], timeOrLabel:any, align:string, stagger:number):any;
  52. invalidate():any;
  53. progress(value:number):any;
  54. remove(value:any):any;
  55. removeLabel(label:string):any;
  56. seek(timeOrLabel:any, suppressEvents?:bool):any;
  57. set(target:Object, vars:Object, offset:number, baseTimeOrLabel?:any):any;
  58. shiftChildren(amount:number, adjustLabels?:bool, ignoreBeforeTime?:number):any;
  59. staggerFrom(targets:Object[], duration:number, vars:Object, stagger:number, offset:number, baseTimeOrLabel?:any, onCompleteAll?:Function, onCompleteAllParams?:any[], onCompleteAllScope?:any):any;
  60. staggerFromTo(targets:Object[], duration:number, fromVars:Object, toVars:Object, stagger:number, offset:number, baseTimeOrLabel?:any, onCompleteAll?:Function, onCompleteAllParams?:any[], onCompleteAllScope?:any):any;
  61. staggerTo(targets:Object[], duration:number, vars:Object, stagger:number, offset:number, baseTimeOrLabel?:any, onCompleteAll?:Function, onCompleteAllParams?:any[], onCompleteAllScope?:any):any;
  62. stop():any;
  63. to(target:Object, duration:number, vars:Object, offset:number, baseTimeOrLabel?:any):any;
  64. totalDuration(value:number):any;
  65. usesFrames():bool;
  66. }
  67. interface TimelineMax {
  68. addCallback(callback:Function, timeOrLabel:any, params?:any[], scope?:any):TimelineMax;
  69. currentLabel(value?:string):any;
  70. getActive(nested?:bool, tweens?:bool, timelines?:bool):any[];
  71. getLabelAfter(time:number):string;
  72. getLabelBefore(time:number):string;
  73. getLabelsArray():any[];
  74. invalidate():any;
  75. progress(value:number):any;
  76. removeCallback(callback:Function, timeOrLabel?:any):TimelineMax;
  77. repeat(value:number):any;
  78. repeatDelay(value:number):any;
  79. time(value:number, suppressEvents?:bool):any;
  80. totalDuration(value:number):any;
  81. totalProgress(value:number):any;
  82. tweenFromTo(fromTimeOrLabel:any, toTimeOrLabel:any, vars?:Object):TweenLite;
  83. tweenTo(timeOrLabel:any, vars?:Object):TweenLite;
  84. yoyo(value?:bool):any;
  85. }
  86. interface TweenLite extends Animation {
  87. defaultEase:Ease;
  88. defaultOverwrite:string;
  89. target:Object;
  90. ticker:any;
  91. delayedCall(delay:number, callback:Function, params?:any[], scope?:any, useFrames?:bool):TweenLite;
  92. from(target:Object, duration:number, vars:Object):TweenLite;
  93. fromTo(target:Object, duration:number, fromVars:Object, toVars:Object):TweenLite;
  94. getTweensOf(target:Object):any[];
  95. invalidate():any;
  96. killDelayedCallsTo(func:Function):void;
  97. killTweensOf(target:Object, vars?:Object):void;
  98. set(target:Object, vars:Object):TweenLite;
  99. to(target:Object, duration:number, vars:Object):TweenLite;
  100. }
  101. interface TweenMax extends TweenLite {
  102. delayedCall(delay:number, callback:Function, params?:any[], scope?:any, useFrames?:bool):TweenMax;
  103. from(target:Object, duration:number, vars:Object):TweenMax;
  104. fromTo(target:Object, duration:number, fromVars:Object, toVars:Object):TweenMax;
  105. getAllTweens(includeTimelines?:bool):any[];
  106. getTweensOf(target:Object):any[];
  107. invalidate():any;
  108. isTweening(target:Object):bool;
  109. killAll(complete?:bool, tweens?:bool, delayedCalls?:bool, timelines?:bool):void;
  110. killChildTweensOf(parent:any, complete?:bool):void;
  111. killDelayedCallsTo(func:Function):void;
  112. killTweensOf(target:Object, vars?:Object):void;
  113. pauseAll(tweens?:bool, delayedCalls?:bool, timelines?:bool):void;
  114. progress(value:number):any;
  115. repeat(value:number):any;
  116. repeatDelay(value:number):any;
  117. resumeAll(tweens?:bool, delayedCalls?:bool, timelines?:bool):void;
  118. set(target:Object, vars:Object):TweenMax;
  119. staggerFrom(targets:Object[], duration:number, vars:Object, stagger:number, onCompleteAll?:Function, onCompleteAllParams?:any[], onCompleteAllScope?:any):any[];
  120. staggerFromTo(targets:Object[], duration:number, fromVars:Object, toVars:Object, stagger:number, onCompleteAll?:Function, onCompleteAllParams?:any[], onCompleteAllScope?:any):any[];
  121. staggerTo(targets:Object[], duration:number, vars:Object, stagger:number, onCompleteAll?:Function, onCompleteAllParams?:any[], onCompleteAllScope?:any):any[];
  122. time(value:number, suppressEvents?:bool):any;
  123. to(target:Object, duration:number, vars:Object):TweenMax;
  124. totalDuration(value:number):any;
  125. totalProgress(value:number):any;
  126. updateTo(vars:Object, resetDuration?:bool):any;
  127. yoyo(value?:bool):any;
  128. }
  129. //com.greensock.easing
  130. interface Back {
  131. easeIn;
  132. easeInOut;
  133. easeOut;
  134. }
  135. interface Bounce {
  136. easeIn;
  137. easeInOut;
  138. easeOut;
  139. }
  140. interface Circ {
  141. easeIn;
  142. easeInOut;
  143. easeOut;
  144. }
  145. interface Cubic {
  146. easeIn:Ease;
  147. easeInOut:Ease;
  148. easeOut:Ease;
  149. }
  150. interface Ease {
  151. getRatio(p:number):number;
  152. }
  153. interface EaseLookup {
  154. find(name:string):Ease;
  155. }
  156. interface Elastic {
  157. easeIn;
  158. easeInOut;
  159. easeOut;
  160. }
  161. interface Expo {
  162. easeIn;
  163. easeInOut;
  164. easeOut;
  165. }
  166. interface Linear {
  167. ease:Linear;
  168. easeIn:Linear;
  169. easeInOut:Linear;
  170. easeNone:Linear;
  171. easeOut:Linear;
  172. }
  173. interface Power0 {
  174. easeIn:Ease;
  175. easeInOut:Ease;
  176. easeOut:Ease;
  177. }
  178. interface Power1 {
  179. easeIn:Ease;
  180. easeInOut:Ease;
  181. easeOut:Ease;
  182. }
  183. interface Power2 {
  184. easeIn:Ease;
  185. easeInOut:Ease;
  186. easeOut:Ease;
  187. }
  188. interface Power3 {
  189. easeIn:Ease;
  190. easeInOut:Ease;
  191. easeOut:Ease;
  192. }
  193. interface Power4 {
  194. easeIn:Ease;
  195. easeInOut:Ease;
  196. easeOut:Ease;
  197. }
  198. interface Quad {
  199. easeIn:Ease;
  200. easeInOut:Ease;
  201. easeOut:Ease;
  202. }
  203. interface Quart {
  204. easeIn:Ease;
  205. easeInOut:Ease;
  206. easeOut:Ease;
  207. }
  208. interface Quint {
  209. easeIn:Ease;
  210. easeInOut:Ease;
  211. easeOut:Ease;
  212. }
  213. interface Sine {
  214. easeIn;
  215. easeInOut;
  216. easeOut;
  217. }
  218. interface SlowMo {
  219. ease:SlowMo;
  220. SlowMo(linearRatio:number, power:number, yoyoMode:bool);
  221. config(linearRatio:number, power:number, yoyoMode:bool):SlowMo;
  222. getRatio(p:number):number;
  223. }
  224. interface SteppedEase {
  225. config(steps:number):SteppedEase;
  226. getRatio(p:number):number;
  227. }
  228. interface Strong {
  229. easeIn:Ease;
  230. easeInOut:Ease;
  231. easeOut:Ease;
  232. }
  233. //com.greensock.plugins
  234. interface BezierPlugin extends TweenPlugin {
  235. bezierThrough(values:any[], curviness?:number, quadratic?:bool, correlate?:string, prepend?:Object, calcDifs?:bool):Object;
  236. cubicToQuadratic(a:number, b:number, c:number, d:number):any[];
  237. quadraticToCubic(a:number, b:number, c:number):Object;
  238. }
  239. interface ColorPropsPlugin extends TweenPlugin {
  240. }
  241. interface CSSPlugin extends TweenPlugin {
  242. }
  243. interface CSSRulePlugin extends TweenPlugin {
  244. getRule(selector:string):Object;
  245. }
  246. interface EaselPlugin extends TweenPlugin {
  247. }
  248. interface RaphaelPlugin extends TweenPlugin {
  249. }
  250. interface RoundPropsPlugin extends TweenPlugin {
  251. }
  252. interface ScrollToPlugin extends TweenPlugin {
  253. }
  254. interface TweenPlugin {
  255. activate(plugins:any[]):bool;
  256. }
  257. //com.greensock.core
  258. declare var Animation:Animation;
  259. declare var SimpleTimeline:SimpleTimeline;
  260. //com.greensock
  261. declare var TimelineLite:TimelineLite;
  262. declare var TimelineMax:TimelineMax;
  263. declare var TweenLite:TweenLite;
  264. declare var TweenMax:TweenMax;
  265. //com.greensock.easing
  266. declare var Back:Back;
  267. declare var Bounce:Bounce;
  268. declare var Circ:Circ;
  269. declare var Cubic:Cubic;
  270. declare var Ease:Ease;
  271. declare var EaseLookup:EaseLookup;
  272. declare var Elastic:Elastic;
  273. declare var Expo:Expo;
  274. declare var Linear:Linear;
  275. declare var Power0:Power0;
  276. declare var Power1:Power1;
  277. declare var Power2:Power2;
  278. declare var Power3:Power3;
  279. declare var Power4:Power4;
  280. declare var Quad:Quad;
  281. declare var Quart:Quart;
  282. declare var Quint:Quint;
  283. declare var Sine:Sine;
  284. declare var SlowMo:SlowMo;
  285. declare var SteppedEase:SteppedEase;
  286. declare var Strong:Strong;
  287. //com.greensock.plugins
  288. declare var BezierPlugin:BezierPlugin;
  289. declare var ColorPropsPlugin:ColorPropsPlugin;
  290. declare var CSSPlugin:CSSPlugin;
  291. declare var CSSRulePlugin:CSSRulePlugin;
  292. declare var EaselPlugin:EaselPlugin;
  293. declare var RaphaelPlugin:RaphaelPlugin;
  294. declare var RoundPropsPlugin:RoundPropsPlugin;
  295. declare var ScrollToPlugin:ScrollToPlugin;
  296. declare var TweenPlugin:TweenPlugin;