From e5084d02274394e7ada1f9a62e507610a718e9af Mon Sep 17 00:00:00 2001 From: Mient - jan Stelling Date: Mon, 2 May 2016 22:29:54 +0200 Subject: [PATCH] refactoring flump code --- src/PixiFlump.js | 18 +++++++------- src/PixiFlump.js.map | 2 +- src/PixiFlump.ts | 26 ++++++++++----------- src/core/Texture.js | 18 +++++++------- src/core/Texture.js.map | 2 +- src/core/Texture.ts | 7 ++---- src/core/TextureGroup.js | 23 +++++++++--------- src/core/TextureGroup.js.map | 2 +- src/core/TextureGroup.ts | 36 +++++++++++++--------------- src/core/TextureGroupAtlas.js | 23 ++++++++---------- src/core/TextureGroupAtlas.js.map | 2 +- src/core/TextureGroupAtlas.ts | 22 ++++++++--------- src/data/KeyframeData.js | 14 +++++------ src/data/KeyframeData.js.map | 2 +- src/data/KeyframeData.ts | 5 ++-- src/data/LabelData.js | 10 ++++---- src/data/LabelData.js.map | 2 +- src/data/LabelData.ts | 2 +- src/data/LabelQueueData.js | 34 --------------------------- src/data/LabelQueueData.js.map | 1 - src/data/LabelQueueData.ts | 39 ------------------------------- src/data/LayerData.js | 15 ++++++------ src/data/LayerData.js.map | 2 +- src/data/LayerData.ts | 29 +++++++++++++---------- src/data/MovieData.js | 10 ++++---- src/data/MovieData.js.map | 2 +- src/data/MovieData.ts | 11 +++++---- src/interface/IHashMap.js | 2 ++ src/interface/IHashMap.js.map | 1 + src/interface/IHashMap.ts | 5 ++++ 30 files changed, 146 insertions(+), 221 deletions(-) delete mode 100644 src/data/LabelQueueData.js delete mode 100644 src/data/LabelQueueData.js.map delete mode 100644 src/data/LabelQueueData.ts create mode 100644 src/interface/IHashMap.js create mode 100644 src/interface/IHashMap.js.map create mode 100644 src/interface/IHashMap.ts diff --git a/src/PixiFlump.js b/src/PixiFlump.js index 0321aa1..f87b3e0 100644 --- a/src/PixiFlump.js +++ b/src/PixiFlump.js @@ -1,9 +1,9 @@ "use strict"; var Promise_1 = require("./util/Promise"); var HttpRequest_1 = require("./util/HttpRequest"); -var MovieData_1 = require("./core/MovieData"); var TextureGroup_1 = require("./core/TextureGroup"); -var FlumpMovie_1 = require("./core/FlumpMovie"); +var MovieData_1 = require("./data/MovieData"); +var QueueItem_1 = require("./util/QueueItem"); var PixiFlump = (function () { function PixiFlump(basePath) { this.movieData = []; @@ -66,13 +66,13 @@ var PixiFlump = (function () { this.isOptimised = json.optimised || false; var textureGroupLoaders = []; for (var i = 0; i < json.movies.length; i++) { - var flumpMovieData = new MovieData_1.FlumpMovieData(this, json.movies[i]); + var flumpMovieData = new MovieData_1.MovieData(this, json.movies[i]); this.movieData.push(flumpMovieData); } var textureGroups = json.textureGroups; for (var i = 0; i < textureGroups.length; i++) { var textureGroup = textureGroups[i]; - var promise = TextureGroup_1.FlumpTextureGroup.load(this, textureGroup); + var promise = TextureGroup_1.TextureGroup.load(this, textureGroup); textureGroupLoaders.push(promise); } return HttpRequest_1.HttpRequest.wait(textureGroupLoaders, onProcess) @@ -85,7 +85,7 @@ var PixiFlump = (function () { return _this; }); }; - PixiFlump.prototype.getFlumpMovieData = function (name) { + PixiFlump.prototype.getMovieData = function (name) { for (var i = 0; i < this.movieData.length; i++) { var movieData = this.movieData[i]; if (movieData.id == name) { @@ -97,7 +97,7 @@ var PixiFlump = (function () { PixiFlump.prototype.createSymbol = function (name, paused) { if (paused === void 0) { paused = false; } for (var i = 0; i < this.textureGroups.length; i++) { - var flumpTextures = this.textureGroups[i].flumpTextures; + var flumpTextures = this.textureGroups[i].textures; if (name in flumpTextures) { return flumpTextures[name]; } @@ -105,8 +105,8 @@ var PixiFlump = (function () { for (var i = 0; i < this.movieData.length; i++) { var movieData = this.movieData[i]; if (movieData.id == name) { - var movie = new FlumpMovie_1.FlumpMovie(this, name); - movie.getQueue().add(new QueueItem(null, 0, movie.frames, -1, 0)); + var movie = new FlumpMovie(this, name); + movie.getQueue().add(new QueueItem_1.QueueItem(null, 0, movie.frames, -1, 0)); movie.paused = paused; return movie; } @@ -124,7 +124,7 @@ var PixiFlump = (function () { for (var i = 0; i < this.movieData.length; i++) { var movieData = this.movieData[i]; if (movieData.id == name) { - var movie = new FlumpMovie_1.FlumpMovie(this, name); + var movie = new FlumpMovie(this, name); movie.paused = true; return movie; } diff --git a/src/PixiFlump.js.map b/src/PixiFlump.js.map index 95724aa..b10eb19 100644 --- a/src/PixiFlump.js.map +++ b/src/PixiFlump.js.map @@ -1 +1 @@ -{"version":3,"file":"PixiFlump.js","sourceRoot":"","sources":["PixiFlump.ts"],"names":[],"mappings":";AAEA,wBAAsB,gBAAgB,CAAC,CAAA;AAEvC,4BAA0B,oBAAoB,CAAC,CAAA;AAE/C,0BAA6B,kBAAkB,CAAC,CAAA;AAChD,6BAAgC,qBAAqB,CAAC,CAAA;AAEtD,2BAAyB,mBAAmB,CAAC,CAAA;AAG7C;IAgDC,mBAAY,QAAgB;QAdrB,cAAS,GAAyB,EAAE,CAAC;QACrC,kBAAa,GAA4B,EAAE,CAAC;QAO5C,QAAG,GAAU,CAAC,CAAC;QACf,gBAAW,GAAW,KAAK,CAAC;QAEzB,eAAU,GAAW,KAAK,CAAC;QAC3B,eAAU,GAAW,KAAK,CAAC;QAIpC,EAAE,CAAA,CAAC,QAAQ,CAAC,CACZ,CAAC;YACA,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;QACrB,CAAC;IACF,CAAC;IAlDa,cAAI,GAAlB,UAAmB,GAAU,EAAE,YAAuB,EAAE,SAAkC;QAEzF,IAAI,OAAO,GAAG,GAAG,CAAC;QAElB,EAAE,CAAA,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAC7B,CAAC;YACA,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,CAAC;QAAC,IAAI,CAAC,CAAC;YAEP,EAAE,CAAA,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,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a/src/PixiFlump.ts b/src/PixiFlump.ts index 50a8f8d..f52a10d 100644 --- a/src/PixiFlump.ts +++ b/src/PixiFlump.ts @@ -3,11 +3,11 @@ import {Promise} from "./util/Promise"; import {ILoadable} from "./interface/ILoadable"; import {HttpRequest} from "./util/HttpRequest"; -import {ILibrary} from "./core/ILibrary"; -import {FlumpMovieData} from "./core/MovieData"; -import {FlumpTextureGroup} from "./core/TextureGroup"; -import {IFlumpMovie} from "./core/IFlumpMovie"; -import {FlumpMovie} from "./core/FlumpMovie"; + +import {TextureGroup} from "./core/TextureGroup"; +import {ILibrary} from "./interface/ILibrary"; +import {MovieData} from "./data/MovieData"; +import {QueueItem} from "./util/QueueItem"; export class PixiFlump implements ILoadable @@ -44,8 +44,8 @@ export class PixiFlump implements ILoadable }); } - public movieData:Array = []; - public textureGroups:Array = []; + public movieData:Array = []; + public textureGroups:Array = []; public url:string; public md5:string; @@ -105,10 +105,10 @@ export class PixiFlump implements ILoadable this.referenceList = json.referenceList || null; this.isOptimised = json.optimised || false; - var textureGroupLoaders:Array> = []; + var textureGroupLoaders:Array> = []; for(var i = 0; i < json.movies.length; i++) { - var flumpMovieData = new FlumpMovieData(this, json.movies[i]); + var flumpMovieData = new MovieData(this, json.movies[i]); this.movieData.push(flumpMovieData); } @@ -116,12 +116,12 @@ export class PixiFlump implements ILoadable for(var i = 0; i < textureGroups.length; i++) { var textureGroup = textureGroups[i]; - var promise = FlumpTextureGroup.load(this, textureGroup); + var promise = TextureGroup.load(this, textureGroup); textureGroupLoaders.push(promise); } return HttpRequest.wait(textureGroupLoaders, onProcess) - .then((textureGroups:Array) => { + .then((textureGroups:Array) => { for(var i = 0; i < textureGroups.length; i++) { @@ -135,7 +135,7 @@ export class PixiFlump implements ILoadable }); } - public getFlumpMovieData(name:string):FlumpMovieData + public getMovieData(name:string):MovieData { for(var i = 0; i < this.movieData.length; i++) { @@ -153,7 +153,7 @@ export class PixiFlump implements ILoadable { for(var i = 0; i < this.textureGroups.length; i++) { - var flumpTextures = this.textureGroups[i].flumpTextures; + var flumpTextures = this.textureGroups[i].textures; if(name in flumpTextures) { diff --git a/src/core/Texture.js b/src/core/Texture.js index cfb2207..9b64d97 100644 --- a/src/core/Texture.js +++ b/src/core/Texture.js @@ -1,8 +1,6 @@ "use strict"; -var DisplayType_1 = require("../../enum/DisplayType"); -var FlumpTexture = (function () { - function FlumpTexture(renderTexture, json) { - this.type = DisplayType_1.DisplayType.FLUMPSYMBOL; +var Texture = (function () { + function Texture(renderTexture, json) { this.time = 0.0; this.name = json.symbol; this.renderTexture = renderTexture; @@ -13,16 +11,16 @@ var FlumpTexture = (function () { this.width = json.rect[2]; this.height = json.rect[3]; } - FlumpTexture.prototype.onTick = function (delta) { + Texture.prototype.onTick = function (delta) { }; - FlumpTexture.prototype.draw = function (ctx) { + Texture.prototype.draw = function (ctx) { ctx.drawImage(this.renderTexture, this.x, this.y, this.width, this.height, 0, 0, this.width, this.height); return true; }; - FlumpTexture.prototype.reset = function () { + Texture.prototype.reset = function () { this.time = 0.0; }; - return FlumpTexture; + return Texture; }()); -exports.FlumpTexture = FlumpTexture; -//# sourceMappingURL=FlumpTexture.js.map \ No newline at end of file +exports.Texture = Texture; +//# sourceMappingURL=Texture.js.map \ No newline at end of file diff --git a/src/core/Texture.js.map b/src/core/Texture.js.map index 2ce20ba..f5651d9 100644 --- a/src/core/Texture.js.map +++ b/src/core/Texture.js.map @@ -1 +1 @@ -{"version":3,"file":"FlumpTexture.js","sourceRoot":"","sources":["FlumpTexture.ts"],"names":[],"mappings":";AACA,4BAA0B,wBAAwB,CAAC,CAAA;AAGnD;IAaC,sBAAY,aAAgD,EAAE,IAAa;QAXpE,SAAI,GAAe,yBAAW,CAAC,WAAW,CAAC;QAE3C,SAAI,GAAU,GAAG,CAAC;QAWxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,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I,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAEM,wBAAM,GAAb,UAAc,KAAY;IAE1B,CAAC;IAEM,sBAAI,GAAX,UAAY,GAA4B;QAEvC,GAAG,CAAC,SAAS,CAAoB,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7H,MAAM,CAAC,IAAI,CAAC;IACb,CAAC;IAEM,uBAAK,GAAZ;QAEC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACjB,CAAC;IACF,cAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,eAAO,UAsCnB,CAAA"} \ No newline at end of file diff --git a/src/core/Texture.ts b/src/core/Texture.ts index ee937dc..77fb084 100644 --- a/src/core/Texture.ts +++ b/src/core/Texture.ts @@ -1,10 +1,7 @@ -import {IFlumpMovie} from "./IFlumpMovie"; -import {DisplayType} from "../../enum/DisplayType"; -import {ITexture} from "./IFlumpLibrary"; +import {ITexture} from "../interface/ILibrary"; -export class FlumpTexture implements IFlumpMovie +export class Texture { - public type:DisplayType = DisplayType.FLUMPSYMBOL; public name:string; public time:number = 0.0; public renderTexture:HTMLImageElement|HTMLCanvasElement; diff --git a/src/core/TextureGroup.js b/src/core/TextureGroup.js index 0909699..bd5761a 100644 --- a/src/core/TextureGroup.js +++ b/src/core/TextureGroup.js @@ -1,19 +1,18 @@ "use strict"; -var FlumpTextureGroupAtlas_1 = require('./FlumpTextureGroupAtlas'); -var Promise_1 = require('../../../core/util/Promise'); -var FlumpTextureGroup = (function () { - function FlumpTextureGroup(flumpTextureGroupAtlases, flumpTextures) { - this.flumpTextureGroupAtlases = flumpTextureGroupAtlases; - this.flumpTextures = flumpTextures; +var TextureGroupAtlas_1 = require("./TextureGroupAtlas"); +var TextureGroup = (function () { + function TextureGroup(flumpTextureGroupAtlases, flumpTextures) { + this.textureGroupAtlases = flumpTextureGroupAtlases; + this.textures = flumpTextures; } - FlumpTextureGroup.load = function (flumpLibrary, json) { + TextureGroup.load = function (flumpLibrary, json) { var atlases = json.atlases; var loaders = []; for (var i = 0; i < atlases.length; i++) { var atlas = atlases[i]; - loaders.push(FlumpTextureGroupAtlas_1.FlumpTextureGroupAtlas.load(flumpLibrary, atlas)); + loaders.push(TextureGroupAtlas_1.TextureGroupAtlas.load(flumpLibrary, atlas)); } - return Promise_1.Promise.all(loaders).then(function (atlases) { + return Promise.all(loaders).then(function (atlases) { var flumpTextures = {}; for (var i = 0; i < atlases.length; i++) { var atlas = atlases[i]; @@ -23,13 +22,13 @@ var FlumpTextureGroup = (function () { } } } - return new FlumpTextureGroup(atlases, flumpTextures); + return new TextureGroup(atlases, flumpTextures); }).catch(function (err) { console.warn('could not load textureGroup', err); throw new Error('could not load textureGroup'); }); }; - return FlumpTextureGroup; + return TextureGroup; }()); -exports.FlumpTextureGroup = FlumpTextureGroup; +exports.TextureGroup = TextureGroup; //# sourceMappingURL=TextureGroup.js.map \ No newline at end of file diff --git a/src/core/TextureGroup.js.map b/src/core/TextureGroup.js.map index cd9c393..fcd8a24 100644 --- a/src/core/TextureGroup.js.map +++ b/src/core/TextureGroup.js.map @@ -1 +1 @@ -{"version":3,"file":"TextureGroup.js","sourceRoot":"","sources":["TextureGroup.ts"],"names":[],"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IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;gBAEvB,GAAG,CAAA,CAAC,IAAI,IAAI,IAAI,KAAK,CAAC,aAAa,CAAC,CACpC,CAAC;oBACA,EAAE,CAAA,CAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA,CAAC;wBAC7C,aAAa,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;oBACjD,CAAC;gBACF,CAAC;YACF,CAAC;YAED,MAAM,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,GAAG;YACZ,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAA;YAChD,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACJ,CAAC;IAYF,mBAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,oBAAY,eA6CxB,CAAA"} \ No newline at end of file diff --git a/src/core/TextureGroup.ts b/src/core/TextureGroup.ts index fb243ce..525e72c 100644 --- a/src/core/TextureGroup.ts +++ b/src/core/TextureGroup.ts @@ -1,27 +1,23 @@ -import {ILoadable} from '../../../core/interface/ILoadable'; -import {FlumpLibrary} from '../FlumpLibrary'; -import {IHashMap} from '../../../core/interface/IHashMap'; -import {FlumpTextureGroupAtlas} from './FlumpTextureGroupAtlas'; -import {FlumpTexture} from './FlumpTexture'; -import {HttpRequest} from '../../../core/net/HttpRequest'; -import {Promise} from '../../../core/util/Promise'; -import {ITextureGroup, IAtlas} from "./IFlumpLibrary"; - -export class FlumpTextureGroup +import {IHashMap} from "../interface/IHashMap"; +import {TextureGroupAtlas} from "./TextureGroupAtlas"; +import {IAtlas, ITextureGroup} from "../interface/ILibrary"; +import {Texture} from "./Texture"; +import {PixiFlump} from "../PixiFlump"; +export class TextureGroup { - public static load(flumpLibrary:FlumpLibrary, json:ITextureGroup):Promise + public static load(flumpLibrary:PixiFlump, json:ITextureGroup):Promise { var atlases = json.atlases; var loaders:Array> = []; for(var i = 0; i < atlases.length; i++) { var atlas:IAtlas = atlases[i]; - loaders.push(FlumpTextureGroupAtlas.load(flumpLibrary, atlas)); + loaders.push(TextureGroupAtlas.load(flumpLibrary, atlas)); } - return Promise.all(loaders).then((atlases:Array) => + return Promise.all(loaders).then((atlases:Array) => { - var flumpTextures:IHashMap = {}; + var flumpTextures:IHashMap = {}; for(var i = 0; i < atlases.length; i++) { @@ -35,20 +31,20 @@ export class FlumpTextureGroup } } - return new FlumpTextureGroup(atlases, flumpTextures); + return new TextureGroup(atlases, flumpTextures); }).catch((err) => { console.warn('could not load textureGroup', err) throw new Error('could not load textureGroup'); }); } - public flumpTextureGroupAtlases:Array; - public flumpTextures:IHashMap; + public textureGroupAtlases:Array; + public textures:IHashMap; - constructor(flumpTextureGroupAtlases:Array, flumpTextures:IHashMap) + constructor(flumpTextureGroupAtlases:Array, flumpTextures:IHashMap) { - this.flumpTextureGroupAtlases = flumpTextureGroupAtlases; - this.flumpTextures = flumpTextures; + this.textureGroupAtlases = flumpTextureGroupAtlases; + this.textures = flumpTextures; } diff --git a/src/core/TextureGroupAtlas.js b/src/core/TextureGroupAtlas.js index 5610b5d..988f74d 100644 --- a/src/core/TextureGroupAtlas.js +++ b/src/core/TextureGroupAtlas.js @@ -1,20 +1,19 @@ "use strict"; -var Promise_1 = require('../../../core/util/Promise'); -var FlumpTexture_1 = require("./FlumpTexture"); -var FlumpTextureGroupAtlas = (function () { - function FlumpTextureGroupAtlas(renderTexture, json) { +var Texture_1 = require("./Texture"); +var TextureGroupAtlas = (function () { + function TextureGroupAtlas(renderTexture, json) { this.flumpTextures = {}; this.renderTexture = renderTexture; var textures = json.textures; for (var i = 0; i < textures.length; i++) { var texture = textures[i]; - this.flumpTextures[texture.symbol] = new FlumpTexture_1.FlumpTexture(renderTexture, texture); + this.flumpTextures[texture.symbol] = new Texture_1.Texture(renderTexture, texture); } } - FlumpTextureGroupAtlas.load = function (flumpLibrary, json) { + TextureGroupAtlas.load = function (flumpLibrary, json) { var file = json.file; var url = flumpLibrary.url + '/' + file; - return new Promise_1.Promise(function (resolve, reject) { + return new Promise(function (resolve, reject) { var img = document.createElement('img'); img.onload = function () { resolve(img); @@ -23,11 +22,9 @@ var FlumpTextureGroupAtlas = (function () { reject(); }; img.src = url; - }).then(function (data) { - return new FlumpTextureGroupAtlas(data, json); - }); + }).then(function (data) { return new TextureGroupAtlas(data, json); }); }; - return FlumpTextureGroupAtlas; + return TextureGroupAtlas; }()); -exports.FlumpTextureGroupAtlas = FlumpTextureGroupAtlas; -//# sourceMappingURL=FlumpTextureGroupAtlas.js.map \ No newline at end of file +exports.TextureGroupAtlas = TextureGroupAtlas; +//# sourceMappingURL=TextureGroupAtlas.js.map \ No newline at end of file diff --git a/src/core/TextureGroupAtlas.js.map b/src/core/TextureGroupAtlas.js.map index 3d7d748..643f280 100644 --- a/src/core/TextureGroupAtlas.js.map +++ b/src/core/TextureGroupAtlas.js.map @@ -1 +1 @@ -{"version":3,"file":"FlumpTextureGroupAtlas.js","sourceRoot":"","sources":["FlumpTextureGroupAtlas.ts"],"names":[],"mappings":";AAEA,wBAAsB,4BAA4B,CAAC,CAAA;AAEnD,6BAA2B,gBAAgB,CAAC,CAAA;AAE5C;IA0BC,gCAAa,aAA8B,EAAE,IAAW;QAFjD,kBAAa,GAA0B,EAAE,CAAC;QAIhD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAEnC,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EACvC,CAAC;YACA,IAAI,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,aAAa,CAAC,OAAO,C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I,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,iBAAO,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC1E,CAAC;IACF,CAAC;IAhCa,sBAAI,GAAlB,UAAmB,YAAsB,EAAE,IAAW;QAErD,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,GAAG,GAAG,YAAY,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;QAExC,MAAM,CAAC,IAAI,OAAO,CAAC,UAAS,OAAO,EAAE,MAAM;YAC1C,IAAI,GAAG,GAAsB,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC3D,GAAG,CAAC,MAAM,GAAG;gBACZ,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,GAAG,CAAC,OAAO,GAAG;gBACb,MAAM,EAAE,CAAC;YACV,CAAC,CAAC;YAEF,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,CAAC,CAAC,CAAC,IAAI,CAAC,UAAC,IAAqB,IAAK,OAAA,IAAI,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAjC,CAAiC,CAAE,CAAC;IACxE,CAAC;IAgBF,wBAAC;AAAD,CAAC,AAnCD,IAmCC;AAnCY,yBAAiB,oBAmC7B,CAAA"} \ No newline at end of file diff --git a/src/core/TextureGroupAtlas.ts b/src/core/TextureGroupAtlas.ts index 896380f..f8b6291 100644 --- a/src/core/TextureGroupAtlas.ts +++ b/src/core/TextureGroupAtlas.ts @@ -1,12 +1,12 @@ -import {FlumpLibrary} from '../FlumpLibrary'; -import {IHashMap} from '../../../core/interface/IHashMap'; -import {Promise} from '../../../core/util/Promise'; -import {IAtlas} from "./IFlumpLibrary"; -import {FlumpTexture} from "./FlumpTexture"; -export class FlumpTextureGroupAtlas +import {Texture} from "./Texture"; +import {PixiFlump} from "../PixiFlump"; +import {IAtlas} from "../interface/ILibrary"; +import {IHashMap} from "../interface/IHashMap"; + +export class TextureGroupAtlas { - public static load(flumpLibrary:FlumpLibrary, json:IAtlas):Promise + public static load(flumpLibrary:PixiFlump, json:IAtlas):Promise { var file = json.file; var url = flumpLibrary.url + '/' + file; @@ -22,13 +22,11 @@ export class FlumpTextureGroupAtlas }; img.src = url; - }).then((data:HTMLImageElement) => { - return new FlumpTextureGroupAtlas(data, json); - }); + }).then((data:HTMLImageElement) => new TextureGroupAtlas(data, json) ); } public renderTexture:HTMLImageElement; - public flumpTextures:IHashMap = {}; + public flumpTextures:IHashMap = {}; constructor( renderTexture:HTMLImageElement, json:IAtlas) { @@ -38,7 +36,7 @@ export class FlumpTextureGroupAtlas for(var i = 0; i < textures.length; i++) { var texture = textures[i]; - this.flumpTextures[texture.symbol] = new FlumpTexture(renderTexture, texture); + this.flumpTextures[texture.symbol] = new Texture(renderTexture, texture); } } } diff --git a/src/data/KeyframeData.js b/src/data/KeyframeData.js index 7905ce6..0991c0b 100644 --- a/src/data/KeyframeData.js +++ b/src/data/KeyframeData.js @@ -1,6 +1,6 @@ "use strict"; -var FlumpKeyframeData = (function () { - function FlumpKeyframeData(json) { +var KeyframeData = (function () { + function KeyframeData(json) { if (json.length != void 0) { this.fromArray(json); } @@ -24,7 +24,7 @@ var FlumpKeyframeData = (function () { this.ease = 'ease' in jsonObject ? jsonObject.ease : 0.0; } } - FlumpKeyframeData.prototype.getValueOrder = function () { + KeyframeData.prototype.getValueOrder = function () { return [ 'index', 'duration', @@ -40,7 +40,7 @@ var FlumpKeyframeData = (function () { 'ease' ]; }; - FlumpKeyframeData.prototype.toArray = function () { + KeyframeData.prototype.toArray = function () { var order = this.getValueOrder(); var data = new Array(order.length); for (var i = 0; i < order.length; i++) { @@ -49,7 +49,7 @@ var FlumpKeyframeData = (function () { } return data; }; - FlumpKeyframeData.prototype.fromArray = function (data) { + KeyframeData.prototype.fromArray = function (data) { var order = this.getValueOrder(); for (var i = 0; i < data.length; i++) { var name = order[i]; @@ -57,7 +57,7 @@ var FlumpKeyframeData = (function () { this[name] = value; } }; - return FlumpKeyframeData; + return KeyframeData; }()); -exports.FlumpKeyframeData = FlumpKeyframeData; +exports.KeyframeData = KeyframeData; //# sourceMappingURL=KeyframeData.js.map \ No newline at end of file diff --git a/src/data/KeyframeData.js.map b/src/data/KeyframeData.js.map index a5ec883..4a7a3cf 100644 --- a/src/data/KeyframeData.js.map +++ b/src/data/KeyframeData.js.map @@ -1 +1 @@ -{"version":3,"file":"KeyframeData.js","sourceRoot":"","sources":["KeyframeData.ts"],"names":[],"mappings":";AAGA;IAuBC,2BAAY,IAAyB;QAEpC,EAAE,CAAA,CAAgB,IAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CACzC,CAAC;YACA,IAAI,CAAC,SAAS,CAAc,IAAI,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,CACJ,CAAC;YACA,IAAI,UAAU,GAAe,IAAI,CAAC;YAClC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;YAC9B,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;YACpC,IAAI,CAAC,GAAG,GAAG,KAAK,IAAI,UAAU,GAAG,UAAU,CAAC,GAAG,GAAG,IAAI,CAAC;YACvD,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,UAAU,GAAG,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;YAC7D,IAAI,CAAC,CAAC,GAAG,KAAK,IAAI,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;YACvD,IAAI,CAAC,CAAC,GAAG,KAAK,IAAI,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;YACvD,IAAI,CAAC,MAAM,GAAG,OAAO,IAAI,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GA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C,GAAG,KAAK,CAAC;QACpB,CAAC;IACF,CAAC;IACF,mBAAC;AAAD,CAAC,AA5FD,IA4FC;AA5FY,oBAAY,eA4FxB,CAAA"} \ No newline at end of file diff --git a/src/data/KeyframeData.ts b/src/data/KeyframeData.ts index 6065982..a73e30c 100644 --- a/src/data/KeyframeData.ts +++ b/src/data/KeyframeData.ts @@ -1,7 +1,6 @@ +import {IKeyframe} from "../interface/ILibrary"; -import {IKeyframe} from "./IFlumpLibrary"; - -export class FlumpKeyframeData +export class KeyframeData { index:number; duration:number; diff --git a/src/data/LabelData.js b/src/data/LabelData.js index bdd91c8..d2a1320 100644 --- a/src/data/LabelData.js +++ b/src/data/LabelData.js @@ -1,11 +1,11 @@ "use strict"; -var FlumpLabelData = (function () { - function FlumpLabelData(label, index, duration) { +var LabelData = (function () { + function LabelData(label, index, duration) { this.label = label; this.index = index; this.duration = duration; } - return FlumpLabelData; + return LabelData; }()); -exports.FlumpLabelData = FlumpLabelData; -//# sourceMappingURL=FlumpLabelData.js.map \ No newline at end of file +exports.LabelData = LabelData; +//# sourceMappingURL=LabelData.js.map \ No newline at end of file diff --git a/src/data/LabelData.js.map b/src/data/LabelData.js.map index 83a89b9..e68e867 100644 --- a/src/data/LabelData.js.map +++ b/src/data/LabelData.js.map @@ -1 +1 @@ -{"version":3,"file":"FlumpLabelData.js","sourceRoot":"","sources":["FlumpLabelData.ts"],"names":[],"mappings":";AAAA;IAMC,wBAAY,KAAY,EAAE,KAAY,EAAE,QAAe;QAEtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,CAAC;IACF,qBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,sBAAc,iBAY1B,CAAA"} \ No newline at end of file +{"version":3,"file":"LabelData.js","sourceRoot":"","sources":["LabelData.ts"],"names":[],"mappings":";AAAA;IAMC,mBAAY,KAAY,EAAE,KAAY,EAAE,QAAe;QAEtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,CAAC;IACF,gBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,iBAAS,YAYrB,CAAA"} \ No newline at end of file diff --git a/src/data/LabelData.ts b/src/data/LabelData.ts index 29d8f5f..4835e18 100644 --- a/src/data/LabelData.ts +++ b/src/data/LabelData.ts @@ -1,4 +1,4 @@ -export class FlumpLabelData +export class LabelData { public label:string; public index:number; diff --git a/src/data/LabelQueueData.js b/src/data/LabelQueueData.js deleted file mode 100644 index 01b9620..0000000 --- a/src/data/LabelQueueData.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; -var FlumpLabelData_1 = require('./FlumpLabelData'); -var FlumpLabelQueueData = (function (_super) { - __extends(FlumpLabelQueueData, _super); - function FlumpLabelQueueData(label, index, duration, times, delay) { - if (times === void 0) { times = 1; } - if (delay === void 0) { delay = 0; } - _super.call(this, label, index, duration); - this.times = times; - this.delay = delay; - } - FlumpLabelQueueData.prototype.then = function (complete) { - this._complete = complete; - return this; - }; - FlumpLabelQueueData.prototype.finish = function () { - if (this._complete) { - this._complete.call(this); - } - return this; - }; - FlumpLabelQueueData.prototype.destruct = function () { - this.label = null; - this._complete = null; - }; - return FlumpLabelQueueData; -}(FlumpLabelData_1.FlumpLabelData)); -exports.FlumpLabelQueueData = FlumpLabelQueueData; -//# sourceMappingURL=LabelQueueData.js.map \ No newline at end of file diff --git a/src/data/LabelQueueData.js.map b/src/data/LabelQueueData.js.map deleted file mode 100644 index ea8a6dd..0000000 --- a/src/data/LabelQueueData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LabelQueueData.js","sourceRoot":"","sources":["LabelQueueData.ts"],"names":[],"mappings":";;;;;;AAAA,+BAA6B,kBAAkB,CAAC,CAAA;AAEhD;IAAyC,uCAAc;IAMtD,6BAAY,KAAY,EAAE,KAAY,EAAE,QAAe,EAAE,KAAgB,EAAE,KAAgB;QAAlC,qBAAgB,GAAhB,SAAgB;QAAE,qBAAgB,GAAhB,SAAgB;QAE1F,kBAAM,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QAE9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,CAAC;IAEM,kCAAI,GAAX,UAAY,QAAkB;QAE7B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC;IACb,CAAC;IAEM,oCAAM,GAAb;QAEC,EAAE,CAAA,CAAC,IAAI,CAAC,SAAS,CAAC,CAClB,CAAC;YACA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IACb,CAAC;IAEM,sCAAQ,GAAf;QAEC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACvB,CAAC;IACF,0BAAC;AAAD,CAAC,AAnCD,CAAyC,+BAAc,GAmCtD;AAnCY,2BAAmB,sBAmC/B,CAAA"} \ No newline at end of file diff --git a/src/data/LabelQueueData.ts b/src/data/LabelQueueData.ts deleted file mode 100644 index f12395d..0000000 --- a/src/data/LabelQueueData.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {FlumpLabelData} from './FlumpLabelData'; - -export class FlumpLabelQueueData extends FlumpLabelData -{ - public times:number; - public delay:number; - private _complete:Function; - - constructor(label:string, index:number, duration:number, times:number = 1, delay:number = 0) - { - super(label, index, duration); - - this.times = times; - this.delay = delay; - } - - public then(complete:() => any):FlumpLabelQueueData - { - this._complete = complete; - return this; - } - - public finish():FlumpLabelQueueData - { - if(this._complete) - { - this._complete.call(this); - } - - return this; - } - - public destruct():void - { - this.label = null; - this._complete = null; - } -} - diff --git a/src/data/LayerData.js b/src/data/LayerData.js index a2a26dc..ce7b232 100644 --- a/src/data/LayerData.js +++ b/src/data/LayerData.js @@ -1,20 +1,21 @@ "use strict"; +var KeyframeData_1 = require("./KeyframeData"); var LayerData = (function () { function LayerData(json) { - this.flumpKeyframeDatas = []; + this.keyframeData = []; this.name = json.name; this.flipbook = 'flipbook' in json ? !!json.flipbook : false; var keyframes = json.keyframes; var keyFrameData = null; for (var i = 0; i < keyframes.length; i++) { var keyframe = keyframes[i]; - keyFrameData = new KeyframeData(keyframe); - this.flumpKeyframeDatas.push(keyFrameData); + keyFrameData = new KeyframeData_1.KeyframeData(keyframe); + this.keyframeData.push(keyFrameData); } this.frames = keyFrameData.index + keyFrameData.duration; } LayerData.prototype.getKeyframeForFrame = function (frame) { - var datas = this.flumpKeyframeDatas; + var datas = this.keyframeData; for (var i = 1; i < datas.length; i++) { if (datas[i].index > frame) { return datas[i - 1]; @@ -23,9 +24,9 @@ var LayerData = (function () { return datas[datas.length - 1]; }; LayerData.prototype.getKeyframeAfter = function (flumpKeyframeData) { - for (var i = 0; i < this.flumpKeyframeDatas.length - 1; i++) { - if (this.flumpKeyframeDatas[i] === flumpKeyframeData) { - return this.flumpKeyframeDatas[i + 1]; + for (var i = 0; i < this.keyframeData.length - 1; i++) { + if (this.keyframeData[i] === flumpKeyframeData) { + return this.keyframeData[i + 1]; } } return null; diff --git a/src/data/LayerData.js.map b/src/data/LayerData.js.map index 5973ce1..f77e9d7 100644 --- a/src/data/LayerData.js.map +++ b/src/data/LayerData.js.map @@ -1 +1 @@ -{"version":3,"file":"LayerData.js","sourceRoot":"","sources":["LayerData.ts"],"names":[],"mappings":";AACA;IAQC,mBAAY,IAAW;QAJhB,uBAAkB,GAAuB,E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AC,YAAY,CAAC;QAC9B,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EACpC,CAAC;YACA,EAAE,CAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAC1B,CAAC;gBACA,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACrB,CAAC;QACF,CAAC;QAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAChC,CAAC;IAEM,oCAAgB,GAAvB,UAAwB,iBAA8B;QAErD,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EACpD,CAAC;YACA,EAAE,CAAA,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,iBAAiB,CAAC,CAC9C,CAAC;gBACA,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACjC,CAAC;QACF,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IACb,CAAC;IACF,gBAAC;AAAD,CAAC,AApDD,IAoDC;AApDY,iBAAS,YAoDrB,CAAA"} \ No newline at end of file diff --git a/src/data/LayerData.ts b/src/data/LayerData.ts index 5699bea..fa6d0ba 100644 --- a/src/data/LayerData.ts +++ b/src/data/LayerData.ts @@ -1,9 +1,12 @@ -import {ILayer} from "../core/IFlumpLibrary"; -export class LayerData { +import {ILayer} from "../interface/ILibrary"; +import {KeyframeData} from "./KeyframeData"; + +export class LayerData +{ public name:string; public flipbook:boolean; - public flumpKeyframeDatas:Array = []; + public keyframeData:Array = []; public frames:number; @@ -11,15 +14,15 @@ export class LayerData { { this.name = json.name; this.flipbook = 'flipbook' in json ? !!json.flipbook : false; - + var keyframes = json.keyframes; var keyFrameData:KeyframeData = null; - + for(var i = 0; i < keyframes.length; i++) { var keyframe = keyframes[i]; keyFrameData = new KeyframeData(keyframe); - this.flumpKeyframeDatas.push( keyFrameData ); + this.keyframeData.push(keyFrameData); } this.frames = keyFrameData.index + keyFrameData.duration; @@ -27,10 +30,11 @@ export class LayerData { public getKeyframeForFrame(frame:number):KeyframeData { - var datas = this.flumpKeyframeDatas; + var datas = this.keyframeData; for(var i = 1; i < datas.length; i++) { - if (datas[i].index > frame) { + if(datas[i].index > frame) + { return datas[i - 1]; } } @@ -38,12 +42,13 @@ export class LayerData { return datas[datas.length - 1]; } - public getKeyframeAfter( flumpKeyframeData:KeyframeData):KeyframeData + public getKeyframeAfter(flumpKeyframeData:KeyframeData):KeyframeData { - for(var i = 0; i < this.flumpKeyframeDatas.length - 1; i++) { - if (this.flumpKeyframeDatas[i] === flumpKeyframeData) + for(var i = 0; i < this.keyframeData.length - 1; i++) + { + if(this.keyframeData[i] === flumpKeyframeData) { - return this.flumpKeyframeDatas[i + 1]; + return this.keyframeData[i + 1]; } } return null; diff --git a/src/data/MovieData.js b/src/data/MovieData.js index 189c219..bbedcad 100644 --- a/src/data/MovieData.js +++ b/src/data/MovieData.js @@ -1,11 +1,11 @@ "use strict"; var LayerData_1 = require("./LayerData"); -var FlumpMovieData = (function () { - function FlumpMovieData(flumpLibrary, json) { +var MovieData = (function () { + function MovieData(flumpLibrary, json) { this.frames = 0; + var layers = json.layers; this.library = flumpLibrary; this.id = json.id; - var layers = json.layers; this.layerData = new Array(layers.length); for (var i = 0; i < layers.length; i++) { var layer = new LayerData_1.LayerData(layers[i]); @@ -13,7 +13,7 @@ var FlumpMovieData = (function () { this.frames = Math.max(this.frames, layer.frames); } } - return FlumpMovieData; + return MovieData; }()); -exports.FlumpMovieData = FlumpMovieData; +exports.MovieData = MovieData; //# sourceMappingURL=MovieData.js.map \ No newline at end of file diff --git a/src/data/MovieData.js.map b/src/data/MovieData.js.map index c9dc4e4..5a9f46a 100644 --- a/src/data/MovieData.js.map +++ b/src/data/MovieData.js.map @@ -1 +1 @@ -{"version":3,"file":"MovieData.js","sourceRoot":"","sources":["MovieData.ts"],"names":[],"mappings":";AAEA,0BAAwB,aAAa,CAAC,CAAA;AAGtC;IAQC,wBAAY,YAAsB,EAAE,IAAW;QAFxC,WAAM,GAAU,CAAC,CAAC;QAIxB,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC;QAC5B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAElB,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1C,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EACrC,CAAC;YACA,IAAI,KAAK,GAAG,IAAI,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;QAClD,CAAC;IACF,CAAC;IACF,qBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,sBAAc,iBAsB1B,CAAA"} \ No newline at end of file +{"version":3,"file":"MovieData.js","sourceRoot":"","sources":["MovieData.ts"],"names":[],"mappings":";AAAA,0BAAwB,aAAa,CAAC,CAAA;AAItC;IASC,mBAAY,YAAsB,EAAE,IAAW;QAFxC,WAAM,GAAU,CAAC,CAAC;QAIxB,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAEzB,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC;QAC5B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE1C,GAAG,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EACrC,CAAC;YACA,IAAI,KAAK,GAAG,IAAI,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;QAClD,CAAC;IACF,CAAC;IACF,gBAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,iBAAS,YAwBrB,CAAA"} \ No newline at end of file diff --git a/src/data/MovieData.ts b/src/data/MovieData.ts index 98c967d..b025a00 100644 --- a/src/data/MovieData.ts +++ b/src/data/MovieData.ts @@ -1,9 +1,9 @@ - - import {LayerData} from "./LayerData"; import {PixiFlump} from "../PixiFlump"; import {IMovie} from "../interface/ILibrary"; -export class FlumpMovieData { + +export class MovieData +{ public id:string; public library; @@ -13,11 +13,12 @@ export class FlumpMovieData { constructor(flumpLibrary:PixiFlump, json:IMovie) { + var layers = json.layers; + this.library = flumpLibrary; this.id = json.id; - - var layers = json.layers; this.layerData = new Array(layers.length); + for(var i = 0; i < layers.length; i++) { var layer = new LayerData(layers[i]); diff --git a/src/interface/IHashMap.js b/src/interface/IHashMap.js new file mode 100644 index 0000000..71dca08 --- /dev/null +++ b/src/interface/IHashMap.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IHashMap.js.map \ No newline at end of file diff --git a/src/interface/IHashMap.js.map b/src/interface/IHashMap.js.map new file mode 100644 index 0000000..21959b2 --- /dev/null +++ b/src/interface/IHashMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IHashMap.js","sourceRoot":"","sources":["IHashMap.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/src/interface/IHashMap.ts b/src/interface/IHashMap.ts new file mode 100644 index 0000000..534a533 --- /dev/null +++ b/src/interface/IHashMap.ts @@ -0,0 +1,5 @@ +export interface IHashMap +{ + [name:string]:T +} +