(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/// <reference path="../../../default/typescript/typescriptAPI/TypeScriptAPIPlugin.d.ts" />
"use strict";

SupCore.system.registerPlugin("typescriptAPI", "Sup.Tween", {
    code: "declare let TWEEN;\n\nnamespace Sup {\n  export class Tween extends ActorComponent {\n    __inner: any;\n    tween: any;\n    timer: number;\n\n    constructor(actor, object) {\n      super(actor);\n      this.tween = new TWEEN.Tween(object);\n\n      this.tween.onComplete(() => { this.destroy(); });\n      this.timer = -1;\n\n      let funcs = {};\n      funcs[\"update\"] = this.update.bind(this)\n      this.__inner = new SupEngine.componentClasses.Behavior(actor.__inner, funcs);\n    }\n    update() {\n      if (this.timer == -1) return;\n\n      this.timer += 1 / Game.getFPS();\n      this.tween.update(this.timer * 1000);\n    }\n\n    to(object, duration) {\n      this.tween.to(object, duration);\n      return this;\n    }\n    delay(amount) {\n      this.tween.delay(amount);\n      return this;\n    }\n    easing(easing) {\n      this.tween.easing(easing);\n      return this;\n    }\n    yoyo(yoyo) {\n      this.tween.yoyo(yoyo);\n      return this;\n    }\n    repeat(times) {\n      this.tween.repeat(times);\n      return this;\n    }\n    onUpdate(update) {\n      this.tween.onUpdate(function() {\n        update(this);\n      });\n      return this;\n    }\n    onComplete(complete) {\n      let self = this;\n      this.tween.onComplete(function() {\n        complete(this);\n        self.destroy();\n      });\n      return this;\n    }\n    start() {\n      this.timer = 0;\n      this.tween.start(this.timer);\n      return this;\n    }\n    stop() {\n      this.tween.stop();\n      this.timer = -1;\n    }\n  }\n}\n",
    defs: "declare namespace Sup {\n  class Tween {\n    constructor(actor: Sup.Actor, object: Object);\n\n    to(object: Object, duration: number): Tween;\n    delay(amount: number): Tween;\n    \n    // Use TWEEN.Easing.*\n    // See http://sole.github.io/tween.js/examples/03_graphs.html\n    // for visual representations of each easing mode\n    easing(easing: (k: number) => number): Tween;\n\n    yoyo(yoyo: boolean): Tween;\n    repeat(times: number): Tween;\n\n    onUpdate(onUpdate: Function): Tween;\n    onComplete(onComplete: Function): Tween;\n\n    start(): Tween;\n    stop(): Tween;\n  }\n}\n"
});
SupCore.system.registerPlugin("typescriptAPI", "TWEEN", {
    defs: "// Type definitions for tween.js r12\n// Project: https://github.com/sole/tween.js/\n// Definitions by: sunetos <https://github.com/sunetos>, jzarnikov <https://github.com/jzarnikov>\n// Definitions: https://github.com/borisyankov/DefinitelyTyped\n\ndeclare module TWEEN {\n  export var REVISION: string;\n  export function getAll(): Tween[];\n  export function removeAll(): void;\n  export function add(tween:Tween): void;\n  export function remove(tween:Tween): void;\n  export function update(time?:number): boolean;\n\n  export class Tween {\n    constructor(object?:any);\n    to(properties:any, duration:number): Tween;\n    start(time?:number): Tween;\n    stop(): Tween;\n    delay(amount:number): Tween;\n    easing(easing: (k: number) => number): Tween;\n    interpolation(interpolation: (v:number[], k:number) => number): Tween;\n    chain(...tweens:Tween[]): Tween;\n    onStart(callback: (object?: any) => void): Tween;\n    onUpdate(callback: (object?: any) => void): Tween;\n    onComplete(callback: (object?: any) => void): Tween;\n    update(time: number): boolean;\n    repeat(times: number): Tween;\n    yoyo(enable: boolean): Tween;\n  }\n  export var Easing: TweenEasing;\n  export var Interpolation: TweenInterpolation;\n}\n\n// See http://sole.github.io/tween.js/examples/03_graphs.html\n// for visual representations of each easing mode\n\ninterface TweenEasing {\n  Linear: {\n    None(k:number): number;\n  };\n  Quadratic: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Cubic: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Quartic: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Quintic: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Sinusoidal: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Exponential: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Circular: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Elastic: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Back: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n  Bounce: {\n    In(k:number): number;\n    Out(k:number): number;\n    InOut(k:number): number;\n  };\n}\n\ninterface TweenInterpolation {\n  Linear(v:number[], k:number): number;\n  Bezier(v:number[], k:number): number;\n  CatmullRom(v:number[], k:number): number;\n\n  Utils: {\n    Linear(p0:number, p1:number, t:number): number;\n    Bernstein(n:number, i:number): number;\n    Factorial(n): number;\n  };\n}\n",
    code: ""
});

},{}]},{},[1]);
