diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..1e2b7c0 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,6 @@ +# Browsers that we support + +>0.2% +not dead +not ie <= 11 +not op_mini all diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 2ab4457..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -# /node_modules/* and /bower_components/* ignored by default - -/app/lib/**/* \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index a51cfdc..0000000 --- a/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "airbnb", - "env": { - "browser": true - }, - "globals": { - "createjs": true, - "lib": true, - "blackhole": true - }, - "rules": { - "no-underscore-dangle": ["off"], - "prefer-template": 0, - "no-use-before-define": ["error", "nofunc"], - "no-param-reassign": ["error", { - "props": false - }], - "no-console": ["off"], - "react/jsx-indent": ["off"] - } -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..e0217a1 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,7 @@ +{ + "extends": ["react-app", "prettier"], + "plugins": ["prettier"], + "rules": { + "prettier/prettier": "error" + } +} diff --git a/.jsbeautifyrc b/.jsbeautifyrc deleted file mode 100644 index 7d59738..0000000 --- a/.jsbeautifyrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - "indent_size": 2, - "indent_char": " ", - "eol": "\n", - "indent_level": 0, - "indent_with_tabs": false, - "preserve_newlines": true, - "max_preserve_newlines": 2, - "jslint_happy": false, - "space_after_anon_function": false, - "brace_style": "collapse", - "keep_array_indentation": false, - "keep_function_indentation": false, - "space_before_conditional": true, - "break_chained_methods": true, - "eval_code": false, - "unescape_strings": false, - "wrap_line_length": 80, - "wrap_attributes": "auto", - "wrap_attributes_indent_size": 2, - "e4x": true, - "end_with_newline": true -} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..bbe7c70 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "singleQuote": true, + "trailingComma": "all", + "printWidth": 120, + "proseWrap": "always" +} diff --git a/Snakebot-design/Countdown/countdown.js b/Snakebot-design/Countdown/countdown.js index d6a5b85..8210da3 100644 --- a/Snakebot-design/Countdown/countdown.js +++ b/Snakebot-design/Countdown/countdown.js @@ -1,263 +1,451 @@ -(function (lib, img, cjs, ss, an) { - -var p; // shortcut to reference prototypes -lib.webFontTxtInst = {}; -var loadedTypekitCount = 0; -var loadedGoogleCount = 0; -var gFontsUpdateCacheList = []; -var tFontsUpdateCacheList = []; -lib.ssMetadata = []; - - - -lib.updateListCache = function (cacheList) { - for(var i = 0; i < cacheList.length; i++) { - if(cacheList[i].cacheCanvas) - cacheList[i].updateCache(); - } -}; - -lib.addElementsToCache = function (textInst, cacheList) { - var cur = textInst; - while(cur != exportRoot) { - if(cacheList.indexOf(cur) != -1) - break; - cur = cur.parent; - } - if(cur != exportRoot) { - var cur2 = textInst; - var index = cacheList.indexOf(cur); - while(cur2 != cur) { - cacheList.splice(index, 0, cur2); - cur2 = cur2.parent; - index++; - } - } - else { - cur = textInst; - while(cur != exportRoot) { - cacheList.push(cur); - cur = cur.parent; - } - } -}; - -lib.gfontAvailable = function(family, totalGoogleCount) { - lib.properties.webfonts[family] = true; - var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || []; - for(var f = 0; f < txtInst.length; ++f) - lib.addElementsToCache(txtInst[f], gFontsUpdateCacheList); - - loadedGoogleCount++; - if(loadedGoogleCount == totalGoogleCount) { - lib.updateListCache(gFontsUpdateCacheList); - } -}; - -lib.tfontAvailable = function(family, totalTypekitCount) { - lib.properties.webfonts[family] = true; - var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || []; - for(var f = 0; f < txtInst.length; ++f) - lib.addElementsToCache(txtInst[f], tFontsUpdateCacheList); - - loadedTypekitCount++; - if(loadedTypekitCount == totalTypekitCount) { - lib.updateListCache(tFontsUpdateCacheList); - } -}; -// symbols: -// helper functions: - -function mc_symbol_clone() { - var clone = this._cloneProps(new this.constructor(this.mode, this.startPosition, this.loop)); - clone.gotoAndStop(this.currentFrame); - clone.paused = this.paused; - clone.framerate = this.framerate; - return clone; -} - -function getMCSymbolPrototype(symbol, nominalBounds, frameBounds) { - var prototype = cjs.extend(symbol, cjs.MovieClip); - prototype.clone = mc_symbol_clone; - prototype.nominalBounds = nominalBounds; - prototype.frameBounds = frameBounds; - return prototype; - } - - -(lib.Fight = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#FFFFFF").s().p("AhWCpIAmgfQAEgDAGgPQAGgQAAgGIAAjMQgDgFgPAAQgcAAgJAIQgGAGgFAMQgEAMgDASQgKgegmhTIEzAAQgdAqgfBFIgFgaQgGgQgIgGQgKgGggAAQgFAAgDAHIAACgQAAAnAGAVQAGATAMANQALANARAIg"); - this.shape.setTransform(58,-1.1); - - this.shape_1 = new cjs.Shape(); - this.shape_1.graphics.f("#FFFFFF").s().p("AhED0QgRghgagbQgggjgbgFIAIgHQARAAAKgLQALgJAEgSQACgKAAgyIADgqIAAgiQAAhNgEgXQgCgOgSgNIgVgRICSAAIgbAXQgUAQAAAQIAABQIB+AAQAEgDAAgYIgBgoQgEgYgQgGIgVgIQANgEAPgKIAdgYQAbgbAPgbIAAC6IAABKIAAA+IAEAkQAFAMANAJIACABIAVAQIiaAAIAbgRQAKgGAGgNQAGgMAAgMIADg6IgBgYIiBAAIAADpg"); - this.shape_1.setTransform(23.3,0.5); - - this.shape_2 = new cjs.Shape(); - this.shape_2.graphics.f("#FFFFFF").s().p("AhnB+Qgpg0AAhEQAAhFAkg3QApg/BCAAQAMAAATAGIAnAPQAsAVALABIAVgGIAAAKIiABmIAOg2QAAgOgJgHQgJgGgRAAQgmgBgWAvQgHARgFASQgDASAAARQAAAWAEASQAFATAKAQQAXAkAoAAQAWAAAPgMQAOgNAAgXQAAgcgXAAIgJABIgKABQAWgVAkgcIBAgwIAGABQgbAhAABPQAAAWAFAOQAIAXARAAIgQAKIgRAKIgwAhQgOAHgOADQgOAEgOAAQhBAAgsg4g"); - this.shape_2.setTransform(-9.9,-1.1); - - this.shape_3 = new cjs.Shape(); - this.shape_3.graphics.f("#FFFFFF").s().p("AhJCoIAegYQAQgQAAgTIAAjRQAAgUgMgRQgLgRgXgNICRAAQgIACgPANQgUAQAAAMIAADtQAAASASAPIAbAWg"); - this.shape_3.setTransform(-33.3,-1); - - this.shape_4 = new cjs.Shape(); - this.shape_4.graphics.f("#FFFFFF").s().p("AhdCcQgZgighgYIAZgLQAHgDAEgMQAFgMAAgIIAAjeQAAgQgMgMIgXgSQgNgJgBgFIE/AAIhRB2IABgMIABgMQAAgOgHgIQgGgHgNAAIhZAAIgPAAIAABfIAHAAIAKAAIAPAAQAcAAAKgDQASgIALgeQADgGAFAAIAACfIgGgEQgGgXgQgLQgPgLgYgBIglAAIgDAFIAAByIgBA8IgCA8QgQgqgZghg"); - this.shape_4.setTransform(-58.5,5); - - this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_4},{t:this.shape_3},{t:this.shape_2},{t:this.shape_1},{t:this.shape}]}).wait(1)); - -}).prototype = getMCSymbolPrototype(lib.Fight, new cjs.Rectangle(-76.5,-30.2,153.1,60.4), null); - - -(lib._5 = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#FFFFFF").s().p("AhiCsIgmgVQgLgHgJAAQgFAAgLAHIgHgGIBBhVIAHAEIgCAMQAAAOAVAOQAXAOAZAHQAZAIAaAAQAlAAAYgPQAcgSAAgjQAAgigdgRQgYgOgkAAQgUAAgbAHQgSAEgJAGQgIAGAAAHIADALIgGAFIhfheIAGgGIADAAQANAAAAgQIAAhOQAAgQgRgEIAAgJIEhAAQAPAAAFgRIAIAAIAABhIgIAAQgFgSgPAAIjPAAIAABQQAWgLAZgGQAagFAcAAQBCAAAsAbQAzAgAAA+QAAAqgYAhQgVAcgkAOQgkAOgyAAQhAAAgvgXg"); - this.shape.setTransform(-0.1,-3.1); - - this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); - -}).prototype = getMCSymbolPrototype(lib._5, new cjs.Rectangle(-21.7,-30.2,43.4,60.4), null); - - -(lib._4 = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#FFFFFF").s().p("AAJDLQAFgbAAgNIAAhQIiIAAIAohxIgZAAIBPhvIgVCmIA/AAIAAjMIA9hXIAAEjIAwAAIgeA6IgSAAIAABMIATAAIhiBsg"); - this.shape.setTransform(-0.3,-8.2); - - this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); - -}).prototype = getMCSymbolPrototype(lib._4, new cjs.Rectangle(-21.7,-30.2,43.4,60.4), null); - - -(lib._3 = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#FFFFFF").s().p("Ag5C2QghgHgegOQgZgMgHAAQgHAAgLAKIgIgEIArhjIAIADIgCAGQAAAQASANQARANAjAKQAkAKAiAAQAiAAAXgKQAggPAAgeQAAgagWgNQgVgMgrAAIgcABQgQADgDANIgJAAIAAhYIAJAAQADAOAPAEIAbABQAoAAATgMQAVgMAAgYQAAgYgVgMQgTgLgoAAQgbAAgYAFQgXAHgVAMQgUALAAANQAAAFAEAHIgHAGIg+hMIAHgGIAPAFQAFAAAJgHQAigWAlgLQAmgMApAAQAxAAAiAOQAhAPARAcQAOAWAAAbQAAAYgMASQgMATgXAOQAfAKAPAVQAPAUAAAdQAAA+g4AeQgWANgcAHQgbAGgiAAQgjAAgigIg"); - this.shape.setTransform(-0.6,-2.5); - - this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); - -}).prototype = getMCSymbolPrototype(lib._3, new cjs.Rectangle(-21.7,-30.2,43.4,60.4), null); - - -(lib._2 = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#FFFFFF").s().p("ACmDDQgFgRgPAAIkcAAQgNAAgFACQgFAEgDALIgJAAIAAgRQAAgjAIgVQAHgXAPgUQAQgSAVgQQAWgQAzgXIAsgUQAegOAPgRQAPgRAAgUQAAgYgQgNQgQgMghAAQgcAAgjANQgVAKgKAKQgLALAAAMIAFARIgGAGIhIhNIAHgGIAPAFQAGAAAPgNQA7gzBVAAQAdAAAZAHQAXAGATAOQAqAfAAA3QAAAYgHATQgHAUgQAQQgXAXgwAWIgoASIgdAMIghAPQgRAKgKAOIDfAAQAPAAAFgRIAIAAIAABkg"); - this.shape.setTransform(-0.1,-2); - - this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); - -}).prototype = getMCSymbolPrototype(lib._2, new cjs.Rectangle(-21.7,-30.2,43.4,60.4), null); - - -(lib._1 = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#FFFFFF").s().p("AglC4IAAgJQASgEgBgQIAAjmIgZAFQgPAEgEARIgJAAIAAhiIAJAAQAFAPAJAAIAIgBIAWgFIAAgQQABgPgSgEIAAgJIBvAAIAAAJQgQAEAAAPIAAE1QAAAQAQAEIAAAJg"); - this.shape.setTransform(-0.4,-2.5); - - this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); - -}).prototype = getMCSymbolPrototype(lib._1, new cjs.Rectangle(-21.7,-30.2,43.4,60.4), null); - - -// stage content: -(lib.countdown = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Fight - this.instance = new lib.Fight(); - this.instance.parent = this; - this.instance.setTransform(320.1,280.2,1.382,1.382,0,0,0,0.1,0.2); - this.instance.alpha = 0; - this.instance.shadow = new cjs.Shadow("rgba(0,0,0,1)",1,1,0); - this.instance._off = true; - - this.timeline.addTween(cjs.Tween.get(this.instance).wait(145).to({_off:false},0).to({alpha:1},5).wait(26).to({alpha:0},5).wait(1)); - - // 1 - this.instance_1 = new lib._1(); - this.instance_1.parent = this; - this.instance_1.setTransform(320,280.4,4.607,4.607,0,0,0,0,0.1); - this.instance_1.alpha = 0; - this.instance_1.shadow = new cjs.Shadow("rgba(0,0,0,1)",1,1,0); - this.instance_1._off = true; - - this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(116).to({_off:false},0).to({scaleX:3.8,scaleY:3.8,alpha:1},5,cjs.Ease.get(0.3)).to({regX:0.1,regY:0.2,scaleX:0.85,scaleY:0.85,x:320.1,y:280.1},24).to({regX:0.2,regY:0.5,scaleX:0.23,scaleY:0.23,x:320,y:280,alpha:0},5).to({_off:true},1).wait(31)); - - // 2 - this.instance_2 = new lib._2(); - this.instance_2.parent = this; - this.instance_2.setTransform(320,280.4,4.607,4.607,0,0,0,0,0.1); - this.instance_2.alpha = 0; - this.instance_2.shadow = new cjs.Shadow("rgba(0,0,0,1)",1,1,0); - this.instance_2._off = true; - - this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(87).to({_off:false},0).to({scaleX:3.8,scaleY:3.8,alpha:1},5,cjs.Ease.get(0.3)).to({regX:0.1,regY:0.2,scaleX:0.85,scaleY:0.85,x:320.1,y:280.1},24).to({regX:0.2,regY:0.5,scaleX:0.23,scaleY:0.23,x:320,y:280,alpha:0},5).to({_off:true},1).wait(60)); - - // 3 - this.instance_3 = new lib._3(); - this.instance_3.parent = this; - this.instance_3.setTransform(320,280.4,4.607,4.607,0,0,0,0,0.1); - this.instance_3.alpha = 0; - this.instance_3.shadow = new cjs.Shadow("rgba(0,0,0,1)",1,1,0); - this.instance_3._off = true; - - this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(58).to({_off:false},0).to({scaleX:3.8,scaleY:3.8,alpha:1},5,cjs.Ease.get(0.3)).to({regX:0.1,regY:0.2,scaleX:0.85,scaleY:0.85,x:320.1,y:280.1},24).to({regX:0.2,regY:0.5,scaleX:0.23,scaleY:0.23,x:320,y:280,alpha:0},5).to({_off:true},1).wait(89)); - - // 4 - this.instance_4 = new lib._4(); - this.instance_4.parent = this; - this.instance_4.setTransform(320,280.4,4.607,4.607,0,0,0,0,0.1); - this.instance_4.alpha = 0; - this.instance_4.shadow = new cjs.Shadow("rgba(0,0,0,1)",1,1,0); - this.instance_4._off = true; - - this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(29).to({_off:false},0).to({scaleX:3.8,scaleY:3.8,alpha:1},5,cjs.Ease.get(0.3)).to({regX:0.1,regY:0.2,scaleX:0.85,scaleY:0.85,x:320.1,y:280.1},24).to({regX:0.2,regY:0.5,scaleX:0.23,scaleY:0.23,x:320,y:280,alpha:0},5).to({_off:true},1).wait(118)); - - // 5 - this.instance_5 = new lib._5(); - this.instance_5.parent = this; - this.instance_5.setTransform(320,280.4,4.607,4.607,0,0,0,0,0.1); - this.instance_5.alpha = 0; - this.instance_5.shadow = new cjs.Shadow("rgba(0,0,0,1)",1,1,0); - - this.timeline.addTween(cjs.Tween.get(this.instance_5).to({scaleX:3.8,scaleY:3.8,alpha:1},5,cjs.Ease.get(0.3)).to({regX:0.1,regY:0.2,scaleX:0.85,scaleY:0.85,x:320.1,y:280.1},24).to({regX:0.2,regY:0.5,scaleX:0.23,scaleY:0.23,x:320,y:280,alpha:0},5).to({_off:true},1).wait(147)); - -}).prototype = p = new cjs.MovieClip(); -p.nominalBounds = new cjs.Rectangle(538,418.9,216,295); -// library properties: -lib.properties = { - width: 640, - height: 560, - fps: 24, - color: "#454545", - opacity: 1.00, - webfonts: {}, - manifest: [], - preloads: [] -}; - - - - -})(lib = lib||{}, images = images||{}, createjs = createjs||{}, ss = ss||{}, AdobeAn = AdobeAn||{}); -var lib, images, createjs, ss, AdobeAn; \ No newline at end of file +(function(lib, img, cjs, ss, an) { + var p; // shortcut to reference prototypes + lib.webFontTxtInst = {}; + var loadedTypekitCount = 0; + var loadedGoogleCount = 0; + var gFontsUpdateCacheList = []; + var tFontsUpdateCacheList = []; + lib.ssMetadata = []; + + lib.updateListCache = function(cacheList) { + for (var i = 0; i < cacheList.length; i++) { + if (cacheList[i].cacheCanvas) cacheList[i].updateCache(); + } + }; + + lib.addElementsToCache = function(textInst, cacheList) { + var cur = textInst; + while (cur != exportRoot) { + if (cacheList.indexOf(cur) != -1) break; + cur = cur.parent; + } + if (cur != exportRoot) { + var cur2 = textInst; + var index = cacheList.indexOf(cur); + while (cur2 != cur) { + cacheList.splice(index, 0, cur2); + cur2 = cur2.parent; + index++; + } + } else { + cur = textInst; + while (cur != exportRoot) { + cacheList.push(cur); + cur = cur.parent; + } + } + }; + + lib.gfontAvailable = function(family, totalGoogleCount) { + lib.properties.webfonts[family] = true; + var txtInst = (lib.webFontTxtInst && lib.webFontTxtInst[family]) || []; + for (var f = 0; f < txtInst.length; ++f) lib.addElementsToCache(txtInst[f], gFontsUpdateCacheList); + + loadedGoogleCount++; + if (loadedGoogleCount == totalGoogleCount) { + lib.updateListCache(gFontsUpdateCacheList); + } + }; + + lib.tfontAvailable = function(family, totalTypekitCount) { + lib.properties.webfonts[family] = true; + var txtInst = (lib.webFontTxtInst && lib.webFontTxtInst[family]) || []; + for (var f = 0; f < txtInst.length; ++f) lib.addElementsToCache(txtInst[f], tFontsUpdateCacheList); + + loadedTypekitCount++; + if (loadedTypekitCount == totalTypekitCount) { + lib.updateListCache(tFontsUpdateCacheList); + } + }; + // symbols: + // helper functions: + + function mc_symbol_clone() { + var clone = this._cloneProps(new this.constructor(this.mode, this.startPosition, this.loop)); + clone.gotoAndStop(this.currentFrame); + clone.paused = this.paused; + clone.framerate = this.framerate; + return clone; + } + + function getMCSymbolPrototype(symbol, nominalBounds, frameBounds) { + var prototype = cjs.extend(symbol, cjs.MovieClip); + prototype.clone = mc_symbol_clone; + prototype.nominalBounds = nominalBounds; + prototype.frameBounds = frameBounds; + return prototype; + } + + (lib.Fight = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#FFFFFF') + .s() + .p( + 'AhWCpIAmgfQAEgDAGgPQAGgQAAgGIAAjMQgDgFgPAAQgcAAgJAIQgGAGgFAMQgEAMgDASQgKgegmhTIEzAAQgdAqgfBFIgFgaQgGgQgIgGQgKgGggAAQgFAAgDAHIAACgQAAAnAGAVQAGATAMANQALANARAIg', + ); + this.shape.setTransform(58, -1.1); + + this.shape_1 = new cjs.Shape(); + this.shape_1.graphics + .f('#FFFFFF') + .s() + .p( + 'AhED0QgRghgagbQgggjgbgFIAIgHQARAAAKgLQALgJAEgSQACgKAAgyIADgqIAAgiQAAhNgEgXQgCgOgSgNIgVgRICSAAIgbAXQgUAQAAAQIAABQIB+AAQAEgDAAgYIgBgoQgEgYgQgGIgVgIQANgEAPgKIAdgYQAbgbAPgbIAAC6IAABKIAAA+IAEAkQAFAMANAJIACABIAVAQIiaAAIAbgRQAKgGAGgNQAGgMAAgMIADg6IgBgYIiBAAIAADpg', + ); + this.shape_1.setTransform(23.3, 0.5); + + this.shape_2 = new cjs.Shape(); + this.shape_2.graphics + .f('#FFFFFF') + .s() + .p( + 'AhnB+Qgpg0AAhEQAAhFAkg3QApg/BCAAQAMAAATAGIAnAPQAsAVALABIAVgGIAAAKIiABmIAOg2QAAgOgJgHQgJgGgRAAQgmgBgWAvQgHARgFASQgDASAAARQAAAWAEASQAFATAKAQQAXAkAoAAQAWAAAPgMQAOgNAAgXQAAgcgXAAIgJABIgKABQAWgVAkgcIBAgwIAGABQgbAhAABPQAAAWAFAOQAIAXARAAIgQAKIgRAKIgwAhQgOAHgOADQgOAEgOAAQhBAAgsg4g', + ); + this.shape_2.setTransform(-9.9, -1.1); + + this.shape_3 = new cjs.Shape(); + this.shape_3.graphics + .f('#FFFFFF') + .s() + .p('AhJCoIAegYQAQgQAAgTIAAjRQAAgUgMgRQgLgRgXgNICRAAQgIACgPANQgUAQAAAMIAADtQAAASASAPIAbAWg'); + this.shape_3.setTransform(-33.3, -1); + + this.shape_4 = new cjs.Shape(); + this.shape_4.graphics + .f('#FFFFFF') + .s() + .p( + 'AhdCcQgZgighgYIAZgLQAHgDAEgMQAFgMAAgIIAAjeQAAgQgMgMIgXgSQgNgJgBgFIE/AAIhRB2IABgMIABgMQAAgOgHgIQgGgHgNAAIhZAAIgPAAIAABfIAHAAIAKAAIAPAAQAcAAAKgDQASgIALgeQADgGAFAAIAACfIgGgEQgGgXgQgLQgPgLgYgBIglAAIgDAFIAAByIgBA8IgCA8QgQgqgZghg', + ); + this.shape_4.setTransform(-58.5, 5); + + this.timeline.addTween( + cjs.Tween.get({}) + .to({ + state: [ + { t: this.shape_4 }, + { t: this.shape_3 }, + { t: this.shape_2 }, + { t: this.shape_1 }, + { t: this.shape }, + ], + }) + .wait(1), + ); + }).prototype = getMCSymbolPrototype(lib.Fight, new cjs.Rectangle(-76.5, -30.2, 153.1, 60.4), null); + + (lib._5 = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#FFFFFF') + .s() + .p( + 'AhiCsIgmgVQgLgHgJAAQgFAAgLAHIgHgGIBBhVIAHAEIgCAMQAAAOAVAOQAXAOAZAHQAZAIAaAAQAlAAAYgPQAcgSAAgjQAAgigdgRQgYgOgkAAQgUAAgbAHQgSAEgJAGQgIAGAAAHIADALIgGAFIhfheIAGgGIADAAQANAAAAgQIAAhOQAAgQgRgEIAAgJIEhAAQAPAAAFgRIAIAAIAABhIgIAAQgFgSgPAAIjPAAIAABQQAWgLAZgGQAagFAcAAQBCAAAsAbQAzAgAAA+QAAAqgYAhQgVAcgkAOQgkAOgyAAQhAAAgvgXg', + ); + this.shape.setTransform(-0.1, -3.1); + + this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); + }).prototype = getMCSymbolPrototype(lib._5, new cjs.Rectangle(-21.7, -30.2, 43.4, 60.4), null); + + (lib._4 = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#FFFFFF') + .s() + .p('AAJDLQAFgbAAgNIAAhQIiIAAIAohxIgZAAIBPhvIgVCmIA/AAIAAjMIA9hXIAAEjIAwAAIgeA6IgSAAIAABMIATAAIhiBsg'); + this.shape.setTransform(-0.3, -8.2); + + this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); + }).prototype = getMCSymbolPrototype(lib._4, new cjs.Rectangle(-21.7, -30.2, 43.4, 60.4), null); + + (lib._3 = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#FFFFFF') + .s() + .p( + 'Ag5C2QghgHgegOQgZgMgHAAQgHAAgLAKIgIgEIArhjIAIADIgCAGQAAAQASANQARANAjAKQAkAKAiAAQAiAAAXgKQAggPAAgeQAAgagWgNQgVgMgrAAIgcABQgQADgDANIgJAAIAAhYIAJAAQADAOAPAEIAbABQAoAAATgMQAVgMAAgYQAAgYgVgMQgTgLgoAAQgbAAgYAFQgXAHgVAMQgUALAAANQAAAFAEAHIgHAGIg+hMIAHgGIAPAFQAFAAAJgHQAigWAlgLQAmgMApAAQAxAAAiAOQAhAPARAcQAOAWAAAbQAAAYgMASQgMATgXAOQAfAKAPAVQAPAUAAAdQAAA+g4AeQgWANgcAHQgbAGgiAAQgjAAgigIg', + ); + this.shape.setTransform(-0.6, -2.5); + + this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); + }).prototype = getMCSymbolPrototype(lib._3, new cjs.Rectangle(-21.7, -30.2, 43.4, 60.4), null); + + (lib._2 = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#FFFFFF') + .s() + .p( + 'ACmDDQgFgRgPAAIkcAAQgNAAgFACQgFAEgDALIgJAAIAAgRQAAgjAIgVQAHgXAPgUQAQgSAVgQQAWgQAzgXIAsgUQAegOAPgRQAPgRAAgUQAAgYgQgNQgQgMghAAQgcAAgjANQgVAKgKAKQgLALAAAMIAFARIgGAGIhIhNIAHgGIAPAFQAGAAAPgNQA7gzBVAAQAdAAAZAHQAXAGATAOQAqAfAAA3QAAAYgHATQgHAUgQAQQgXAXgwAWIgoASIgdAMIghAPQgRAKgKAOIDfAAQAPAAAFgRIAIAAIAABkg', + ); + this.shape.setTransform(-0.1, -2); + + this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); + }).prototype = getMCSymbolPrototype(lib._2, new cjs.Rectangle(-21.7, -30.2, 43.4, 60.4), null); + + (lib._1 = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#FFFFFF') + .s() + .p( + 'AglC4IAAgJQASgEgBgQIAAjmIgZAFQgPAEgEARIgJAAIAAhiIAJAAQAFAPAJAAIAIgBIAWgFIAAgQQABgPgSgEIAAgJIBvAAIAAAJQgQAEAAAPIAAE1QAAAQAQAEIAAAJg', + ); + this.shape.setTransform(-0.4, -2.5); + + this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); + }).prototype = getMCSymbolPrototype(lib._1, new cjs.Rectangle(-21.7, -30.2, 43.4, 60.4), null); + + // stage content: + (lib.countdown = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Fight + this.instance = new lib.Fight(); + this.instance.parent = this; + this.instance.setTransform(320.1, 280.2, 1.382, 1.382, 0, 0, 0, 0.1, 0.2); + this.instance.alpha = 0; + this.instance.shadow = new cjs.Shadow('rgba(0,0,0,1)', 1, 1, 0); + this.instance._off = true; + + this.timeline.addTween( + cjs.Tween.get(this.instance) + .wait(145) + .to({ _off: false }, 0) + .to({ alpha: 1 }, 5) + .wait(26) + .to({ alpha: 0 }, 5) + .wait(1), + ); + + // 1 + this.instance_1 = new lib._1(); + this.instance_1.parent = this; + this.instance_1.setTransform(320, 280.4, 4.607, 4.607, 0, 0, 0, 0, 0.1); + this.instance_1.alpha = 0; + this.instance_1.shadow = new cjs.Shadow('rgba(0,0,0,1)', 1, 1, 0); + this.instance_1._off = true; + + this.timeline.addTween( + cjs.Tween.get(this.instance_1) + .wait(116) + .to({ _off: false }, 0) + .to({ scaleX: 3.8, scaleY: 3.8, alpha: 1 }, 5, cjs.Ease.get(0.3)) + .to( + { + regX: 0.1, + regY: 0.2, + scaleX: 0.85, + scaleY: 0.85, + x: 320.1, + y: 280.1, + }, + 24, + ) + .to( + { + regX: 0.2, + regY: 0.5, + scaleX: 0.23, + scaleY: 0.23, + x: 320, + y: 280, + alpha: 0, + }, + 5, + ) + .to({ _off: true }, 1) + .wait(31), + ); + + // 2 + this.instance_2 = new lib._2(); + this.instance_2.parent = this; + this.instance_2.setTransform(320, 280.4, 4.607, 4.607, 0, 0, 0, 0, 0.1); + this.instance_2.alpha = 0; + this.instance_2.shadow = new cjs.Shadow('rgba(0,0,0,1)', 1, 1, 0); + this.instance_2._off = true; + + this.timeline.addTween( + cjs.Tween.get(this.instance_2) + .wait(87) + .to({ _off: false }, 0) + .to({ scaleX: 3.8, scaleY: 3.8, alpha: 1 }, 5, cjs.Ease.get(0.3)) + .to( + { + regX: 0.1, + regY: 0.2, + scaleX: 0.85, + scaleY: 0.85, + x: 320.1, + y: 280.1, + }, + 24, + ) + .to( + { + regX: 0.2, + regY: 0.5, + scaleX: 0.23, + scaleY: 0.23, + x: 320, + y: 280, + alpha: 0, + }, + 5, + ) + .to({ _off: true }, 1) + .wait(60), + ); + + // 3 + this.instance_3 = new lib._3(); + this.instance_3.parent = this; + this.instance_3.setTransform(320, 280.4, 4.607, 4.607, 0, 0, 0, 0, 0.1); + this.instance_3.alpha = 0; + this.instance_3.shadow = new cjs.Shadow('rgba(0,0,0,1)', 1, 1, 0); + this.instance_3._off = true; + + this.timeline.addTween( + cjs.Tween.get(this.instance_3) + .wait(58) + .to({ _off: false }, 0) + .to({ scaleX: 3.8, scaleY: 3.8, alpha: 1 }, 5, cjs.Ease.get(0.3)) + .to( + { + regX: 0.1, + regY: 0.2, + scaleX: 0.85, + scaleY: 0.85, + x: 320.1, + y: 280.1, + }, + 24, + ) + .to( + { + regX: 0.2, + regY: 0.5, + scaleX: 0.23, + scaleY: 0.23, + x: 320, + y: 280, + alpha: 0, + }, + 5, + ) + .to({ _off: true }, 1) + .wait(89), + ); + + // 4 + this.instance_4 = new lib._4(); + this.instance_4.parent = this; + this.instance_4.setTransform(320, 280.4, 4.607, 4.607, 0, 0, 0, 0, 0.1); + this.instance_4.alpha = 0; + this.instance_4.shadow = new cjs.Shadow('rgba(0,0,0,1)', 1, 1, 0); + this.instance_4._off = true; + + this.timeline.addTween( + cjs.Tween.get(this.instance_4) + .wait(29) + .to({ _off: false }, 0) + .to({ scaleX: 3.8, scaleY: 3.8, alpha: 1 }, 5, cjs.Ease.get(0.3)) + .to( + { + regX: 0.1, + regY: 0.2, + scaleX: 0.85, + scaleY: 0.85, + x: 320.1, + y: 280.1, + }, + 24, + ) + .to( + { + regX: 0.2, + regY: 0.5, + scaleX: 0.23, + scaleY: 0.23, + x: 320, + y: 280, + alpha: 0, + }, + 5, + ) + .to({ _off: true }, 1) + .wait(118), + ); + + // 5 + this.instance_5 = new lib._5(); + this.instance_5.parent = this; + this.instance_5.setTransform(320, 280.4, 4.607, 4.607, 0, 0, 0, 0, 0.1); + this.instance_5.alpha = 0; + this.instance_5.shadow = new cjs.Shadow('rgba(0,0,0,1)', 1, 1, 0); + + this.timeline.addTween( + cjs.Tween.get(this.instance_5) + .to({ scaleX: 3.8, scaleY: 3.8, alpha: 1 }, 5, cjs.Ease.get(0.3)) + .to( + { + regX: 0.1, + regY: 0.2, + scaleX: 0.85, + scaleY: 0.85, + x: 320.1, + y: 280.1, + }, + 24, + ) + .to( + { + regX: 0.2, + regY: 0.5, + scaleX: 0.23, + scaleY: 0.23, + x: 320, + y: 280, + alpha: 0, + }, + 5, + ) + .to({ _off: true }, 1) + .wait(147), + ); + }).prototype = p = new cjs.MovieClip(); + p.nominalBounds = new cjs.Rectangle(538, 418.9, 216, 295); + // library properties: + lib.properties = { + width: 640, + height: 560, + fps: 24, + color: '#454545', + opacity: 1.0, + webfonts: {}, + manifest: [], + preloads: [], + }; +})((lib = lib || {}), (images = images || {}), (createjs = createjs || {}), (ss = ss || {}), (AdobeAn = AdobeAn || {})); +var lib, images, createjs, ss, AdobeAn; diff --git a/Snakebot-design/Explosion/explosion.js b/Snakebot-design/Explosion/explosion.js index 1181ff0..e4164d9 100644 --- a/Snakebot-design/Explosion/explosion.js +++ b/Snakebot-design/Explosion/explosion.js @@ -1,148 +1,206 @@ -(function (lib, img, cjs, ss) { - -var p; // shortcut to reference prototypes -lib.webFontTxtInst = {}; -var loadedTypekitCount = 0; -var loadedGoogleCount = 0; -var gFontsUpdateCacheList = []; -var tFontsUpdateCacheList = []; - -// library properties: -lib.properties = { - width: 40, - height: 40, - fps: 24, - color: "#FFFFFF", - opacity: 1.00, - webfonts: {}, - manifest: [] -}; - - - -lib.ssMetadata = []; - - - -lib.updateListCache = function (cacheList) { - for(var i = 0; i < cacheList.length; i++) { - if(cacheList[i].cacheCanvas) - cacheList[i].updateCache(); - } -}; - -lib.addElementsToCache = function (textInst, cacheList) { - var cur = textInst; - while(cur != exportRoot) { - if(cacheList.indexOf(cur) != -1) - break; - cur = cur.parent; - } - if(cur != exportRoot) { //we have found an element in the list - var cur2 = textInst; - var index = cacheList.indexOf(cur); - while(cur2 != cur) { //insert all it's children just before it - cacheList.splice(index, 0, cur2); - cur2 = cur2.parent; - index++; - } - } - else { //append element and it's parents in the array - cur = textInst; - while(cur != exportRoot) { - cacheList.push(cur); - cur = cur.parent; - } - } -}; - -lib.gfontAvailable = function(family, totalGoogleCount) { - lib.properties.webfonts[family] = true; - var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || []; - for(var f = 0; f < txtInst.length; ++f) - lib.addElementsToCache(txtInst[f], gFontsUpdateCacheList); - - loadedGoogleCount++; - if(loadedGoogleCount == totalGoogleCount) { - lib.updateListCache(gFontsUpdateCacheList); - } -}; - -lib.tfontAvailable = function(family, totalTypekitCount) { - lib.properties.webfonts[family] = true; - var txtInst = lib.webFontTxtInst && lib.webFontTxtInst[family] || []; - for(var f = 0; f < txtInst.length; ++f) - lib.addElementsToCache(txtInst[f], tFontsUpdateCacheList); - - loadedTypekitCount++; - if(loadedTypekitCount == totalTypekitCount) { - lib.updateListCache(tFontsUpdateCacheList); - } -}; -// symbols: - - - -(lib.Exploasionlayeryellow = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#F1BC14").s().p("AC1KPQhdjsgGEHQgShUgUgRQgrgjgRFLQgBiBgMhhQgYjDg1CcQAEhHgUgGQgogLh3FIQAtibAMhrQAXjXilDtQA5hjgfgiQg+hDm8FFIB2hiQCHhzBPhSQBuhzgQghQgUgqjYBaIBKgkQBOgoAXgYQBIhLoAB9IBsgpQB7gwBQgnQEAh9kaANIAqgKQAvgNAagSQBWg0iahGQBEAKAUgRQAVgRgggiQhLhSkBhcIEIBSQDtBDiFhSQBNAmgJgoQgQhRmmmIIBTBAQBiBJBOAvQD4CWg5ipIAeAdQAjAbAPgJQAygbiWl3IArBRQA0BfAqBAQCIDPgDisIAOAjQARAlAOAKQAtAdAAkAIAmDeQAoC3APjIIAJAtQANAwAPAKQAwAiA8lbIgHBGQgGBRAFA2QASCtB9ijIgNAqQgKArAQAFQA2AUEvloQgXAggeAuQg8BbgkBFQh1DeCmhVQgSAQgTASQglAjgBAPQgHAtFbjCQiDBVhSBKQikCTD3g4QgXAJgZAMQg0AYgLARQgiAxE0gdQiTARhVAZQjDA8GhA6QihgShNAKQinAUHYCaQigguhtgOQjbgbD9CiQhBgigxgQQhjgjBOBVQgQgHgQgEQghgIADAPQAJAuFhD9Qihhnh4g+Qjwh/DODFQgVgNgZgKQgwgUgOANQgsAtFCFtQhxh8hrhTQjSioAoDIQgyhIgfAGQg9AOBhGNQgtiqguh1g"); - this.shape.setTransform(92.3,94.3); - - this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); - -}).prototype = p = new cjs.MovieClip(); -p.nominalBounds = new cjs.Rectangle(0,0,184.5,188.5); - - -(lib.Exploasionlayerorange = function(mode,startPosition,loop) { - this.initialize(mode,startPosition,loop,{}); - - // Layer 1 - this.shape = new cjs.Shape(); - this.shape.graphics.f("#E96D2D").s().p("ACWKPQhdjsgGEHQgShUgVgRQgogjgTFLQgCiBgMhhQgYjDg0CcQADhHgTgGQgogLh4FIQAuibALhrQAYjXilDtQA5hjgfgiQg/hDm8FFIB3hiQCGhzBPhSQBuhzgPghQgUgqjZBaIBLgkQBOgoAXgYQBIhLoBB9IBsgpQB8gwBQgnQD/h9kZANIApgKQAwgNAagSQBVg0iZhGQBGAKAagLQAbgLgagdQg8hFkkh6IBnAjQB3AoBRAVQD/BFjMiCQB+BMAWgOQAwgcopndIBsBYQB/BkBbA8QEkDCiokVIAfAdQAiAbAPgJQAygbiWl3IAsBRQAzBfAqBAQCIDPgDisIAPAjQAQAlAOAKQAtAdAAkAIAmDeQAqC3AOjIIAJAtQAMAwAQAKQAwAiA8lbIgIBGQgFBRAFA2QASCtB9ijIgOAqQgKArAQAFQA2AUEwloQgYAggdAuQg9BbgkBFQh0DeCmhVIgtAkQgsAmAFAKQAOAkHnj3QipBlh4BZQjwCzD3g5QgXAJgaAMQgzAYgMARQgiAxE1gdQiTARhVAZQjDA8GhA6QihgShOAKQinAUHZCaQigguhugOQjbgbD+CiQhCgigxgQQhjgjBPBVQgRgHgQgEQgggIACAPQAKAuFgD9Qihhnh4g+Qjwh/DODFQgVgNgZgKQgwgUgOANQgsAtFCFtQhxh8hqhTQjTioApDIQgyhIgfAGQg9AOBhGNQguiqgth1g"); - this.shape.setTransform(95.4,94.3); - - this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); - -}).prototype = p = new cjs.MovieClip(); -p.nominalBounds = new cjs.Rectangle(0,0,190.8,188.5); - - -// stage content: -(lib.explosion = function(mode,startPosition,loop) { -if (loop == null) { loop = false; } this.initialize(mode,startPosition,loop,{}); - - // Orange - this.instance = new lib.Exploasionlayerorange(); - this.instance.parent = this; - this.instance.setTransform(15.2,15.3,0.05,0.05); - this.instance.alpha = 0; - this.instance._off = true; - - this.timeline.addTween(cjs.Tween.get(this.instance).wait(11).to({_off:false},0).to({regX:0.7,regY:0.7,scaleX:0.08,scaleY:0.08,x:13,y:13,alpha:1},2).to({regX:0,regY:0,scaleX:0.14,scaleY:0.14,x:7.1,y:7.2},5).to({regX:0.3,scaleX:0.16,scaleY:0.16,x:5,y:5.2},2).to({regX:0,scaleX:0.21,scaleY:0.21,x:-0.2,y:0,alpha:0},5,cjs.Ease.get(0.3)).wait(1)); - - // Yellow - this.instance_1 = new lib.Exploasionlayeryellow(); - this.instance_1.parent = this; - this.instance_1.setTransform(15.4,15.3,0.05,0.05); - this.instance_1.alpha = 0; - this.instance_1._off = true; - - this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(4).to({_off:false},0).to({regX:0.7,regY:0.7,scaleX:0.08,scaleY:0.08,x:13.2,y:13,alpha:1},2).to({regX:0,regY:0,scaleX:0.14,scaleY:0.14,x:7.5,y:7.2},5).to({regX:0.3,scaleX:0.16,scaleY:0.16,x:5.5,y:5.2},2).to({regX:0,scaleX:0.21,scaleY:0.21,x:0.4,y:0,alpha:0},5,cjs.Ease.get(0.1)).to({_off:true},1).wait(7)); - - // Orange copy - this.instance_2 = new lib.Exploasionlayerorange(); - this.instance_2.parent = this; - this.instance_2.setTransform(15.2,15.3,0.05,0.05); - this.instance_2.alpha = 0; - - this.timeline.addTween(cjs.Tween.get(this.instance_2).to({regX:0.7,regY:0.7,scaleX:0.08,scaleY:0.08,x:13,y:13,alpha:1},2).to({regX:0,regY:0,scaleX:0.14,scaleY:0.14,x:7.1,y:7.2},3).to({regX:0.3,scaleX:0.16,scaleY:0.16,x:5,y:5.2},2).to({regX:0,scaleX:0.21,scaleY:0.21,x:-0.2,y:0,alpha:0},3,cjs.Ease.get(0.1)).to({_off:true},1).wait(15)); - -}).prototype = p = new cjs.MovieClip(); -p.nominalBounds = new cjs.Rectangle(35.2,35.3,9.6,9.5); - -})(lib = lib||{}, images = images||{}, createjs = createjs||{}, ss = ss||{}); -var lib, images, createjs, ss; \ No newline at end of file +(function(lib, img, cjs, ss) { + var p; // shortcut to reference prototypes + lib.webFontTxtInst = {}; + var loadedTypekitCount = 0; + var loadedGoogleCount = 0; + var gFontsUpdateCacheList = []; + var tFontsUpdateCacheList = []; + + // library properties: + lib.properties = { + width: 40, + height: 40, + fps: 24, + color: '#FFFFFF', + opacity: 1.0, + webfonts: {}, + manifest: [], + }; + + lib.ssMetadata = []; + + lib.updateListCache = function(cacheList) { + for (var i = 0; i < cacheList.length; i++) { + if (cacheList[i].cacheCanvas) cacheList[i].updateCache(); + } + }; + + lib.addElementsToCache = function(textInst, cacheList) { + var cur = textInst; + while (cur != exportRoot) { + if (cacheList.indexOf(cur) != -1) break; + cur = cur.parent; + } + if (cur != exportRoot) { + //we have found an element in the list + var cur2 = textInst; + var index = cacheList.indexOf(cur); + while (cur2 != cur) { + //insert all it's children just before it + cacheList.splice(index, 0, cur2); + cur2 = cur2.parent; + index++; + } + } else { + //append element and it's parents in the array + cur = textInst; + while (cur != exportRoot) { + cacheList.push(cur); + cur = cur.parent; + } + } + }; + + lib.gfontAvailable = function(family, totalGoogleCount) { + lib.properties.webfonts[family] = true; + var txtInst = (lib.webFontTxtInst && lib.webFontTxtInst[family]) || []; + for (var f = 0; f < txtInst.length; ++f) lib.addElementsToCache(txtInst[f], gFontsUpdateCacheList); + + loadedGoogleCount++; + if (loadedGoogleCount == totalGoogleCount) { + lib.updateListCache(gFontsUpdateCacheList); + } + }; + + lib.tfontAvailable = function(family, totalTypekitCount) { + lib.properties.webfonts[family] = true; + var txtInst = (lib.webFontTxtInst && lib.webFontTxtInst[family]) || []; + for (var f = 0; f < txtInst.length; ++f) lib.addElementsToCache(txtInst[f], tFontsUpdateCacheList); + + loadedTypekitCount++; + if (loadedTypekitCount == totalTypekitCount) { + lib.updateListCache(tFontsUpdateCacheList); + } + }; + // symbols: + + (lib.Exploasionlayeryellow = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#F1BC14') + .s() + .p( + 'AC1KPQhdjsgGEHQgShUgUgRQgrgjgRFLQgBiBgMhhQgYjDg1CcQAEhHgUgGQgogLh3FIQAtibAMhrQAXjXilDtQA5hjgfgiQg+hDm8FFIB2hiQCHhzBPhSQBuhzgQghQgUgqjYBaIBKgkQBOgoAXgYQBIhLoAB9IBsgpQB7gwBQgnQEAh9kaANIAqgKQAvgNAagSQBWg0iahGQBEAKAUgRQAVgRgggiQhLhSkBhcIEIBSQDtBDiFhSQBNAmgJgoQgQhRmmmIIBTBAQBiBJBOAvQD4CWg5ipIAeAdQAjAbAPgJQAygbiWl3IArBRQA0BfAqBAQCIDPgDisIAOAjQARAlAOAKQAtAdAAkAIAmDeQAoC3APjIIAJAtQANAwAPAKQAwAiA8lbIgHBGQgGBRAFA2QASCtB9ijIgNAqQgKArAQAFQA2AUEvloQgXAggeAuQg8BbgkBFQh1DeCmhVQgSAQgTASQglAjgBAPQgHAtFbjCQiDBVhSBKQikCTD3g4QgXAJgZAMQg0AYgLARQgiAxE0gdQiTARhVAZQjDA8GhA6QihgShNAKQinAUHYCaQigguhtgOQjbgbD9CiQhBgigxgQQhjgjBOBVQgQgHgQgEQghgIADAPQAJAuFhD9Qihhnh4g+Qjwh/DODFQgVgNgZgKQgwgUgOANQgsAtFCFtQhxh8hrhTQjSioAoDIQgyhIgfAGQg9AOBhGNQgtiqguh1g', + ); + this.shape.setTransform(92.3, 94.3); + + this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); + }).prototype = p = new cjs.MovieClip(); + p.nominalBounds = new cjs.Rectangle(0, 0, 184.5, 188.5); + + (lib.Exploasionlayerorange = function(mode, startPosition, loop) { + this.initialize(mode, startPosition, loop, {}); + + // Layer 1 + this.shape = new cjs.Shape(); + this.shape.graphics + .f('#E96D2D') + .s() + .p( + 'ACWKPQhdjsgGEHQgShUgVgRQgogjgTFLQgCiBgMhhQgYjDg0CcQADhHgTgGQgogLh4FIQAuibALhrQAYjXilDtQA5hjgfgiQg/hDm8FFIB3hiQCGhzBPhSQBuhzgPghQgUgqjZBaIBLgkQBOgoAXgYQBIhLoBB9IBsgpQB8gwBQgnQD/h9kZANIApgKQAwgNAagSQBVg0iZhGQBGAKAagLQAbgLgagdQg8hFkkh6IBnAjQB3AoBRAVQD/BFjMiCQB+BMAWgOQAwgcopndIBsBYQB/BkBbA8QEkDCiokVIAfAdQAiAbAPgJQAygbiWl3IAsBRQAzBfAqBAQCIDPgDisIAPAjQAQAlAOAKQAtAdAAkAIAmDeQAqC3AOjIIAJAtQAMAwAQAKQAwAiA8lbIgIBGQgFBRAFA2QASCtB9ijIgOAqQgKArAQAFQA2AUEwloQgYAggdAuQg9BbgkBFQh0DeCmhVIgtAkQgsAmAFAKQAOAkHnj3QipBlh4BZQjwCzD3g5QgXAJgaAMQgzAYgMARQgiAxE1gdQiTARhVAZQjDA8GhA6QihgShOAKQinAUHZCaQigguhugOQjbgbD+CiQhCgigxgQQhjgjBPBVQgRgHgQgEQgggIACAPQAKAuFgD9Qihhnh4g+Qjwh/DODFQgVgNgZgKQgwgUgOANQgsAtFCFtQhxh8hqhTQjTioApDIQgyhIgfAGQg9AOBhGNQguiqgth1g', + ); + this.shape.setTransform(95.4, 94.3); + + this.timeline.addTween(cjs.Tween.get(this.shape).wait(1)); + }).prototype = p = new cjs.MovieClip(); + p.nominalBounds = new cjs.Rectangle(0, 0, 190.8, 188.5); + + // stage content: + (lib.explosion = function(mode, startPosition, loop) { + if (loop == null) { + loop = false; + } + this.initialize(mode, startPosition, loop, {}); + + // Orange + this.instance = new lib.Exploasionlayerorange(); + this.instance.parent = this; + this.instance.setTransform(15.2, 15.3, 0.05, 0.05); + this.instance.alpha = 0; + this.instance._off = true; + + this.timeline.addTween( + cjs.Tween.get(this.instance) + .wait(11) + .to({ _off: false }, 0) + .to( + { + regX: 0.7, + regY: 0.7, + scaleX: 0.08, + scaleY: 0.08, + x: 13, + y: 13, + alpha: 1, + }, + 2, + ) + .to({ regX: 0, regY: 0, scaleX: 0.14, scaleY: 0.14, x: 7.1, y: 7.2 }, 5) + .to({ regX: 0.3, scaleX: 0.16, scaleY: 0.16, x: 5, y: 5.2 }, 2) + .to({ regX: 0, scaleX: 0.21, scaleY: 0.21, x: -0.2, y: 0, alpha: 0 }, 5, cjs.Ease.get(0.3)) + .wait(1), + ); + + // Yellow + this.instance_1 = new lib.Exploasionlayeryellow(); + this.instance_1.parent = this; + this.instance_1.setTransform(15.4, 15.3, 0.05, 0.05); + this.instance_1.alpha = 0; + this.instance_1._off = true; + + this.timeline.addTween( + cjs.Tween.get(this.instance_1) + .wait(4) + .to({ _off: false }, 0) + .to( + { + regX: 0.7, + regY: 0.7, + scaleX: 0.08, + scaleY: 0.08, + x: 13.2, + y: 13, + alpha: 1, + }, + 2, + ) + .to({ regX: 0, regY: 0, scaleX: 0.14, scaleY: 0.14, x: 7.5, y: 7.2 }, 5) + .to({ regX: 0.3, scaleX: 0.16, scaleY: 0.16, x: 5.5, y: 5.2 }, 2) + .to({ regX: 0, scaleX: 0.21, scaleY: 0.21, x: 0.4, y: 0, alpha: 0 }, 5, cjs.Ease.get(0.1)) + .to({ _off: true }, 1) + .wait(7), + ); + + // Orange copy + this.instance_2 = new lib.Exploasionlayerorange(); + this.instance_2.parent = this; + this.instance_2.setTransform(15.2, 15.3, 0.05, 0.05); + this.instance_2.alpha = 0; + + this.timeline.addTween( + cjs.Tween.get(this.instance_2) + .to( + { + regX: 0.7, + regY: 0.7, + scaleX: 0.08, + scaleY: 0.08, + x: 13, + y: 13, + alpha: 1, + }, + 2, + ) + .to({ regX: 0, regY: 0, scaleX: 0.14, scaleY: 0.14, x: 7.1, y: 7.2 }, 3) + .to({ regX: 0.3, scaleX: 0.16, scaleY: 0.16, x: 5, y: 5.2 }, 2) + .to({ regX: 0, scaleX: 0.21, scaleY: 0.21, x: -0.2, y: 0, alpha: 0 }, 3, cjs.Ease.get(0.1)) + .to({ _off: true }, 1) + .wait(15), + ); + }).prototype = p = new cjs.MovieClip(); + p.nominalBounds = new cjs.Rectangle(35.2, 35.3, 9.6, 9.5); +})((lib = lib || {}), (images = images || {}), (createjs = createjs || {}), (ss = ss || {})); +var lib, images, createjs, ss; diff --git a/app/arena/action/arena-actions.js b/app/arena/action/arena-actions.js deleted file mode 100644 index 19bcc1b..0000000 --- a/app/arena/action/arena-actions.js +++ /dev/null @@ -1,23 +0,0 @@ -import Constants from '../../constants/Constants'; -import { dispatch } from '../../dispatchers/AppDispatcher'; - -export default { - // Request - setActiveArena(arenaName) { - dispatch({ - actionType: Constants.SET_ACTIVE_ARENA, arenaName, - }); - }, - startGame(arenaName) { - dispatch({ - actionType: Constants.START_ARENA_GAME, arenaName, - }); - }, - - // Response - updateArena(arenaState) { - dispatch({ - actionType: Constants.UPDATE_ARENA, arenaState, - }); - }, -}; diff --git a/app/arena/components/watch/StoreWatch.jsx b/app/arena/components/watch/StoreWatch.jsx deleted file mode 100644 index bd13430..0000000 --- a/app/arena/components/watch/StoreWatch.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import ArenaStore from '../../../baseStore/BaseStore'; - -export default (InnerComponent, stateCallback) => class extends React.Component { - constructor(props) { - super(props); - this.state = stateCallback(); - this._onChange = this._onChange.bind(this); - } - - componentWillMount() { - ArenaStore.addChangeListener(this._onChange); - } - - componentWillUnmount() { - ArenaStore.removeChangeListener(this._onChange); - } - - _onChange() { - this.setState(stateCallback()); - } - - render() { - return ; - } -}; diff --git a/app/common/templates/PageTemplate.jsx b/app/common/templates/PageTemplate.jsx deleted file mode 100644 index 4597a1a..0000000 --- a/app/common/templates/PageTemplate.jsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import Header from './header/PageHeader'; -import PageFooter from './footer/PageFooter'; -import '../../design/styles/stylesheet.scss'; - -const propTypes = { - children: React.PropTypes.object.isRequired, -}; - -const PageTemplate = props => ( -
-
- { props.children } - -
-); - -PageTemplate.propTypes = propTypes; -export default PageTemplate; diff --git a/app/common/templates/header/PageHeader.jsx b/app/common/templates/header/PageHeader.jsx deleted file mode 100644 index 1074774..0000000 --- a/app/common/templates/header/PageHeader.jsx +++ /dev/null @@ -1,50 +0,0 @@ -import React from 'react'; -import { - Link, -} from 'react-router'; -import AuthService from '../../../security/services/AuthService'; -import Store from '../../../baseStore/BaseStore'; -import snakelogo from '../../../design/images/logos/snakelogo.png'; - -function isLoggedIn() { - return Store.isLoggedIn(); -} - -function tryLogout() { - if (isLoggedIn()) { - AuthService.logout(); - } -} - -const PageHeader = () => { - const loggedIn = isLoggedIn(); - - return ( -
- - Snakebot-logo - - -
- ); -}; - -export default PageHeader; diff --git a/app/game/action/game-actions.js b/app/game/action/game-actions.js deleted file mode 100644 index 18ee617..0000000 --- a/app/game/action/game-actions.js +++ /dev/null @@ -1,82 +0,0 @@ -import Constants from '../../constants/Constants'; -import { dispatch } from '../../dispatchers/AppDispatcher'; - -export default { - addGames(games) { - dispatch({ - actionType: Constants.ADD_GAMES, games, - }); - }, - - startGame() { - dispatch({ - actionType: Constants.START_GAME, - }); - }, - - startPrefetchingGame(id) { - dispatch({ - actionType: Constants.PREFETCH_GAME, id, - }); - }, - - pauseGame(id) { - dispatch({ - actionType: Constants.PAUSE_GAME, id, - }); - }, - - resumeGame(id) { - dispatch({ - actionType: Constants.RESUME_GAME, id, - }); - }, - - restartGame(id) { - dispatch({ - actionType: Constants.RESTART_GAME, id, - }); - }, - - activeGame(gameId) { - dispatch({ - actionType: Constants.SET_ACTIVE_GAME, gameId, - }); - }, - - increaseUpdateFrequency() { - dispatch({ - actionType: Constants.INCREASE_UPDATE_FREQUENCY, - }); - }, - - decreaseUpdateFrequency() { - dispatch({ - actionType: Constants.DECREASE_UPDATE_FREQUENCY, - }); - }, - - mapUpdateEvent(event) { - dispatch({ - actionType: Constants.MAP_UPDATE_EVENT, event, - }); - }, - - setCurrentFrame(frame) { - dispatch({ - actionType: Constants.SET_CURRENT_FRAME, frame, - }); - }, - - searchForOldGames(name) { - dispatch({ - actionType: Constants.SEARCH_FOR_OLD_GAMES_FOR_USER, name, - }); - }, - - addDeadSnake(event) { - dispatch({ - actionType: Constants.ADD_DEAD_SNAKE_EVENT, event, - }); - }, -}; diff --git a/app/game/components/watch/StoreWatch.jsx b/app/game/components/watch/StoreWatch.jsx deleted file mode 100644 index c02914e..0000000 --- a/app/game/components/watch/StoreWatch.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import GameStore from '../../../baseStore/BaseStore'; - -export default (InnerComponent, stateCallback) => class extends React.Component { - constructor(props) { - super(props); - this.state = stateCallback(); - this._onChange = this._onChange.bind(this); - } - - componentWillMount() { - GameStore.addChangeListener(this._onChange); - } - - componentWillUnmount() { - GameStore.removeChangeListener(this._onChange); - } - - _onChange() { - this.setState(stateCallback(this.props)); - } - - render() { - return ; - } -}; diff --git a/app/pages/GettingStartedPage.jsx b/app/pages/GettingStartedPage.jsx deleted file mode 100644 index 2e5f2eb..0000000 --- a/app/pages/GettingStartedPage.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import '../design/styles/stylesheet.scss'; - -function GettingStartedPage() { - return ( -
-
-

Getting started

-
-

- Your mission is to write the best Snake Bot and survive within the - game world. We have prepared several language bindings for you to make it - really easy to get started. All the boring stuff concerning server-client - communication, message parsing and event handling is already implemented. -

-

General principles

-

- The game progresses through Game Ticks. For each Game Tick participating - Snake Bots have to choose an action (and they have to do it fast, - response is expected within 250ms). Actions are defined by a direction to - move the Snake head in. A Snake head may move UP, DOWN, RIGHT or LEFT. -

-

- On every Game Tick each Snake Bot receives the current Map. The map contains - the positions of all the objects in the map. -

-

Language bindings

-

Below are listed the currently implemented (and up to date) language - bindings. Each project has a Readme file that explains how to get - going. -

- -
-
-
- ); -} -export default GettingStartedPage; diff --git a/app/pages/HomePage.jsx b/app/pages/HomePage.jsx deleted file mode 100644 index d3a113e..0000000 --- a/app/pages/HomePage.jsx +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; -import { - Link, -} from 'react-router'; -import '../design/styles/stylesheet.scss'; -import Config from 'Config'; // eslint-disable-line - -function HomePage() { - return ( -
-
-

Welcome!

-
-

- Remember the old game of Snake? One of the first common - implementations was available on the phone Nokia 3310.
- Snake Record - Nokia 3310 - -

-

- This game is a bit different. To play you need to program your own - Snake Bot and you will be competing against other bots! - The concept is simple, your snake can move UP, DOWN, RIGHT - or LEFT and the winner is the last snake alive. Extra points are awarded - when eating stars or nibbling on other snake's tails. Look out for the - black holes though! -

-

- Getting started is really easy. - We have implementations in several popular programming languages. Clone - an example Snake bot and get going! -

-

- Checkout the screencasts below: -

-

-