Permalink
Browse files

Migrated from FlashJS-canvas after DOM/Canvas renderers added

  • Loading branch information...
1 parent 484e21f commit 6eed35458a8c6489014fa4c7faa51c5e1d900e3e @PixelsCommander committed Mar 11, 2013
Showing with 9,409 additions and 11,066 deletions.
  1. BIN .DS_Store
  2. BIN AssetsManager.jar
  3. +4 −16 README.md
  4. BIN assets/1/actors/afro/01.png
  5. BIN assets/1/actors/afro/02.png
  6. BIN assets/1/actors/afro/03.png
  7. BIN assets/1/actors/afro/04.png
  8. BIN assets/1/actors/afro/05.png
  9. BIN assets/1/actors/afro/06.png
  10. BIN assets/1/actors/afro/07.png
  11. BIN assets/1/actors/afro/08.png
  12. BIN assets/1/actors/afro/09.png
  13. BIN assets/1/actors/afro/10.png
  14. BIN assets/1/actors/afro/11.png
  15. BIN assets/1/actors/afro/12.png
  16. BIN assets/1/actors/afro/13.png
  17. BIN assets/1/actors/afro/14.png
  18. BIN assets/1/actors/afro/15.png
  19. BIN assets/1/actors/afro/16.png
  20. BIN assets/1/actors/afro/17.png
  21. BIN assets/1/actors/afro/18.png
  22. BIN assets/1/actors/afro/19.png
  23. BIN assets/1/actors/afro/20.png
  24. BIN assets/1/actors/afro/21.png
  25. BIN assets/1/actors/afro/22.png
  26. BIN assets/1/actors/afro/23.png
  27. BIN assets/1/actors/afro/24.png
  28. BIN assets/1/actors/afro/25.png
  29. BIN assets/1/actors/afro/26.png
  30. BIN assets/1/actors/afro/27.png
  31. BIN assets/1/actors/afro/28.png
  32. BIN assets/1/actors/afro/29.png
  33. BIN assets/1/actors/afro/30.png
  34. BIN assets/1/actors/afro/31.png
  35. BIN assets/1/actors/afro/32.png
  36. BIN assets/1/actors/afro/33.png
  37. BIN assets/1/actors/afro/spritesheet.png
  38. BIN assets/1/actors/fish.png
  39. BIN assets/1/blueparticle.png
  40. BIN assets/1/greenparticle.png
  41. BIN assets/1/orangeparticle.png
  42. BIN assets/1/redparticle.png
  43. BIN assets/1/splash.jpg
  44. BIN assets/2/actors/afro/01.png
  45. BIN assets/2/actors/afro/02.png
  46. BIN assets/2/actors/afro/03.png
  47. BIN assets/2/actors/afro/04.png
  48. BIN assets/2/actors/afro/05.png
  49. BIN assets/2/actors/afro/06.png
  50. BIN assets/2/actors/afro/07.png
  51. BIN assets/2/actors/afro/08.png
  52. BIN assets/2/actors/afro/09.png
  53. BIN assets/2/actors/afro/10.png
  54. BIN assets/2/actors/afro/11.png
  55. BIN assets/2/actors/afro/12.png
  56. BIN assets/2/actors/afro/13.png
  57. BIN assets/2/actors/afro/14.png
  58. BIN assets/2/actors/afro/15.png
  59. BIN assets/2/actors/afro/16.png
  60. BIN assets/2/actors/afro/17.png
  61. BIN assets/2/actors/afro/18.png
  62. BIN assets/2/actors/afro/19.png
  63. BIN assets/2/actors/afro/20.png
  64. BIN assets/2/actors/afro/21.png
  65. BIN assets/2/actors/afro/22.png
  66. BIN assets/2/actors/afro/23.png
  67. BIN assets/2/actors/afro/24.png
  68. BIN assets/2/actors/afro/25.png
  69. BIN assets/2/actors/afro/26.png
  70. BIN assets/2/actors/afro/27.png
  71. BIN assets/2/actors/afro/28.png
  72. BIN assets/2/actors/afro/29.png
  73. BIN assets/2/actors/afro/30.png
  74. BIN assets/2/actors/afro/31.png
  75. BIN assets/2/actors/afro/32.png
  76. BIN assets/2/actors/afro/33.png
  77. BIN assets/2/actors/afro/spritesheet.png
  78. BIN assets/2/actors/fish.png
  79. BIN assets/2/blueparticle.png
  80. BIN assets/2/greenparticle.png
  81. BIN assets/2/orangeparticle.png
  82. BIN assets/2/redparticle.png
  83. BIN assets/2/splash.jpg
  84. BIN assets/3/actors/afro/01.png
  85. BIN assets/3/actors/afro/02.png
  86. BIN assets/3/actors/afro/03.png
  87. BIN assets/3/actors/afro/04.png
  88. BIN assets/3/actors/afro/05.png
  89. BIN assets/3/actors/afro/06.png
  90. BIN assets/3/actors/afro/07.png
  91. BIN assets/3/actors/afro/08.png
  92. BIN assets/3/actors/afro/09.png
  93. BIN assets/3/actors/afro/10.png
  94. BIN assets/3/actors/afro/11.png
  95. BIN assets/3/actors/afro/12.png
  96. BIN assets/3/actors/afro/13.png
  97. BIN assets/3/actors/afro/14.png
  98. BIN assets/3/actors/afro/15.png
  99. BIN assets/3/actors/afro/16.png
  100. BIN assets/3/actors/afro/17.png
  101. BIN assets/3/actors/afro/18.png
  102. BIN assets/3/actors/afro/19.png
  103. BIN assets/3/actors/afro/20.png
  104. BIN assets/3/actors/afro/21.png
  105. BIN assets/3/actors/afro/22.png
  106. BIN assets/3/actors/afro/23.png
  107. BIN assets/3/actors/afro/24.png
  108. BIN assets/3/actors/afro/25.png
  109. BIN assets/3/actors/afro/26.png
  110. BIN assets/3/actors/afro/27.png
  111. BIN assets/3/actors/afro/28.png
  112. BIN assets/3/actors/afro/29.png
  113. BIN assets/3/actors/afro/30.png
  114. BIN assets/3/actors/afro/31.png
  115. BIN assets/3/actors/afro/32.png
  116. BIN assets/3/actors/afro/33.png
  117. BIN assets/3/actors/afro/spritesheet.png
  118. BIN assets/3/actors/fish.png
  119. BIN assets/3/blueparticle.png
  120. BIN assets/3/greenparticle.png
  121. BIN assets/3/orangeparticle.png
  122. BIN assets/3/redparticle.png
  123. BIN assets/3/splash.jpg
  124. BIN assets/4/actors/afro/01.png
  125. BIN assets/4/actors/afro/02.png
  126. BIN assets/4/actors/afro/03.png
  127. BIN assets/4/actors/afro/04.png
  128. BIN assets/4/actors/afro/05.png
  129. BIN assets/4/actors/afro/06.png
  130. BIN assets/4/actors/afro/07.png
  131. BIN assets/4/actors/afro/08.png
  132. BIN assets/4/actors/afro/09.png
  133. BIN assets/4/actors/afro/10.png
  134. BIN assets/4/actors/afro/11.png
  135. BIN assets/4/actors/afro/12.png
  136. BIN assets/4/actors/afro/13.png
  137. BIN assets/4/actors/afro/14.png
  138. BIN assets/4/actors/afro/15.png
  139. BIN assets/4/actors/afro/16.png
  140. BIN assets/4/actors/afro/17.png
  141. BIN assets/4/actors/afro/18.png
  142. BIN assets/4/actors/afro/19.png
  143. BIN assets/4/actors/afro/20.png
  144. BIN assets/4/actors/afro/21.png
  145. BIN assets/4/actors/afro/22.png
  146. BIN assets/4/actors/afro/23.png
  147. BIN assets/4/actors/afro/24.png
  148. BIN assets/4/actors/afro/25.png
  149. BIN assets/4/actors/afro/26.png
  150. BIN assets/4/actors/afro/27.png
  151. BIN assets/4/actors/afro/28.png
  152. BIN assets/4/actors/afro/29.png
  153. BIN assets/4/actors/afro/30.png
  154. BIN assets/4/actors/afro/31.png
  155. BIN assets/4/actors/afro/32.png
  156. BIN assets/4/actors/afro/33.png
  157. BIN assets/4/actors/afro/spritesheet.png
  158. BIN assets/4/actors/fish.png
  159. BIN assets/4/blueparticle.png
  160. BIN assets/4/greenparticle.png
  161. BIN assets/4/orangeparticle.png
  162. BIN assets/4/redparticle.png
  163. BIN assets/4/splash.jpg
  164. BIN assets/back.gif
  165. BIN assets/bridge.png
  166. BIN assets/buggy.gif
  167. BIN assets/map.png
  168. BIN assets/smokeLeft.gif
  169. BIN assets/smokeRight.gif
  170. +27 −0 examples/actionscripttag/assets/main-assets.json
  171. +45 −0 examples/actionscripttag/index.html
  172. +1 −0 examples/actionscripttag/js/main.js
  173. BIN examples/boilerplate/AssetsManager.jar
  174. +22 −0 examples/boilerplate/assets/main-assets.json
  175. +14 −0 examples/boilerplate/index.html
  176. +20 −0 examples/boilerplate/js/game.js
  177. +1 −0 examples/boilerplate/js/libs/flash.min.js
  178. +20 −0 examples/particle-interface/assets.json
  179. +340 −0 examples/particle-interface/css/main.css
  180. +527 −0 examples/particle-interface/css/normalize.css
  181. +24 −0 examples/particle-interface/index.html
  182. +24 −0 examples/particle-interface/indexdom.html
  183. +160 −0 examples/particle-interface/js/main.js
  184. +24 −0 examples/particle-interface/js/plugins.js
  185. +4 −0 examples/particle-interface/js/vendor/jquery-1.9.0.min.js
  186. +4 −0 examples/particle-interface/js/vendor/modernizr-2.6.2.min.js
  187. +27 −0 examples/scaling-assets/assets/main-assets.json
  188. +52 −0 examples/scaling-assets/index.html
  189. +1 −0 examples/scaling-assets/js/main.js
  190. +13 −0 examples/sounds/assets/main-assets.json
  191. +40 −0 examples/sounds/index.html
  192. +1 −0 examples/sounds/js/main.js
  193. +33 −0 examples/subscribetoframe/index.html
  194. +1 −0 examples/subscribetoframe/js/main.js
  195. +2,497 −0 flash.js
  196. +2,289 −0 flashdom.js
  197. BIN js/.DS_Store
  198. +0 −234 js/FlashJS/flashDisplayObject.js
  199. +0 −29 js/FlashJS/flashEvents.js
  200. +0 −32 js/FlashJS/flashKeyboardManager.js
  201. +0 −15 js/FlashJS/flashLoader.js
  202. +0 −203 js/FlashJS/flashStage.js
  203. +0 −46 js/FlashJS/flashTween.js
  204. +0 −19 js/FlashJS/flashUtils.js
  205. +0 −51 js/emile.js
  206. +0 −1 js/firmin-1.0.0-min.js
  207. +0 −27 js/getset.js
  208. +0 −9,046 js/jquery.js
  209. +0 −845 js/underscore.js
  210. +1 −0 lib/flash.min.js
  211. +1 −0 lib/flashdom.min.js
  212. +0 −176 racing.html
  213. +0 −145 racingMobile.html
  214. +0 −181 racingTests.html
  215. BIN sounds/mp3/music/level_1/level_1_hey_dude.mp3
  216. BIN sounds/mp3/sfx/general/wipe_out.mp3
  217. BIN sounds/ogg/music/level_1/level_1_hey_dude.ogg
  218. BIN sounds/ogg/sfx/general/wipe_out.ogg
  219. BIN sounds/wav/music/level_1/level_1_hey_dude.wav
  220. BIN sounds/wav/sfx/general/wipe_out.wav
  221. +74 −0 src/display-canvas/DisplayList.js
  222. +270 −0 src/display-canvas/DisplayObject.js
  223. +164 −0 src/display-canvas/SpriteAnimation.js
  224. +122 −0 src/display-canvas/SpriteSheet.js
  225. +169 −0 src/display-canvas/Stage.js
  226. +55 −0 src/display-dom/DisplayList.js
  227. +379 −0 src/display-dom/DisplayObject.js
  228. +157 −0 src/display-dom/Stage.js
  229. +45 −0 src/events/AccelerationEvent.js
  230. +103 −0 src/events/Event.js
  231. +58 −0 src/events/TouchEvent.js
  232. +534 −0 src/geom/Matrix2D.js
  233. +79 −0 src/grunt.js
  234. +95 −0 src/loading/AnimationLoader.js
  235. +156 −0 src/loading/AssetsList.js
  236. +42 −0 src/loading/ImageLoader.js
  237. +26 −0 src/loading/Loader.js
  238. +48 −0 src/loading/SoundLoader.js
  239. +129 −0 src/media/APISound.js
  240. +59 −0 src/media/PhonegapSound.js
  241. +109 −0 src/media/Sound.js
  242. +25 −0 src/package.json
  243. +44 −0 src/utils/ActionScriptTagExecutor.js
  244. +41 −0 src/utils/CollisionManager.js
  245. +209 −0 src/utils/Core-utils.js
View
BIN .DS_Store
Binary file not shown.
View
Binary file not shown.
View
@@ -1,27 +1,15 @@
-FLASH JS
-========
+FLASH JS CANVAS (ALPHA)
+=======================
FlashJS is JavaScript graphics and game development engine with API similar to Flash one.
It`s HTML5 game development tool, based on verified for years Flash methodology.
Just write ActionScript 3 code inside of <actionscript> tag.
-To get started -- checkout http://github.com/PixelsCommander/FlashJS
-
Usage
-----
-You can use FlashJS for applications or game development.
-
-Start from analyzing racing.html example.
-
-
-Bug tracker
------------
-
-Have a bug? Please create an issue here on GitHub!
-
-https://github.com/PixelsCommander/FlashJS/issues
+This is alpha version of canvas implementation. You are using it at your own risk. API is still not compatible with old FlashJS
Twitter account
@@ -43,6 +31,6 @@ http://groups.google.com/group/flashjs
License
---------------------
-Copyright 2011 Denis Radin.
+Copyright 2012 Denis Radin.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
View
Diff not rendered.
@@ -0,0 +1,27 @@
+{
+ "assetsData":[
+ {
+ "url":"../../assets/%scale%/actors/afro/",
+ "fileNameNumbers":2,
+ "id":"player",
+ "width":207,
+ "height":240,
+ "framesTotal":32,
+ "animations": {
+ "fly": {"startFrame":3, "endFrame":3, "interval":100, "looped":0, "makeFlip":0},
+ "jump": {"startFrame":0, "endFrame":3, "interval":50, "looped":0, "makeFlip":0},
+ "grab": {"startFrame":4, "endFrame":5, "interval":75, "looped":0, "makeFlip":0},
+ "runleft": {"startFrame":9, "endFrame":11, "interval":70, "looped":0, "makeFlip":0},
+ "runright": {"startFrame":6, "endFrame":8, "interval":70, "looped":0, "makeFlip":0},
+ "run": {"startFrame":0, "endFrame":0, "interval":50, "looped":0, "makeFlip":0},
+ "tornado": {"startFrame":11, "endFrame":18, "interval":80, "looped":1, "makeFlip":0},
+ "fall": {"startFrame":19, "endFrame":23, "interval":50, "looped":0, "makeFlip":0},
+ "verticaltornado": {"startFrame":24, "endFrame":30, "interval":50, "looped":0, "makeFlip":0}
+ }
+ },
+ {
+ "url":"../../assets/%scale%/actors/fish.png",
+ "id":"fish"
+ }
+ ]
+}
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../../src/utils/Core-utils.js"></script>
+ <script src="../../src/geom/Matrix2D.js"></script>
+ <script src="../../src/display-canvas/DisplayObject.js"></script>
+ <script src="../../src/display-canvas/DisplayList.js"></script>
+ <script src="../../src/display-canvas/Stage.js"></script>
+ <script src="../../src/display-canvas/SpriteSheet.js"></script>
+ <script src="../../src/display-canvas/SpriteAnimation.js"></script>
+ <script src="../../src/events/Event.js"></script>
+ <script src="../../src/events/TouchEvent.js"></script>
+ <script src="../../src/loading/AnimationLoader.js"></script>
+ <script src="../../src/loading/ImageLoader.js"></script>
+ <script src="../../src/media/Sound.js"></script>
+ <script src="../../src/loading/SoundLoader.js"></script>
+ <script src="../../src/loading/Loader.js"></script>
+ <script src="../../src/loading/AssetsList.js"></script>
+ <script src="../../src/utils/ActionScriptTagExecutor.js"></script>
+ </head>
+ <body>
+ <actionscript width="200px" height="200px" scaletoscreen="false">
+ var loadCallback = function(){
+ for (var k = 0; k < 4; k++){
+ for (var i = 0; i < 4; i++){
+ var fish = new DisplayObject(assets.get('fish'));
+ stage.addChild(fish);
+ fish.x = fish.width * i;
+ fish.y = fish.height * k;
+ }
+ }
+
+ var player = new SpriteAnimation(assets.get('player'));
+ player.setAnimation('tornado', true);
+ stage.addChild(player);
+ }
+
+
+ var assets = new AssetsList({scale: stage.pixelScale, startFrame: 1}, "./assets/main-assets.json", loadCallback);
+ </actionscript>
+ <p>
+ This scene is created with help of actionscript tag. It makes a bit simplier to start development and decrease amount of code needed from scratch.
+ </p>
+ </body>
+</html>
@@ -0,0 +1 @@
+main.js
Binary file not shown.
@@ -0,0 +1,22 @@
+{
+ "assetsData":[
+ {
+ "url":"../scaling-assets/assets/%scale%/actors/afro/",
+ "id":"player",
+ "width":207,
+ "height":240,
+ "framesTotal":33,
+ "animations": {
+ "fly": {"startFrame":3, "endFrame":3, "interval":100, "looped":0, "makeFlip":0},
+ "jump": {"startFrame":0, "endFrame":3, "interval":50, "looped":0, "makeFlip":0},
+ "grab": {"startFrame":4, "endFrame":5, "interval":75, "looped":0, "makeFlip":0},
+ "runleft": {"startFrame":9, "endFrame":11, "interval":70, "looped":0, "makeFlip":0},
+ "runright": {"startFrame":6, "endFrame":8, "interval":70, "looped":0, "makeFlip":0},
+ "run": {"startFrame":0, "endFrame":0, "interval":50, "looped":0, "makeFlip":0},
+ "tornado": {"startFrame":12, "endFrame":18, "interval":200, "looped":1, "makeFlip":0},
+ "fall": {"startFrame":19, "endFrame":23, "interval":50, "looped":0, "makeFlip":0},
+ "verticaltornado": {"startFrame":24, "endFrame":30, "interval":50, "looped":0, "makeFlip":0}
+ }
+ }
+ ]
+}
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../js/libs/flash.min.js"></script>
+ <script src="./js/game.js"></script>
+ </head>
+ <body>
+ <canvas height="auto" width="100%" id="gameCanvas" style="width:100%; height:100%;">
+ </canvas>
+ </body>
+ <script>
+ window.game = new Game('#gameCanvas');
+ </script>
+</html>
@@ -0,0 +1,20 @@
+(function(w){
+ var Game = function(){
+ this.stage = new Stage('#gameCanvas');
+ this.assets = new AssetsList({scale: this.stage.pixelScale, startFrame: 1}, "./assets/main-assets.json", this.loadCallback.bind(this));
+
+ this.assets.onProgress = function(arg){
+ console.log(arg.percentLeft + '% loaded');
+ }
+ }
+
+ p = Game.prototype;
+
+ p.loadCallback = function(){
+ var player = new SpriteAnimation(this.assets.get('player'));
+ player.setAnimation('tornado', true);
+ this.stage.addChild(player);
+ }
+
+ w.Game = Game;
+})(window)

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,20 @@
+{
+ "assetsData":[
+ {
+ "url":"../../assets/%scale%/blueparticle.png",
+ "id":"particle1"
+ },
+ {
+ "url":"../../assets/%scale%/redparticle.png",
+ "id":"particle2"
+ },
+ {
+ "url":"../../assets/%scale%/orangeparticle.png",
+ "id":"particle3"
+ },
+ {
+ "url":"../../assets/%scale%/greenparticle.png",
+ "id":"particle4"
+ }
+ ]
+}
Oops, something went wrong.

0 comments on commit 6eed354

Please sign in to comment.