diff --git a/.gitattributes b/.gitattributes index 67e64d3a001b5db7fc9731f837f301322d98b933..3e11213bfb3b6caf23f4248b4f9492b626dca42c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -65,3 +65,11 @@ learntofly2/ltf2.swf filter=lfs diff=lfs merge=lfs -text learntofly2/flash.swf filter=lfs diff=lfs merge=lfs -text 60secondburgerrun/60sbr.swf filter=lfs diff=lfs merge=lfs -text 60secondburgerrun/flash.swf filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/ground/ground_17.png filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/ground/ground_3.png filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/ground/ground_6.png filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/ground/menu_ground.png filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/scene/scene_10.png filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/scene/scene_11.png filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/scene/scene_15.png filter=lfs diff=lfs merge=lfs -text +jellytruck/assets/scene/scene_16.png filter=lfs diff=lfs merge=lfs -text diff --git a/jellytruck/assets/Loading/jt.png b/jellytruck/assets/Loading/jt.png new file mode 100644 index 0000000000000000000000000000000000000000..cf871748550eaa1090813d368e21b0d33b970dd9 Binary files /dev/null and b/jellytruck/assets/Loading/jt.png differ diff --git a/jellytruck/assets/Loading/loader.png b/jellytruck/assets/Loading/loader.png new file mode 100644 index 0000000000000000000000000000000000000000..a1102281c1da90c92a655a98be2ce3318b0aad88 Binary files /dev/null and b/jellytruck/assets/Loading/loader.png differ diff --git a/jellytruck/assets/Loading/preload.png b/jellytruck/assets/Loading/preload.png new file mode 100644 index 0000000000000000000000000000000000000000..5d4ecdd0f47add4c5700d0b527b79959df8fc6b9 Binary files /dev/null and b/jellytruck/assets/Loading/preload.png differ diff --git a/jellytruck/assets/Loading/splash_coolmath.png b/jellytruck/assets/Loading/splash_coolmath.png new file mode 100644 index 0000000000000000000000000000000000000000..a01a46b7466c59ca3fd64a8eb25f146a58e0ede2 Binary files /dev/null and b/jellytruck/assets/Loading/splash_coolmath.png differ diff --git a/jellytruck/assets/background/bg.png b/jellytruck/assets/background/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..991cf99966c7cee2e383074176a1854984f06c4c Binary files /dev/null and b/jellytruck/assets/background/bg.png differ diff --git a/jellytruck/assets/background/bg_light.png b/jellytruck/assets/background/bg_light.png new file mode 100644 index 0000000000000000000000000000000000000000..69be28d633ca21b1411aa18ac262ad19ca965095 Binary files /dev/null and b/jellytruck/assets/background/bg_light.png differ diff --git a/jellytruck/assets/data b/jellytruck/assets/data new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/jellytruck/assets/data @@ -0,0 +1 @@ + diff --git a/jellytruck/assets/ground/ground_1.png b/jellytruck/assets/ground/ground_1.png new file mode 100644 index 0000000000000000000000000000000000000000..60ca46d7f6adcd3a687ed51231fb4c3d04ecc378 Binary files /dev/null and b/jellytruck/assets/ground/ground_1.png differ diff --git a/jellytruck/assets/ground/ground_12.png b/jellytruck/assets/ground/ground_12.png new file mode 100644 index 0000000000000000000000000000000000000000..3daca2cb19a07c9845637bc50b08cc88d701caa4 Binary files /dev/null and b/jellytruck/assets/ground/ground_12.png differ diff --git a/jellytruck/assets/ground/ground_13.png b/jellytruck/assets/ground/ground_13.png new file mode 100644 index 0000000000000000000000000000000000000000..361089524075ba1efb27ebe6400b5adeed82c38d Binary files /dev/null and b/jellytruck/assets/ground/ground_13.png differ diff --git a/jellytruck/assets/ground/ground_14.png b/jellytruck/assets/ground/ground_14.png new file mode 100644 index 0000000000000000000000000000000000000000..d288f07d2de17ea8037c78ba4d2f948a3a7d1156 Binary files /dev/null and b/jellytruck/assets/ground/ground_14.png differ diff --git a/jellytruck/assets/ground/ground_17.png b/jellytruck/assets/ground/ground_17.png new file mode 100644 index 0000000000000000000000000000000000000000..1d27ac759ff4069bdfaeaa2cfa9b428e17efb5e1 --- /dev/null +++ b/jellytruck/assets/ground/ground_17.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:836ebcfed6170b7d476021c03c12b537b1c2fa800b69ac1e4bc2aefa540978a4 +size 1762289 diff --git a/jellytruck/assets/ground/ground_19.png b/jellytruck/assets/ground/ground_19.png new file mode 100644 index 0000000000000000000000000000000000000000..f1871a828dc697871726b18680833ec3a857e22f Binary files /dev/null and b/jellytruck/assets/ground/ground_19.png differ diff --git a/jellytruck/assets/ground/ground_2.png b/jellytruck/assets/ground/ground_2.png new file mode 100644 index 0000000000000000000000000000000000000000..6b3c54daa2db0a766ed3bce63ecdd8388167f0f4 Binary files /dev/null and b/jellytruck/assets/ground/ground_2.png differ diff --git a/jellytruck/assets/ground/ground_20.png b/jellytruck/assets/ground/ground_20.png new file mode 100644 index 0000000000000000000000000000000000000000..c8e449bc9e166d040d2d699f06f127ee7298f820 Binary files /dev/null and b/jellytruck/assets/ground/ground_20.png differ diff --git a/jellytruck/assets/ground/ground_3.png b/jellytruck/assets/ground/ground_3.png new file mode 100644 index 0000000000000000000000000000000000000000..59f1813c29c113e007e6d2cecd3aae20e873283e --- /dev/null +++ b/jellytruck/assets/ground/ground_3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1ee5119604817eb9cab60781e4f1787502e0808abaa47ac18b6504b34108e57 +size 1000121 diff --git a/jellytruck/assets/ground/ground_4.png b/jellytruck/assets/ground/ground_4.png new file mode 100644 index 0000000000000000000000000000000000000000..2d1187b515e2b7853ae768e67baf9230d685e775 Binary files /dev/null and b/jellytruck/assets/ground/ground_4.png differ diff --git a/jellytruck/assets/ground/ground_6.png b/jellytruck/assets/ground/ground_6.png new file mode 100644 index 0000000000000000000000000000000000000000..d28f317a1d343d419f4e028a14171c3930fc2782 --- /dev/null +++ b/jellytruck/assets/ground/ground_6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c11d6b6e5821f1a91614c71d220d07367192aca9a5d497512529b4307328049 +size 1149304 diff --git a/jellytruck/assets/ground/ground_7.png b/jellytruck/assets/ground/ground_7.png new file mode 100644 index 0000000000000000000000000000000000000000..3f4119ec556bbac63dd5ed9d409a8c8dcc1e1e8c Binary files /dev/null and b/jellytruck/assets/ground/ground_7.png differ diff --git a/jellytruck/assets/ground/ground_9.png b/jellytruck/assets/ground/ground_9.png new file mode 100644 index 0000000000000000000000000000000000000000..0c379c520f1e294216ea57acb1f50eb89f768c56 Binary files /dev/null and b/jellytruck/assets/ground/ground_9.png differ diff --git a/jellytruck/assets/ground/menu_ground.png b/jellytruck/assets/ground/menu_ground.png new file mode 100644 index 0000000000000000000000000000000000000000..418de77db01475be0b83d5be16ea285390ae97cb --- /dev/null +++ b/jellytruck/assets/ground/menu_ground.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af209c91b525450d9bd9d4d3b7fc2244baa3884fa718bbc58e3993875b855149 +size 1079225 diff --git a/jellytruck/assets/menu/3_star.png b/jellytruck/assets/menu/3_star.png new file mode 100644 index 0000000000000000000000000000000000000000..5c1a1c82b2af5b145f413f6a738f7cafb4f1c243 Binary files /dev/null and b/jellytruck/assets/menu/3_star.png differ diff --git a/jellytruck/assets/menu/back_btn.png b/jellytruck/assets/menu/back_btn.png new file mode 100644 index 0000000000000000000000000000000000000000..4c40414f491dfdaf8315fda554e8ab0536e6e6de Binary files /dev/null and b/jellytruck/assets/menu/back_btn.png differ diff --git a/jellytruck/assets/menu/closeBtn.png b/jellytruck/assets/menu/closeBtn.png new file mode 100644 index 0000000000000000000000000000000000000000..6f441ca9fb97319624fc83f13b19a6ede0cd762f Binary files /dev/null and b/jellytruck/assets/menu/closeBtn.png differ diff --git a/jellytruck/assets/menu/fx.png b/jellytruck/assets/menu/fx.png new file mode 100644 index 0000000000000000000000000000000000000000..6029572da26e4632a4c4949d7f9c5f334123c70d Binary files /dev/null and b/jellytruck/assets/menu/fx.png differ diff --git a/jellytruck/assets/menu/go_img.png b/jellytruck/assets/menu/go_img.png new file mode 100644 index 0000000000000000000000000000000000000000..5d038435e46d16a2673d3ec625ba8975e715005f Binary files /dev/null and b/jellytruck/assets/menu/go_img.png differ diff --git a/jellytruck/assets/menu/help.png b/jellytruck/assets/menu/help.png new file mode 100644 index 0000000000000000000000000000000000000000..8beb856cd29ea35914073d9678ce4638c24dccb1 Binary files /dev/null and b/jellytruck/assets/menu/help.png differ diff --git a/jellytruck/assets/menu/how_to_play_popup.png b/jellytruck/assets/menu/how_to_play_popup.png new file mode 100644 index 0000000000000000000000000000000000000000..dc4fa5c03589658713a7903dcedbf0c9bb65355c Binary files /dev/null and b/jellytruck/assets/menu/how_to_play_popup.png differ diff --git a/jellytruck/assets/menu/how_to_play_popup_mobile.png b/jellytruck/assets/menu/how_to_play_popup_mobile.png new file mode 100644 index 0000000000000000000000000000000000000000..5ec73bcb9c10b937ceaa35bffd500f9a9e022275 Binary files /dev/null and b/jellytruck/assets/menu/how_to_play_popup_mobile.png differ diff --git a/jellytruck/assets/menu/leaf1.png b/jellytruck/assets/menu/leaf1.png new file mode 100644 index 0000000000000000000000000000000000000000..ab1b600b6cee90d97bd59752b5621439ac3db1b1 Binary files /dev/null and b/jellytruck/assets/menu/leaf1.png differ diff --git a/jellytruck/assets/menu/leafData.json b/jellytruck/assets/menu/leafData.json new file mode 100644 index 0000000000000000000000000000000000000000..97db60f8d32bc591fbdd488ab085d16fb10eb908 --- /dev/null +++ b/jellytruck/assets/menu/leafData.json @@ -0,0 +1,1603 @@ +{"frames": [ + +{ + "filename": "0000", + "frame": {"x":523,"y":2555,"w":7,"h":12}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":417,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0001", + "frame": {"x":1528,"y":4248,"w":36,"h":16}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":437,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0002", + "frame": {"x":1201,"y":581,"w":44,"h":23}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":9,"y":465,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0003", + "frame": {"x":3280,"y":3828,"w":40,"h":23}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":40,"y":484,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0004", + "frame": {"x":436,"y":3344,"w":44,"h":26}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":49,"y":501,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0005", + "frame": {"x":3981,"y":2649,"w":115,"h":369}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":179,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0006", + "frame": {"x":2591,"y":4201,"w":136,"h":357}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":193,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0007", + "frame": {"x":2591,"y":4558,"w":148,"h":304}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":261,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0008", + "frame": {"x":3919,"y":1639,"w":173,"h":283}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":279,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0009", + "frame": {"x":2127,"y":4423,"w":188,"h":257}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":303,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0010", + "frame": {"x":2497,"y":2719,"w":190,"h":218}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":10,"y":341,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0011", + "frame": {"x":2711,"y":2294,"w":170,"h":173}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":45,"y":377,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0012", + "frame": {"x":1208,"y":3772,"w":172,"h":141}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":53,"y":414,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0013", + "frame": {"x":2907,"y":1911,"w":140,"h":112}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":89,"y":444,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0014", + "frame": {"x":2257,"y":2079,"w":127,"h":106}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":122,"y":465,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0015", + "frame": {"x":3351,"y":2028,"w":106,"h":88}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":140,"y":485,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0016", + "frame": {"x":3640,"y":3852,"w":103,"h":51}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":160,"y":504,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0017", + "frame": {"x":2507,"y":1410,"w":267,"h":120}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":432,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0018", + "frame": {"x":2739,"y":4721,"w":245,"h":105}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":27,"y":449,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0019", + "frame": {"x":3122,"y":2470,"w":229,"h":86}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":50,"y":467,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0020", + "frame": {"x":0,"y":4194,"w":286,"h":342}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":219,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0021", + "frame": {"x":579,"y":4436,"w":285,"h":310}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":251,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0022", + "frame": {"x":286,"y":4520,"w":289,"h":271}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":285,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0023", + "frame": {"x":736,"y":2555,"w":299,"h":229}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":4,"y":321,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0024", + "frame": {"x":864,"y":4575,"w":291,"h":193}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":18,"y":352,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0025", + "frame": {"x":575,"y":4746,"w":273,"h":153}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":37,"y":385,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0026", + "frame": {"x":1208,"y":4248,"w":320,"h":342}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":190,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0027", + "frame": {"x":1423,"y":2954,"w":332,"h":527}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0028", + "frame": {"x":3642,"y":2649,"w":339,"h":523}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0029", + "frame": {"x":3009,"y":2985,"w":339,"h":517}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":7,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0030", + "frame": {"x":2108,"y":3234,"w":340,"h":498}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":29,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0031", + "frame": {"x":1755,"y":2954,"w":353,"h":484}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":48,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0032", + "frame": {"x":2448,"y":3729,"w":330,"h":472}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":17,"y":69,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0033", + "frame": {"x":2089,"y":3732,"w":348,"h":434}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":13,"y":102,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0034", + "frame": {"x":612,"y":3608,"w":330,"h":427}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":32,"y":118,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0035", + "frame": {"x":606,"y":4035,"w":327,"h":401}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":36,"y":145,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0036", + "frame": {"x":1564,"y":3932,"w":321,"h":352}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":43,"y":182,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0037", + "frame": {"x":1824,"y":4423,"w":303,"h":327}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":58,"y":209,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0038", + "frame": {"x":3280,"y":3852,"w":360,"h":421}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":112,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0039", + "frame": {"x":1043,"y":3370,"w":359,"h":402}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":129,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0040", + "frame": {"x":3726,"y":2121,"w":355,"h":528}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0041", + "frame": {"x":2138,"y":2719,"w":359,"h":515}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":14,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0042", + "frame": {"x":1755,"y":3438,"w":334,"h":494}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":38,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0043", + "frame": {"x":3749,"y":3436,"w":347,"h":478}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":4,"y":52,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0044", + "frame": {"x":2778,"y":4138,"w":325,"h":451}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":7,"y":81,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0045", + "frame": {"x":1402,"y":3481,"w":327,"h":433}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":22,"y":103,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0046", + "frame": {"x":3103,"y":4558,"w":306,"h":394}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":30,"y":132,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0047", + "frame": {"x":2315,"y":4201,"w":276,"h":371}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":48,"y":165,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0048", + "frame": {"x":1528,"y":4284,"w":296,"h":351}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":43,"y":184,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0049", + "frame": {"x":286,"y":4194,"w":293,"h":326}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":57,"y":215,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0050", + "frame": {"x":933,"y":4284,"w":272,"h":291}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":78,"y":252,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0051", + "frame": {"x":0,"y":4536,"w":267,"h":252}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":86,"y":285,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0052", + "frame": {"x":1208,"y":3914,"w":356,"h":334}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":212,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0053", + "frame": {"x":3351,"y":2121,"w":375,"h":514}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":38,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0054", + "frame": {"x":1061,"y":2363,"w":397,"h":499}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":49,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0055", + "frame": {"x":2711,"y":2470,"w":411,"h":468}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":68,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0056", + "frame": {"x":2448,"y":3293,"w":388,"h":436}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":23,"y":99,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0057", + "frame": {"x":3348,"y":3436,"w":401,"h":416}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":20,"y":122,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0058", + "frame": {"x":0,"y":3344,"w":436,"h":386}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":24,"y":151,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0059", + "frame": {"x":3640,"y":3914,"w":425,"h":356}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":36,"y":178,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0060", + "frame": {"x":3640,"y":4270,"w":443,"h":334}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":44,"y":202,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0061", + "frame": {"x":765,"y":1040,"w":424,"h":305}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":76,"y":234,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0062", + "frame": {"x":3103,"y":4273,"w":438,"h":285}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":74,"y":266,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0063", + "frame": {"x":1885,"y":4166,"w":430,"h":257}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":75,"y":294,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0064", + "frame": {"x":3122,"y":2635,"w":520,"h":350}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":204,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0065", + "frame": {"x":2422,"y":960,"w":537,"h":450}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":105,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0066", + "frame": {"x":1828,"y":996,"w":545,"h":442}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":110,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0067", + "frame": {"x":2959,"y":1123,"w":555,"h":410}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":2,"y":144,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0068", + "frame": {"x":1869,"y":482,"w":553,"h":514}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":39,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0069", + "frame": {"x":0,"y":600,"w":547,"h":480}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":59,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0070", + "frame": {"x":2422,"y":501,"w":554,"h":459}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":7,"y":80,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0071", + "frame": {"x":0,"y":1735,"w":548,"h":430}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":11,"y":100,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0072", + "frame": {"x":3514,"y":1251,"w":575,"h":388}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":12,"y":131,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0073", + "frame": {"x":2507,"y":1533,"w":556,"h":378}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":34,"y":154,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0074", + "frame": {"x":2504,"y":0,"w":604,"h":501}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":40,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0075", + "frame": {"x":1869,"y":0,"w":635,"h":482}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":59,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0076", + "frame": {"x":1245,"y":523,"w":616,"h":453}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":4,"y":89,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0077", + "frame": {"x":1201,"y":976,"w":627,"h":417}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":17,"y":123,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0078", + "frame": {"x":2976,"y":725,"w":622,"h":398}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":36,"y":149,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0079", + "frame": {"x":548,"y":1820,"w":614,"h":364}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":46,"y":179,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0080", + "frame": {"x":1774,"y":1740,"w":614,"h":339}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":59,"y":199,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0081", + "frame": {"x":1458,"y":2380,"w":636,"h":301}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":70,"y":232,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0082", + "frame": {"x":3348,"y":3172,"w":635,"h":264}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":85,"y":270,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0083", + "frame": {"x":0,"y":3730,"w":612,"h":233}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":100,"y":296,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0084", + "frame": {"x":0,"y":3963,"w":606,"h":231}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":116,"y":297,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0085", + "frame": {"x":436,"y":3370,"w":607,"h":238}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":124,"y":291,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0086", + "frame": {"x":3108,"y":0,"w":766,"h":368}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":162,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0087", + "frame": {"x":3108,"y":368,"w":766,"h":357}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":179,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0088", + "frame": {"x":0,"y":1080,"w":765,"h":336}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":201,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0089", + "frame": {"x":0,"y":1416,"w":744,"h":319}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":22,"y":231,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0090", + "frame": {"x":1774,"y":1438,"w":733,"h":302}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":33,"y":250,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0091", + "frame": {"x":0,"y":2567,"w":736,"h":269}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":30,"y":285,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0092", + "frame": {"x":0,"y":2836,"w":712,"h":255}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":54,"y":302,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0093", + "frame": {"x":712,"y":2862,"w":711,"h":252}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":55,"y":304,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0094", + "frame": {"x":0,"y":3091,"w":692,"h":253}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":74,"y":296,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0095", + "frame": {"x":692,"y":3114,"w":680,"h":256}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":86,"y":292,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0096", + "frame": {"x":1458,"y":2681,"w":680,"h":273}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":86,"y":285,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0097", + "frame": {"x":1598,"y":2079,"w":659,"h":301}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":107,"y":270,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0098", + "frame": {"x":2778,"y":3828,"w":502,"h":310}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":109,"y":264,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0099", + "frame": {"x":2836,"y":3502,"w":498,"h":326}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":123,"y":247,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0100", + "frame": {"x":2497,"y":2938,"w":512,"h":355}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":134,"y":234,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0101", + "frame": {"x":2388,"y":1911,"w":519,"h":383}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":146,"y":217,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0102", + "frame": {"x":0,"y":2165,"w":523,"h":402}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":157,"y":198,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0103", + "frame": {"x":523,"y":2184,"w":538,"h":371}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":160,"y":157,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0104", + "frame": {"x":765,"y":1393,"w":564,"h":427}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":145,"y":118,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0105", + "frame": {"x":620,"y":581,"w":581,"h":459}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":154,"y":95,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0106", + "frame": {"x":1245,"y":0,"w":624,"h":523}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":142,"y":43,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0107", + "frame": {"x":620,"y":0,"w":625,"h":581}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":141,"y":8,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0108", + "frame": {"x":0,"y":0,"w":620,"h":600}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":146,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0109", + "frame": {"x":3487,"y":1639,"w":432,"h":482}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":294,"y":118,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0110", + "frame": {"x":1329,"y":1393,"w":445,"h":506}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":291,"y":94,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0111", + "frame": {"x":3598,"y":725,"w":438,"h":526}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":311,"y":74,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0112", + "frame": {"x":2257,"y":2294,"w":454,"h":425}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":312,"y":59,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0113", + "frame": {"x":2907,"y":2028,"w":444,"h":442}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":322,"y":38,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0114", + "frame": {"x":1162,"y":1899,"w":436,"h":464}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":330,"y":23,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0115", + "frame": {"x":3063,"y":1533,"w":424,"h":495}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":341,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0116", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0117", + "frame": {"x":942,"y":3772,"w":266,"h":512}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":392,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0118", + "frame": {"x":2280,"y":4851,"w":258,"h":106}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":418,"y":416,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0119", + "frame": {"x":2280,"y":4735,"w":256,"h":116}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":438,"y":412,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0120", + "frame": {"x":2739,"y":4589,"w":268,"h":132}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":445,"y":407,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0121", + "frame": {"x":258,"y":4791,"w":278,"h":130}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":449,"y":415,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0122", + "frame": {"x":2315,"y":4572,"w":274,"h":163}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":475,"y":393,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0123", + "frame": {"x":3348,"y":2985,"w":261,"h":181}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":494,"y":389,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0124", + "frame": {"x":0,"y":4788,"w":258,"h":190}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":508,"y":384,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0125", + "frame": {"x":3874,"y":0,"w":148,"h":212}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":537,"y":376,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0126", + "frame": {"x":2127,"y":4680,"w":153,"h":224}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":561,"y":369,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0127", + "frame": {"x":1885,"y":3932,"w":169,"h":226}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":575,"y":374,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0128", + "frame": {"x":2094,"y":2380,"w":158,"h":238}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":601,"y":362,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0129", + "frame": {"x":3009,"y":2938,"w":67,"h":47}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":623,"y":349,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0130", + "frame": {"x":864,"y":4436,"w":67,"h":51}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":650,"y":340,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0131", + "frame": {"x":2778,"y":3729,"w":58,"h":46}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":678,"y":335,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0132", + "frame": {"x":2536,"y":4735,"w":55,"h":51}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":711,"y":326,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0133", + "frame": {"x":523,"y":2165,"w":23,"h":19}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":743,"y":343,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0134", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0135", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0136", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0137", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0138", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0139", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0140", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0141", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0142", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0143", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0144", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0145", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0146", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0147", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0148", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0149", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0150", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0151", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0152", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0153", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0154", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0155", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0156", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0157", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0158", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0159", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0160", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0161", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0162", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0163", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0164", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0165", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0166", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0167", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0168", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0169", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0170", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0171", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0172", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0173", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0174", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0175", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0176", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0177", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0178", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0179", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0180", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0181", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0182", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0183", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0184", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0185", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0186", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0187", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0188", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0189", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0190", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0191", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0192", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0193", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0194", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0195", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0196", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0197", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +} +,{ + "filename": "0198", + "frame": {"x":0,"y":0,"w":0,"h":0}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":766,"h":600}, + "sourceSize": {"w":766,"h":600} +}], +"meta": { + "app": "Adobe Animate", + "version": "16.1.0.86", + "image": "Untitled2-1.png", + "format": "RGBA8888", + "size": {"w":4096,"h":8192}, + "scale": "1" +} +} diff --git a/jellytruck/assets/menu/left.png b/jellytruck/assets/menu/left.png new file mode 100644 index 0000000000000000000000000000000000000000..32fb50910046ca0a6d37d3c8ee6d81b9b18be930 Binary files /dev/null and b/jellytruck/assets/menu/left.png differ diff --git a/jellytruck/assets/menu/level_bg.png b/jellytruck/assets/menu/level_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..75c94b9444dea5164c813b7980b224105169bc95 Binary files /dev/null and b/jellytruck/assets/menu/level_bg.png differ diff --git a/jellytruck/assets/menu/level_lock.png b/jellytruck/assets/menu/level_lock.png new file mode 100644 index 0000000000000000000000000000000000000000..8993572155183ce7bf5d267c520a4e0b813240f1 Binary files /dev/null and b/jellytruck/assets/menu/level_lock.png differ diff --git a/jellytruck/assets/menu/level_restart.png b/jellytruck/assets/menu/level_restart.png new file mode 100644 index 0000000000000000000000000000000000000000..648e4e8b3e5e8925f7d2e6a5267c4cd7d4da27c2 Binary files /dev/null and b/jellytruck/assets/menu/level_restart.png differ diff --git a/jellytruck/assets/menu/menu_bg.png b/jellytruck/assets/menu/menu_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..b9c5536e9b73c40bba059584e590514127b8601f Binary files /dev/null and b/jellytruck/assets/menu/menu_bg.png differ diff --git a/jellytruck/assets/menu/next_mission.png b/jellytruck/assets/menu/next_mission.png new file mode 100644 index 0000000000000000000000000000000000000000..76991feaa258786ed1664f2c5ab03b3002d0c147 Binary files /dev/null and b/jellytruck/assets/menu/next_mission.png differ diff --git a/jellytruck/assets/menu/option_main_menu.png b/jellytruck/assets/menu/option_main_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..7fc85a43935faf4683a6ba4c022de65f3fa252c8 Binary files /dev/null and b/jellytruck/assets/menu/option_main_menu.png differ diff --git a/jellytruck/assets/menu/options.png b/jellytruck/assets/menu/options.png new file mode 100644 index 0000000000000000000000000000000000000000..f1980537057bad3f84d12f26798ae07c00eaf64c Binary files /dev/null and b/jellytruck/assets/menu/options.png differ diff --git a/jellytruck/assets/menu/options_choose_level.png b/jellytruck/assets/menu/options_choose_level.png new file mode 100644 index 0000000000000000000000000000000000000000..228e65e391e5002552e52b64c8d7993f28395658 Binary files /dev/null and b/jellytruck/assets/menu/options_choose_level.png differ diff --git a/jellytruck/assets/menu/options_popup.png b/jellytruck/assets/menu/options_popup.png new file mode 100644 index 0000000000000000000000000000000000000000..ee5a16daf4e3850b4c349aaea47d6458cda9cf0a Binary files /dev/null and b/jellytruck/assets/menu/options_popup.png differ diff --git a/jellytruck/assets/menu/paint.png b/jellytruck/assets/menu/paint.png new file mode 100644 index 0000000000000000000000000000000000000000..0d62a07ed648bf149419b49d36cdcbd3aaa39f2a Binary files /dev/null and b/jellytruck/assets/menu/paint.png differ diff --git a/jellytruck/assets/menu/pause.png b/jellytruck/assets/menu/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..dcb36439e2d2fa0c3b6ee6460008c04ab2961682 Binary files /dev/null and b/jellytruck/assets/menu/pause.png differ diff --git a/jellytruck/assets/menu/play.png b/jellytruck/assets/menu/play.png new file mode 100644 index 0000000000000000000000000000000000000000..6a76129dea212f0572141350feec30606acfddab Binary files /dev/null and b/jellytruck/assets/menu/play.png differ diff --git a/jellytruck/assets/menu/radio_button.png b/jellytruck/assets/menu/radio_button.png new file mode 100644 index 0000000000000000000000000000000000000000..fdb10ea6e984ce44ac3ae7f01a8623708daa6b6f Binary files /dev/null and b/jellytruck/assets/menu/radio_button.png differ diff --git a/jellytruck/assets/menu/restart.png b/jellytruck/assets/menu/restart.png new file mode 100644 index 0000000000000000000000000000000000000000..9f7819417f923085c3ebdad60d98ad6dc6ad2784 Binary files /dev/null and b/jellytruck/assets/menu/restart.png differ diff --git a/jellytruck/assets/menu/right.png b/jellytruck/assets/menu/right.png new file mode 100644 index 0000000000000000000000000000000000000000..31a52dc0101843d59cc10a21450aa5fe53319a12 Binary files /dev/null and b/jellytruck/assets/menu/right.png differ diff --git a/jellytruck/assets/menu/sound.png b/jellytruck/assets/menu/sound.png new file mode 100644 index 0000000000000000000000000000000000000000..5ab353731eef25a280d88425c573917a67d7fcc0 Binary files /dev/null and b/jellytruck/assets/menu/sound.png differ diff --git a/jellytruck/assets/menu/star01.png b/jellytruck/assets/menu/star01.png new file mode 100644 index 0000000000000000000000000000000000000000..a32cbcd7311733cce508b85b615eef9691d4e925 Binary files /dev/null and b/jellytruck/assets/menu/star01.png differ diff --git a/jellytruck/assets/menu/star02.png b/jellytruck/assets/menu/star02.png new file mode 100644 index 0000000000000000000000000000000000000000..c314d4494c1170ba6a5abc5f5d3c1a4d10a9fdcd Binary files /dev/null and b/jellytruck/assets/menu/star02.png differ diff --git a/jellytruck/assets/menu/stop_img.png b/jellytruck/assets/menu/stop_img.png new file mode 100644 index 0000000000000000000000000000000000000000..4da7874606ed88dd5fd20d46ba9c3c9af63427cb Binary files /dev/null and b/jellytruck/assets/menu/stop_img.png differ diff --git a/jellytruck/assets/menu/title.png b/jellytruck/assets/menu/title.png new file mode 100644 index 0000000000000000000000000000000000000000..c1aa3b2cc124c4593e2c68f3164085cc70639c2f Binary files /dev/null and b/jellytruck/assets/menu/title.png differ diff --git a/jellytruck/assets/menu/yellow_leaf.png b/jellytruck/assets/menu/yellow_leaf.png new file mode 100644 index 0000000000000000000000000000000000000000..c5e6cd30cfe4fe082dcbf79a31b510c9f0b42dbf Binary files /dev/null and b/jellytruck/assets/menu/yellow_leaf.png differ diff --git a/jellytruck/assets/scene/menu_scene.png b/jellytruck/assets/scene/menu_scene.png new file mode 100644 index 0000000000000000000000000000000000000000..812745dd934b6edbb758af9c2e20c660e245d7fe Binary files /dev/null and b/jellytruck/assets/scene/menu_scene.png differ diff --git a/jellytruck/assets/scene/scene_1.png b/jellytruck/assets/scene/scene_1.png new file mode 100644 index 0000000000000000000000000000000000000000..5259e23421b9fe269f2f8c5f8e25f61d065584e8 Binary files /dev/null and b/jellytruck/assets/scene/scene_1.png differ diff --git a/jellytruck/assets/scene/scene_10.png b/jellytruck/assets/scene/scene_10.png new file mode 100644 index 0000000000000000000000000000000000000000..fb0ef61c6646eb6037d4599adad6e1761fbf39a5 --- /dev/null +++ b/jellytruck/assets/scene/scene_10.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db20099ea9d8d54e74736d4ea7d29a5bf701258f11fac0ceeef01668948eba7a +size 1271131 diff --git a/jellytruck/assets/scene/scene_11.png b/jellytruck/assets/scene/scene_11.png new file mode 100644 index 0000000000000000000000000000000000000000..aefa1541610c0c11b932beb2be50bddd0e7e01c9 --- /dev/null +++ b/jellytruck/assets/scene/scene_11.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4422b07c56c40ee28f9dc7d489c168abdde05d2409b7f83d63c1c700ca276f05 +size 1191194 diff --git a/jellytruck/assets/scene/scene_12.png b/jellytruck/assets/scene/scene_12.png new file mode 100644 index 0000000000000000000000000000000000000000..5f48095f6b3ae156dbaf02120a22ceefe5bc0587 Binary files /dev/null and b/jellytruck/assets/scene/scene_12.png differ diff --git a/jellytruck/assets/scene/scene_13.png b/jellytruck/assets/scene/scene_13.png new file mode 100644 index 0000000000000000000000000000000000000000..ff7778fa1772e9d10f515b59c4931a743a43357e Binary files /dev/null and b/jellytruck/assets/scene/scene_13.png differ diff --git a/jellytruck/assets/scene/scene_14.png b/jellytruck/assets/scene/scene_14.png new file mode 100644 index 0000000000000000000000000000000000000000..6682d2d3dec7899e93a2f32be9fe43cece22b6bd Binary files /dev/null and b/jellytruck/assets/scene/scene_14.png differ diff --git a/jellytruck/assets/scene/scene_15.png b/jellytruck/assets/scene/scene_15.png new file mode 100644 index 0000000000000000000000000000000000000000..a0d0e11c6042ba2eb62b662bbd6e5cb4b6f20211 --- /dev/null +++ b/jellytruck/assets/scene/scene_15.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28b7c5d2268430f9abbb0bfb9728ace17c176b94febc9197d1924cbf410b6885 +size 2651266 diff --git a/jellytruck/assets/scene/scene_16.png b/jellytruck/assets/scene/scene_16.png new file mode 100644 index 0000000000000000000000000000000000000000..8c1ae177e22d6d2f67cb97753119641abd8f2aee --- /dev/null +++ b/jellytruck/assets/scene/scene_16.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06097e25cb5f2dcd4e19b79353d0e386959369f9d9d15288a64627464b17a9ec +size 1020673 diff --git a/jellytruck/assets/scene/scene_17.png b/jellytruck/assets/scene/scene_17.png new file mode 100644 index 0000000000000000000000000000000000000000..fba9d30291ff29a0a4e0dbcd0120250c8bfa2c50 Binary files /dev/null and b/jellytruck/assets/scene/scene_17.png differ diff --git a/jellytruck/assets/scene/scene_18.png b/jellytruck/assets/scene/scene_18.png new file mode 100644 index 0000000000000000000000000000000000000000..d1a8753a5fd8d58c154d55925162d5031e1c4c49 Binary files /dev/null and b/jellytruck/assets/scene/scene_18.png differ diff --git a/jellytruck/assets/scene/scene_19.png b/jellytruck/assets/scene/scene_19.png new file mode 100644 index 0000000000000000000000000000000000000000..466184374eb289b790eb28892ef415bb15db395f Binary files /dev/null and b/jellytruck/assets/scene/scene_19.png differ diff --git a/jellytruck/assets/scene/scene_2.png b/jellytruck/assets/scene/scene_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b8da3414a94bfb8c14ed930869ea33dd81622411 Binary files /dev/null and b/jellytruck/assets/scene/scene_2.png differ diff --git a/jellytruck/assets/scene/scene_20.png b/jellytruck/assets/scene/scene_20.png new file mode 100644 index 0000000000000000000000000000000000000000..37c5137a9487d54efb5d4620f50173f063c9cb96 Binary files /dev/null and b/jellytruck/assets/scene/scene_20.png differ diff --git a/jellytruck/assets/scene/scene_3.png b/jellytruck/assets/scene/scene_3.png new file mode 100644 index 0000000000000000000000000000000000000000..ef48ba473305bdcee371639f242e27e1de7c8c1b Binary files /dev/null and b/jellytruck/assets/scene/scene_3.png differ diff --git a/jellytruck/assets/scene/scene_4.png b/jellytruck/assets/scene/scene_4.png new file mode 100644 index 0000000000000000000000000000000000000000..e6a360fce23706557d1fdf79acac961bc18dcc5b Binary files /dev/null and b/jellytruck/assets/scene/scene_4.png differ diff --git a/jellytruck/assets/scene/scene_5.png b/jellytruck/assets/scene/scene_5.png new file mode 100644 index 0000000000000000000000000000000000000000..a06ec46d8bf393aeedbb84f5e9a7aa1c3a0581e8 Binary files /dev/null and b/jellytruck/assets/scene/scene_5.png differ diff --git a/jellytruck/assets/scene/scene_5_2.png b/jellytruck/assets/scene/scene_5_2.png new file mode 100644 index 0000000000000000000000000000000000000000..61aa849527a02155f42467eaabba600e7b4817a2 Binary files /dev/null and b/jellytruck/assets/scene/scene_5_2.png differ diff --git a/jellytruck/assets/scene/scene_6.png b/jellytruck/assets/scene/scene_6.png new file mode 100644 index 0000000000000000000000000000000000000000..d0d530777d2621bbf547208d9025be5e999e29e8 Binary files /dev/null and b/jellytruck/assets/scene/scene_6.png differ diff --git a/jellytruck/assets/scene/scene_7.png b/jellytruck/assets/scene/scene_7.png new file mode 100644 index 0000000000000000000000000000000000000000..4ce1caccdd7a4758aef29d5cbd5e8bbfd48f5f3a Binary files /dev/null and b/jellytruck/assets/scene/scene_7.png differ diff --git a/jellytruck/assets/scene/scene_8.png b/jellytruck/assets/scene/scene_8.png new file mode 100644 index 0000000000000000000000000000000000000000..c843e9e74de6a357c763f244798cc8dc8db40974 Binary files /dev/null and b/jellytruck/assets/scene/scene_8.png differ diff --git a/jellytruck/assets/scene/scene_9.png b/jellytruck/assets/scene/scene_9.png new file mode 100644 index 0000000000000000000000000000000000000000..f7d3a7994dfe0b1d5509c7be8ce3f8d9456f70cd Binary files /dev/null and b/jellytruck/assets/scene/scene_9.png differ diff --git a/jellytruck/assets/sounds/mp3/100_truck_bang2.mp3 b/jellytruck/assets/sounds/mp3/100_truck_bang2.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..104d6de531bb63e84f850325756c3cf892d12b39 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/100_truck_bang2.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/62_yeah.mp3 b/jellytruck/assets/sounds/mp3/62_yeah.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..d736527a92e1dbbbf7cf4594b269ac0addb35eac Binary files /dev/null and b/jellytruck/assets/sounds/mp3/62_yeah.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/68_zvuk_click.mp3 b/jellytruck/assets/sounds/mp3/68_zvuk_click.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..92f6507bda0f754040ef6bdf37c67f4b82c6a714 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/68_zvuk_click.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/70_truck_hit.mp3 b/jellytruck/assets/sounds/mp3/70_truck_hit.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..437d1c1e4110f5f1974e4b44886f97171f241d6a Binary files /dev/null and b/jellytruck/assets/sounds/mp3/70_truck_hit.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/74_melodia2.mp3 b/jellytruck/assets/sounds/mp3/74_melodia2.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..87fb64a06aa7bdcfa9cff7009e203dd57ed96479 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/74_melodia2.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/77_truck_start.mp3 b/jellytruck/assets/sounds/mp3/77_truck_start.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..4bb456c66a090812fdc8b24085c081d0cb3e288c Binary files /dev/null and b/jellytruck/assets/sounds/mp3/77_truck_start.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/79_auto_crash4.mp3 b/jellytruck/assets/sounds/mp3/79_auto_crash4.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..9a51d2a7298df3b9f321329af760269f696c43a0 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/79_auto_crash4.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/80_truck_speed.mp3 b/jellytruck/assets/sounds/mp3/80_truck_speed.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..3fceee2fb862c3c6dc9d6dd6008ea0f2e4ef820b Binary files /dev/null and b/jellytruck/assets/sounds/mp3/80_truck_speed.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/81_wo33.mp3 b/jellytruck/assets/sounds/mp3/81_wo33.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..e9fe9f64183e4abe2fe697129213589a09fc3dff Binary files /dev/null and b/jellytruck/assets/sounds/mp3/81_wo33.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/82_wo22.mp3 b/jellytruck/assets/sounds/mp3/82_wo22.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..a7c9861bd8120cdff2510555c8dce56040e9f4e2 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/82_wo22.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/83_wo11.mp3 b/jellytruck/assets/sounds/mp3/83_wo11.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..85b8790adfc04545bcd55cd3e738da5d23e491db Binary files /dev/null and b/jellytruck/assets/sounds/mp3/83_wo11.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/84_truck_slow.mp3 b/jellytruck/assets/sounds/mp3/84_truck_slow.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..e040b795f80c8b2f991d891c905b5f9d3d3b9380 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/84_truck_slow.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/92_melodia2a.mp3 b/jellytruck/assets/sounds/mp3/92_melodia2a.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..b227895f08393eb0b7de407dc272a4e366fb0576 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/92_melodia2a.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/93_melodia1.mp3 b/jellytruck/assets/sounds/mp3/93_melodia1.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..330ee401e84191b8e433e02c35af4e66d4dca560 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/93_melodia1.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/94_truck_idle.mp3 b/jellytruck/assets/sounds/mp3/94_truck_idle.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..4da365c092be51c8797fc6d81b24adbb241d9e65 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/94_truck_idle.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/95_auto_crash2.mp3 b/jellytruck/assets/sounds/mp3/95_auto_crash2.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..ce9c07dab955908b9184033e30d9a70e450dcefa Binary files /dev/null and b/jellytruck/assets/sounds/mp3/95_auto_crash2.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/97_zvuk_odraz.mp3 b/jellytruck/assets/sounds/mp3/97_zvuk_odraz.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..02ae0518f36d1127f6802689dba9a5280110c84b Binary files /dev/null and b/jellytruck/assets/sounds/mp3/97_zvuk_odraz.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/98_zvuk_over.mp3 b/jellytruck/assets/sounds/mp3/98_zvuk_over.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..ac4fbe9baf738c3f91c2cce25e8ad22ec191ec74 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/98_zvuk_over.mp3 differ diff --git a/jellytruck/assets/sounds/mp3/99_truck_bang1.mp3 b/jellytruck/assets/sounds/mp3/99_truck_bang1.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..9fb4d82fba8e6a8504d45a0f593017cca4d99914 Binary files /dev/null and b/jellytruck/assets/sounds/mp3/99_truck_bang1.mp3 differ diff --git a/jellytruck/assets/texture/Blade_mill.png b/jellytruck/assets/texture/Blade_mill.png new file mode 100644 index 0000000000000000000000000000000000000000..5e3a6cf0c13e22f7130bc003c48268e249f75999 Binary files /dev/null and b/jellytruck/assets/texture/Blade_mill.png differ diff --git a/jellytruck/assets/texture/Box1.png b/jellytruck/assets/texture/Box1.png new file mode 100644 index 0000000000000000000000000000000000000000..beac2d48aef3131ffdbe84d00b48ad59e26d84cb Binary files /dev/null and b/jellytruck/assets/texture/Box1.png differ diff --git a/jellytruck/assets/texture/Box2.png b/jellytruck/assets/texture/Box2.png new file mode 100644 index 0000000000000000000000000000000000000000..725e9c00fd1c2a36f9ef0046ed0250b394119c4f Binary files /dev/null and b/jellytruck/assets/texture/Box2.png differ diff --git a/jellytruck/assets/texture/arrow14.png b/jellytruck/assets/texture/arrow14.png new file mode 100644 index 0000000000000000000000000000000000000000..83fe603288d2158a133115ca40d077a076bff38a Binary files /dev/null and b/jellytruck/assets/texture/arrow14.png differ diff --git a/jellytruck/assets/texture/ballIcon13.png b/jellytruck/assets/texture/ballIcon13.png new file mode 100644 index 0000000000000000000000000000000000000000..b3f3c5f33b489fe6401513abb1df7679c6ebb5cb Binary files /dev/null and b/jellytruck/assets/texture/ballIcon13.png differ diff --git a/jellytruck/assets/texture/balloonburst.png b/jellytruck/assets/texture/balloonburst.png new file mode 100644 index 0000000000000000000000000000000000000000..72faef7c690f8e60152e409d07934e4e10459a59 Binary files /dev/null and b/jellytruck/assets/texture/balloonburst.png differ diff --git a/jellytruck/assets/texture/bar17.png b/jellytruck/assets/texture/bar17.png new file mode 100644 index 0000000000000000000000000000000000000000..b492e881891418a69a3097d4709825c1754b3410 Binary files /dev/null and b/jellytruck/assets/texture/bar17.png differ diff --git a/jellytruck/assets/texture/barWheel17.png b/jellytruck/assets/texture/barWheel17.png new file mode 100644 index 0000000000000000000000000000000000000000..3bf72420552254b93a8e7215de3f71660a6edfa9 Binary files /dev/null and b/jellytruck/assets/texture/barWheel17.png differ diff --git a/jellytruck/assets/texture/bolt.png b/jellytruck/assets/texture/bolt.png new file mode 100644 index 0000000000000000000000000000000000000000..dbff28e557eca8be4bee9e226d538bb9d3b99131 Binary files /dev/null and b/jellytruck/assets/texture/bolt.png differ diff --git a/jellytruck/assets/texture/bolt12.png b/jellytruck/assets/texture/bolt12.png new file mode 100644 index 0000000000000000000000000000000000000000..3a63f27f45813c9dfd51b38593074ff9791fd5b2 Binary files /dev/null and b/jellytruck/assets/texture/bolt12.png differ diff --git a/jellytruck/assets/texture/box17_long.png b/jellytruck/assets/texture/box17_long.png new file mode 100644 index 0000000000000000000000000000000000000000..ceaf86839c014802db6c111880a30cbb3aeeed2a Binary files /dev/null and b/jellytruck/assets/texture/box17_long.png differ diff --git a/jellytruck/assets/texture/box17_small.png b/jellytruck/assets/texture/box17_small.png new file mode 100644 index 0000000000000000000000000000000000000000..011d001ea5a4db9fc2b5ee57d122c525ef458708 Binary files /dev/null and b/jellytruck/assets/texture/box17_small.png differ diff --git a/jellytruck/assets/texture/bridge12.png b/jellytruck/assets/texture/bridge12.png new file mode 100644 index 0000000000000000000000000000000000000000..a871493bd29d868659a657e9a3c034daf0246708 Binary files /dev/null and b/jellytruck/assets/texture/bridge12.png differ diff --git a/jellytruck/assets/texture/bridge15.png b/jellytruck/assets/texture/bridge15.png new file mode 100644 index 0000000000000000000000000000000000000000..fe79fdb97f0ae652a1957ed16eaf3a2b0c62248a Binary files /dev/null and b/jellytruck/assets/texture/bridge15.png differ diff --git a/jellytruck/assets/texture/bridge17.png b/jellytruck/assets/texture/bridge17.png new file mode 100644 index 0000000000000000000000000000000000000000..2b595603e197df5255c4c31251c675c1c8726d77 Binary files /dev/null and b/jellytruck/assets/texture/bridge17.png differ diff --git a/jellytruck/assets/texture/bridge18.png b/jellytruck/assets/texture/bridge18.png new file mode 100644 index 0000000000000000000000000000000000000000..1b3b13614b5c523c4dec423d752e08d394ba6952 Binary files /dev/null and b/jellytruck/assets/texture/bridge18.png differ diff --git a/jellytruck/assets/texture/bridge2.png b/jellytruck/assets/texture/bridge2.png new file mode 100644 index 0000000000000000000000000000000000000000..a8e5083b6cff9e3c9a9ba06ef0751ea29d53ef66 Binary files /dev/null and b/jellytruck/assets/texture/bridge2.png differ diff --git a/jellytruck/assets/texture/crusher0001.png b/jellytruck/assets/texture/crusher0001.png new file mode 100644 index 0000000000000000000000000000000000000000..4a8b730f0f41be7360ed4ecbeb5361d2b48fcd17 Binary files /dev/null and b/jellytruck/assets/texture/crusher0001.png differ diff --git a/jellytruck/assets/texture/crusher0002.png b/jellytruck/assets/texture/crusher0002.png new file mode 100644 index 0000000000000000000000000000000000000000..437f968fc7af9cd751cc130ca847c51603ca8e66 Binary files /dev/null and b/jellytruck/assets/texture/crusher0002.png differ diff --git a/jellytruck/assets/texture/crusher0005.png b/jellytruck/assets/texture/crusher0005.png new file mode 100644 index 0000000000000000000000000000000000000000..4511a1db0727808e01b8f7200c6510c501b939a1 Binary files /dev/null and b/jellytruck/assets/texture/crusher0005.png differ diff --git a/jellytruck/assets/texture/dark_orange_ver_bar.png b/jellytruck/assets/texture/dark_orange_ver_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..0459deed8c0f356ab2e58ef284bdd56b2d18a6d1 Binary files /dev/null and b/jellytruck/assets/texture/dark_orange_ver_bar.png differ diff --git a/jellytruck/assets/texture/down_arrow.png b/jellytruck/assets/texture/down_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..f06f1e4785a41c4304703c7789245895f74739e0 Binary files /dev/null and b/jellytruck/assets/texture/down_arrow.png differ diff --git a/jellytruck/assets/texture/flag_bot.png b/jellytruck/assets/texture/flag_bot.png new file mode 100644 index 0000000000000000000000000000000000000000..79d8aaa54dc809882608f1551097efdb60d84a1a Binary files /dev/null and b/jellytruck/assets/texture/flag_bot.png differ diff --git a/jellytruck/assets/texture/flag_head.png b/jellytruck/assets/texture/flag_head.png new file mode 100644 index 0000000000000000000000000000000000000000..391e12b0c7b0407f0afc26f1553be2e268549b31 Binary files /dev/null and b/jellytruck/assets/texture/flag_head.png differ diff --git a/jellytruck/assets/texture/flag_mid.png b/jellytruck/assets/texture/flag_mid.png new file mode 100644 index 0000000000000000000000000000000000000000..ad12b2ce37e517bda71acf9928f7933732c735b9 Binary files /dev/null and b/jellytruck/assets/texture/flag_mid.png differ diff --git a/jellytruck/assets/texture/gum_1.png b/jellytruck/assets/texture/gum_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b3384ff8beea1ed5f9d955c99245d6aa06a8d152 Binary files /dev/null and b/jellytruck/assets/texture/gum_1.png differ diff --git a/jellytruck/assets/texture/gum_2.png b/jellytruck/assets/texture/gum_2.png new file mode 100644 index 0000000000000000000000000000000000000000..c7ef672a4d1f9dcd40a637c1dbca0ac621be92a8 Binary files /dev/null and b/jellytruck/assets/texture/gum_2.png differ diff --git a/jellytruck/assets/texture/gum_3.png b/jellytruck/assets/texture/gum_3.png new file mode 100644 index 0000000000000000000000000000000000000000..0a0b21b7a1f15751f0dd1b1ff70cfa569f5e28c9 Binary files /dev/null and b/jellytruck/assets/texture/gum_3.png differ diff --git a/jellytruck/assets/texture/gum_4.png b/jellytruck/assets/texture/gum_4.png new file mode 100644 index 0000000000000000000000000000000000000000..0d3b19f43269a4140d555a4ee5c29180880ef32a Binary files /dev/null and b/jellytruck/assets/texture/gum_4.png differ diff --git a/jellytruck/assets/texture/gum_5.png b/jellytruck/assets/texture/gum_5.png new file mode 100644 index 0000000000000000000000000000000000000000..0e846983420b28a7b591c455b3f38206273fa7e9 Binary files /dev/null and b/jellytruck/assets/texture/gum_5.png differ diff --git a/jellytruck/assets/texture/gum_6.png b/jellytruck/assets/texture/gum_6.png new file mode 100644 index 0000000000000000000000000000000000000000..a59636690a9c07d976bd888e015aa0dafc033ca5 Binary files /dev/null and b/jellytruck/assets/texture/gum_6.png differ diff --git a/jellytruck/assets/texture/gum_7.png b/jellytruck/assets/texture/gum_7.png new file mode 100644 index 0000000000000000000000000000000000000000..46f904253faec08ce8b9bbb0cbb0eeec2983d587 Binary files /dev/null and b/jellytruck/assets/texture/gum_7.png differ diff --git a/jellytruck/assets/texture/hallow.png b/jellytruck/assets/texture/hallow.png new file mode 100644 index 0000000000000000000000000000000000000000..ce1fbd290dc4be53dc0a9b6015c9cbaedd748224 Binary files /dev/null and b/jellytruck/assets/texture/hallow.png differ diff --git a/jellytruck/assets/texture/level_8_door_1.png b/jellytruck/assets/texture/level_8_door_1.png new file mode 100644 index 0000000000000000000000000000000000000000..4493e32b298c4d02b414ba1c073fdc10b0f9b1be Binary files /dev/null and b/jellytruck/assets/texture/level_8_door_1.png differ diff --git a/jellytruck/assets/texture/level_8_door_2.png b/jellytruck/assets/texture/level_8_door_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a4cee237055756f78f3d52860123c350aebe554a Binary files /dev/null and b/jellytruck/assets/texture/level_8_door_2.png differ diff --git a/jellytruck/assets/texture/mill1.png b/jellytruck/assets/texture/mill1.png new file mode 100644 index 0000000000000000000000000000000000000000..f00835368527a20f318b01db839fee85be5ff245 Binary files /dev/null and b/jellytruck/assets/texture/mill1.png differ diff --git a/jellytruck/assets/texture/mill17_1.png b/jellytruck/assets/texture/mill17_1.png new file mode 100644 index 0000000000000000000000000000000000000000..69b41d406ee6c587197d84c5e894ccb79491ffe1 Binary files /dev/null and b/jellytruck/assets/texture/mill17_1.png differ diff --git a/jellytruck/assets/texture/mill17_2.png b/jellytruck/assets/texture/mill17_2.png new file mode 100644 index 0000000000000000000000000000000000000000..da080ca50955d21ae00cb02bb1e464a13ea15e7a Binary files /dev/null and b/jellytruck/assets/texture/mill17_2.png differ diff --git a/jellytruck/assets/texture/mill18_2.png b/jellytruck/assets/texture/mill18_2.png new file mode 100644 index 0000000000000000000000000000000000000000..76b673cc773b64b09373f034d08a6a5e7e66f7b4 Binary files /dev/null and b/jellytruck/assets/texture/mill18_2.png differ diff --git a/jellytruck/assets/texture/mill18_3.png b/jellytruck/assets/texture/mill18_3.png new file mode 100644 index 0000000000000000000000000000000000000000..33b7493e9ffc33a9d290076f21237bf3fd1d855e Binary files /dev/null and b/jellytruck/assets/texture/mill18_3.png differ diff --git a/jellytruck/assets/texture/mill2.png b/jellytruck/assets/texture/mill2.png new file mode 100644 index 0000000000000000000000000000000000000000..e6c3c65c336ba62fddb7b071fbd2cc815a23ac5c Binary files /dev/null and b/jellytruck/assets/texture/mill2.png differ diff --git a/jellytruck/assets/texture/mill3.png b/jellytruck/assets/texture/mill3.png new file mode 100644 index 0000000000000000000000000000000000000000..7a79eaae65620632949336601921afc7bc4f9ec3 Binary files /dev/null and b/jellytruck/assets/texture/mill3.png differ diff --git a/jellytruck/assets/texture/orange_hor_bar.png b/jellytruck/assets/texture/orange_hor_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd5808a1a3e8ea74794cb2403a002eefefdae5a Binary files /dev/null and b/jellytruck/assets/texture/orange_hor_bar.png differ diff --git a/jellytruck/assets/texture/platform_mark.png b/jellytruck/assets/texture/platform_mark.png new file mode 100644 index 0000000000000000000000000000000000000000..a71ae758add35e8a699e7962310b45fb2edbb519 Binary files /dev/null and b/jellytruck/assets/texture/platform_mark.png differ diff --git a/jellytruck/assets/texture/red_ver_bar.png b/jellytruck/assets/texture/red_ver_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..931df56142f02bf015707f0f510859f280cef501 Binary files /dev/null and b/jellytruck/assets/texture/red_ver_bar.png differ diff --git a/jellytruck/assets/texture/rope1.png b/jellytruck/assets/texture/rope1.png new file mode 100644 index 0000000000000000000000000000000000000000..f991ec9f908a77631b2c42847820d8e58c63cdaa Binary files /dev/null and b/jellytruck/assets/texture/rope1.png differ diff --git a/jellytruck/assets/texture/small_orange_ver_bar.png b/jellytruck/assets/texture/small_orange_ver_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..01f707ffd30fbed3a3fe6f3617e764e425d4c1f2 Binary files /dev/null and b/jellytruck/assets/texture/small_orange_ver_bar.png differ diff --git a/jellytruck/assets/texture/yellow_hor_bar.png b/jellytruck/assets/texture/yellow_hor_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..936533eb448e653679c95c5147ce9fbb9f3231eb Binary files /dev/null and b/jellytruck/assets/texture/yellow_hor_bar.png differ diff --git a/jellytruck/assets/truck/Truck1.png b/jellytruck/assets/truck/Truck1.png new file mode 100644 index 0000000000000000000000000000000000000000..95a61464896c8fc9a07f27aa8018908d9a22d16d Binary files /dev/null and b/jellytruck/assets/truck/Truck1.png differ diff --git a/jellytruck/assets/truck/Truck2.png b/jellytruck/assets/truck/Truck2.png new file mode 100644 index 0000000000000000000000000000000000000000..efce77ca4a7f87d5c624777f9a116b761d33ec0c Binary files /dev/null and b/jellytruck/assets/truck/Truck2.png differ diff --git a/jellytruck/assets/truck/Truck3.png b/jellytruck/assets/truck/Truck3.png new file mode 100644 index 0000000000000000000000000000000000000000..158c5fab81e1278a2f8005856d34477a5d52bdb5 Binary files /dev/null and b/jellytruck/assets/truck/Truck3.png differ diff --git a/jellytruck/assets/truck/enemy_truck.png b/jellytruck/assets/truck/enemy_truck.png new file mode 100644 index 0000000000000000000000000000000000000000..87bb9749981704ed75ddc89d7d176d5b48412b6d Binary files /dev/null and b/jellytruck/assets/truck/enemy_truck.png differ diff --git a/jellytruck/assets/truck/enemy_wheel_back.png b/jellytruck/assets/truck/enemy_wheel_back.png new file mode 100644 index 0000000000000000000000000000000000000000..8834b30b8346bf6b23cde4568084d37e018c32f6 Binary files /dev/null and b/jellytruck/assets/truck/enemy_wheel_back.png differ diff --git a/jellytruck/assets/truck/enemy_wheel_front.png b/jellytruck/assets/truck/enemy_wheel_front.png new file mode 100644 index 0000000000000000000000000000000000000000..23aeeeb263ae1c89abd513652c1920302bcf84d1 Binary files /dev/null and b/jellytruck/assets/truck/enemy_wheel_front.png differ diff --git a/jellytruck/assets/truck/truck2_icon.png b/jellytruck/assets/truck/truck2_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..74195ce84ccea181ef9ab31665422208d66ce57a Binary files /dev/null and b/jellytruck/assets/truck/truck2_icon.png differ diff --git a/jellytruck/assets/truck/truck3_icon.png b/jellytruck/assets/truck/truck3_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..77bc4e2b5e7bfbddeac4b3a4bdaf820abea209d3 Binary files /dev/null and b/jellytruck/assets/truck/truck3_icon.png differ diff --git a/jellytruck/assets/truck/wheel.png b/jellytruck/assets/truck/wheel.png new file mode 100644 index 0000000000000000000000000000000000000000..6e17a70789c5ca80da475e0660e725fd4d25c155 Binary files /dev/null and b/jellytruck/assets/truck/wheel.png differ diff --git a/jellytruck/css/main.css b/jellytruck/css/main.css new file mode 100644 index 0000000000000000000000000000000000000000..f397ac98d24c8fcbb8eeeef5dd3a7b93f927ba0f --- /dev/null +++ b/jellytruck/css/main.css @@ -0,0 +1,64 @@ +*{ + padding: 0; + margin: 0; + border: none; + user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; + box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; +} +body{ +background-color:#000000; +} +canvas{ + margin: 0 auto; +} +#orientation { + margin: 0 auto; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: url(../assets/Loading/orientation.png); + background-repeat: no-repeat; + background-position: center; + background-color: rgb(0, 0, 0); + z-index: 999; + display: none; + pointer-events:none; + +} +#msg { + margin: 0 auto; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgb(0, 0, 0); + z-index: 999; + display: none; + pointer-events:none; + color:#fff; + font-size: 1.25em; + text-align: center; + padding: 15px; +} +#msg > p{ + padding-top:50px; + font-family: verdana; + width:300px; + margin:auto; +} + +#preload-font { + font-family: 'king_cool_kc', sans-serif; + text-indent: -9999px; + font-size: 0; + } +.ppat-text { + position: absolute; + left: 0; + top: 0; + margin: 0; + font: 16px/1 monospace; +} diff --git a/jellytruck/data b/jellytruck/data new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/jellytruck/data @@ -0,0 +1 @@ + diff --git a/jellytruck/fonts/fonts.css b/jellytruck/fonts/fonts.css new file mode 100644 index 0000000000000000000000000000000000000000..eee5c4b0b92b0067ef719a919dba3960be9cb621 --- /dev/null +++ b/jellytruck/fonts/fonts.css @@ -0,0 +1,8 @@ +@font-face{ + font-family:'king_cool_kc'; + font-style:normal; + font-weight:700; + src:local('king_cool_kc'),local('king_cool_kc'), + url(../fonts/king_cool_kc.woff) format('woff'), + url(../fonts/king_cool_kc.ttf) format('truetype'); +} diff --git a/jellytruck/fonts/king_cool_kc.woff b/jellytruck/fonts/king_cool_kc.woff new file mode 100644 index 0000000000000000000000000000000000000000..f3345a6dc400fcbbb6e04c0d0619e057a8c2a7b0 Binary files /dev/null and b/jellytruck/fonts/king_cool_kc.woff differ diff --git a/jellytruck/index.html b/jellytruck/index.html new file mode 100644 index 0000000000000000000000000000000000000000..cdc800cad7730f7f92a2f7c9f84f5edd5e9d641b --- /dev/null +++ b/jellytruck/index.html @@ -0,0 +1,135 @@ + + + + + JellyTruck + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +

Unfortunately,
Jelly Truck doesn’t work
in your web browser.

Please use a
different browser
and try again!

+
+ + diff --git a/jellytruck/js/Jelly.js b/jellytruck/js/Jelly.js new file mode 100644 index 0000000000000000000000000000000000000000..3a867363e91af8a138cbbc25c2bc147a7d9f990e --- /dev/null +++ b/jellytruck/js/Jelly.js @@ -0,0 +1,859 @@ +var STAND = 0; +var GUM = 1; +var BRIDGE = 2; +var LIFT = 3; +var TRUCK = 4; +var CIRCLE = 5; +var BALLOON = 6; +var WHEEL = 7; +function Jelly(game,tex_name,x,y,map,obj_name,offx,offy,index) +{ + this.game = game; + this._sprite = this.game.add.image(x,y,tex_name); + this._sprite.anchor.set(offx,offy); + this._xp = x; + this._yp = y; + this._bodies =[]; + this._pop ={tx:0,ty:0,tw:0,th:0,ta:0,td:0,tf:0,tb:0,tad:0,tld:0,se:false,fx:false,cb:0,mb:0,ot:0,jot:0,lm:false,jll:0,jul:0,mo:false,msp:0,mtq:0,sp:[],st:false,gr:0,bl:false,arc:0.0}; + this._box; + this._bump; + this._vbump = {tx:0,ty:0,tw:0,th:0}; + this._index = index; + this._mask = this.game.add.graphics(0, 0); + this._createJelly(map,obj_name); + + this.joint; + this.time_trail =0; + this._exSprite; + this._link =[]; + this.object_name = obj_name; + this.renderJelly(); + // this._index=index; + +}; +Jelly.prototype.enablePrimatic = function(ground,low,up,ax,ay) +{ + this._bodyA = ground; + this._bodyB = this._box; + this.la = new box2d.b2Vec2(); + this.lb = new box2d.b2Vec2(); + this._bodyA.toLocalPoint(this.la, new box2d.b2Vec2(this._box.x,this._box.y)); + this._bodyB.toLocalPoint(this.lb, new box2d.b2Vec2(this._box.x,this._box.y)); + this.xs = Math.cos(-40 * Math.PI / 180); + this.ys = Math.sin(-40 * Math.PI / 180); + this.xs = (this.xs * 1000)/1000; + this.ys = (this.ys * 1000)/1000; + this.joint = this.game.physics.box2d.prismaticJoint(this._bodyA,this._bodyB,ax,ay,this.la.x,this.la.y,this.lb.x,this.lb.y,0,0,false,low,up,true); + this.joint.collideConnected = false; +}; +Jelly.prototype.enablePrimatic1 = function(xp,yp,ground,low,up,ax,ay) +{ + this._bodyA = ground; + this._bodyB = this._box; + this.la = new box2d.b2Vec2(); + this.lb = new box2d.b2Vec2(); + this._bodyA.toLocalPoint(this.la, new box2d.b2Vec2(this._box.x,this._box.y)); + this._bodyB.toLocalPoint(this.lb, new box2d.b2Vec2(this._box.x,this._box.y)); + this.xs = Math.cos(-40 * Math.PI / 180); + this.ys = Math.sin(-40 * Math.PI / 180); + this.xs = (this.xs * 1000)/1000; + this.ys = (this.ys * 1000)/1000; + this.joint = this.game.physics.box2d.prismaticJoint(this._bodyA,this._bodyB,ax,ay,xp,yp,this.lb.x,this.lb.y,0,0,false,low,up,true); + this.joint.collideConnected = false; +}; +Jelly.prototype.enableRevolute = function(ground,speed,torque,motor,low,up,limit) +{ + this._bodyA = ground; + this._bodyB = this._box; + this.la = new box2d.b2Vec2(); + this.lb = new box2d.b2Vec2(); + this._bodyA.toLocalPoint(this.la, new box2d.b2Vec2(this._box.x,this._box.y)); + this._bodyB.toLocalPoint(this.lb, new box2d.b2Vec2(this._box.x,this._box.y)); + this.joint = this.game.physics.box2d.revoluteJoint(this._bodyA,this._bodyB,this.la.x,this.la.y,this.lb.x,this.lb.y,speed,torque,motor,low,up,limit); + this.joint.collideConnected = false; +}; +Jelly.prototype.disableJoint = function() +{ + if (this.joint) + this.game.physics.box2d.world.DestroyJoint(this.joint); +}; +Jelly.prototype.disable = function() { + this.disabled = true; + for(var j=0;j 0) + { + this.bodyA = bodyArray[0]; + this.bodyA.toLocalPoint(this.vAnchorA,new box2d.b2Vec2(joint[j].x, joint[j].y)); + this.bodyB = bodyArray[1]; + if(this.bodyA !== undefined && this.bodyB !== undefined ) + { + this.bodyB.toLocalPoint(this.vAnchorB,new box2d.b2Vec2(joint[j].x, joint[j].y)); + this.game.physics.box2d.weldJoint(this.bodyA,this.bodyB);//this.vAnchorA.x,this.vAnchorA.y,this.vAnchorB.x,this.vAnchorB.y); + } + }*/ + } +}; +Jelly.prototype._createJelly = function(map,object) +{ + this._pop = this._findBod3("mid",map,object); + this._addBox(); + // this._createPoly(); + switch(this._pop.ot) + { + case STAND: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + break; + case GUM: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + this._link = this._findJoint("joint",map,object); + this._createJointLink(this._link); + break; + case BRIDGE: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + this._link = this._findJoint("joint",map,object); + this._createJointLink(this._link); + + break; + case LIFT: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + this._link = this._findJoint("joint",map,object); + this._createJointLink(this._link); + break; + case TRUCK: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + this._vbump = this._findbump("center",map,object); + this._addBump(); + this._createBumpLink(this._bodies); + break; + case CIRCLE: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + break; + case BALLOON: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + this._vbump = this._findbump("center",map,object); + this._addBump(); + this._createBumpLink(this._bodies); + break; + case WHEEL: + this._bodies = this._findPoly("bod",map,object); + this.applyJelly(this._bodies); + this._createBoxLink(this._bodies); + this._createinnerLink(this._bodies); + break; + } +}; +Jelly.prototype.renderClose = function() { + for(var j=0;j=4) + { + // alert(v.GetVertexCount); + this.setA(this._body.x-this.game.physics.box2d.mpx(v.m_vertices[0].x),this._body.y-this.game.physics.box2d.mpx(v.m_vertices[0].y)); + this.setB(this._body.x-this.game.physics.box2d.mpx(v.m_vertices[1].x),this._body.y-this.game.physics.box2d.mpx(v.m_vertices[1].y)); + this.setC(this._body.x-this.game.physics.box2d.mpx(v.m_vertices[2].x),this._body.y-this.game.physics.box2d.mpx(v.m_vertices[2].y)); + this.setD(this._body.x-this.game.physics.box2d.mpx(v.m_vertices[3].x),this._body.y-this.game.physics.box2d.mpx(v.m_vertices[3].y)); + } + + + + }*/ +}; +JellyPeace.prototype.setIndex = function(inx) +{ + for (var f = this._body.data.GetFixtureList(); f; f = f.GetNext()) + { + var filter = f.GetFilterData(); + filter.groupIndex = inx; + } +}; +JellyPeace.prototype.setSpojene = function(val) +{ + this.sopjene = val; +}; +JellyPeace.prototype.getSpojene = function() +{ + return this.sopjene; +}; +JellyPeace.prototype.getBeta = function() +{ + return this.beta; +}; +JellyPeace.prototype.getX = function() +{ + return this._body.x; +}; +JellyPeace.prototype.getY = function() +{ + return this._body.y; +}; +JellyPeace.prototype.destroy = function(game) +{ + if(this._body!=null) + game.physics.box2d.world.DestroyBody(this._body); +}; +JellyPeace.prototype.getBody = function() +{ + return this._body; +}; + +/*JellyPeace.prototype.getA = function() +{ + return this._pA; +}; +JellyPeace.prototype.getB = function() +{ + return this._pB; +}; +JellyPeace.prototype.getC = function() +{ + return this._pC; +}; +JellyPeace.prototype.getD = function() +{ + return this._pD; +}; + +JellyPeace.prototype.setA = function(x,y) { + this._pA.x = x; + this._pA.y = y; +}; +JellyPeace.prototype.setB = function(x,y) { + this._pB.x = x; + this._pB.y = y; +}; +JellyPeace.prototype.setC = function(x,y) { + this._pC.x = x; + this._pC.y = y; +}; +JellyPeace.prototype.setD = function(x,y) { + this._pD.x = x; + this._pD.y = y; +};*/ diff --git a/jellytruck/js/data/Level01.json b/jellytruck/js/data/Level01.json new file mode 100644 index 0000000000000000000000000000000000000000..92c4646671b8265e8d40fa591f47e770f7e7e05c ---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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":37, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":88, + "x":0, + "y":0 + }, + { + "image":"ground_1_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":304, + "id":54, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":432, + "x":4320, + "y":1826 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":53, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":5391, + "y":1713 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":40, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112, + "y":0 + }, + { + "x":113, + "y":197 + }, + { + "x":0, + "y":197 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":757, + "y":1541 + }, + { + "height":0, + "id":41, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":111, + "y":1 + }, + { + "x":112, + "y":196 + }, + { + "x":-2, + "y":197 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1726, + "y":1598 + }, + { + "height":0, + "id":42, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":113, + "y":-1 + }, + { + "x":114, + "y":199 + }, + { + "x":-2, + "y":198 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3258, + "y":1474 + }, + { + "height":0, + "id":43, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":115, + "y":-1 + }, + { + "x":113, + "y":195 + }, + { + "x":-1, + "y":198 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4673, + "y":1514 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":12.75, + "id":44, + "name":"", + "properties": + { + "obj_name":"Triangle1", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":13.25, + "x":674.5, + "y":1743.5 + }, + { + "height":17.75, + "id":45, + "name":"", + "properties": + { + "obj_name":"Triangle2", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":16.75, + "x":1469.75, + "y":1796 + }, + { + "height":17.75, + "id":46, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.75, + "x":1540.25, + "y":1775 + }, + { + "height":31, + "id":47, + "name":"", + "properties": + { + "obj_name":"Cube3", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":13, + "x":1579.5, + "y":1678 + }, + { + "height":15.75, + "id":48, + "name":"", + "properties": + { + "obj_name":"Cube2", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":26.5, + "x":2965, + "y":1648.75 + }, + { + "height":18.25, + "id":49, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.5, + "x":3085.5, + "y":1639.25 + }, + { + "height":30.75, + "id":50, + "name":"", + "properties": + { + "obj_name":"Cube3", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":13, + "x":3133.5, + "y":1546.5 + }, + { + "height":18, + "id":51, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.25, + "x":3181, + "y":1639.5 + }, + { + "height":18.5, + "id":52, + "name":"", + "properties": + { + "obj_name":"Shape1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":11.25, + "x":4297.25, + "y":1552 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":16, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":46, + "y":-23.3333 + }, + { + "x":111.333, + "y":-46.6667 + }, + { + "x":166, + "y":-55.3333 + }, + { + "x":207.333, + "y":-55.3333 + }, + { + "x":252.667, + "y":-49.3333 + }, + { + "x":298, + "y":-37.3333 + }, + { + "x":344, + "y":-18.6667 + }, + { + "x":373.333, + "y":-3.33333 + }, + { + "x":431.333, + "y":20.6667 + }, + { + "x":490, + "y":36.6667 + }, + { + "x":564.25, + "y":43.1667 + }, + { + "x":631.583, + "y":43.6667 + }, + { + "x":693.333, + "y":30 + }, + { + "x":754, + "y":12 + }, + { + "x":811.333, + "y":-10.6667 + }, + { + "x":865.333, + "y":-37.3333 + }, + { + "x":910.667, + "y":-54 + }, + { + "x":958.667, + "y":-61.3333 + }, + { + "x":1002, + "y":-58.6667 + }, + { + "x":1044, + "y":-48.6667 + }, + { + "x":1086.67, + "y":-30 + }, + { + "x":1126, + "y":-4.66667 + }, + { + "x":1171.33, + "y":26 + }, + { + "x":1218.67, + "y":55.75 + }, + { + "x":1268.5, + "y":82.3333 + }, + { + "x":1312.67, + "y":100 + }, + { + "x":1375.25, + "y":115.083 + }, + { + "x":1455.08, + "y":121.333 + }, + { + "x":1520.25, + "y":123 + }, + { + "x":1604.92, + "y":112.417 + }, + { + "x":1666.92, + "y":93.5 + }, + { + "x":1744, + "y":71.3333 + }, + { + "x":1816.67, + "y":42 + }, + { + "x":1882, + "y":13.3333 + }, + { + "x":1929.33, + "y":-8.66667 + }, + { + "x":1966.67, + "y":-23.3333 + }, + { + "x":2021.33, + "y":-33.3333 + }, + { + "x":2090.67, + "y":-40 + }, + { + "x":2158, + "y":-44 + }, + { + "x":2281.33, + "y":-48.6667 + }, + { + "x":2415.33, + "y":-50.6667 + }, + { + "x":2541.33, + "y":-51.3333 + }, + { + "x":2700.67, + "y":-52 + }, + { + "x":2809.33, + "y":-50.6667 + }, + { + "x":3086, + "y":-46 + }, + { + "x":3312, + "y":-40 + }, + { + "x":3539.33, + "y":-34.6667 + }, + { + "x":3748, + "y":-27.3333 + }, + { + "x":4035.33, + "y":-18 + }, + { + "x":4334.67, + "y":-18 + }, + { + "x":4336, + "y":694 + }, + { + "x":4518.67, + "y":703.333 + }, + { + "x":4529.33, + "y":-4 + }, + { + "x":4734, + "y":-15.3333 + }, + { + "x":4864.67, + "y":-20 + }, + { + "x":5028.67, + "y":-24.6667 + }, + { + "x":5226, + "y":-30.6667 + }, + { + "x":5397.33, + "y":-34.6667 + }, + { + "x":5682.67, + "y":-27.3333 + }, + { + "x":5872, + "y":-20 + }, + { + "x":6088.67, + "y":-16 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":90.6667, + "y":1744 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2669.94, + "id":17, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":149.485, + "x":5.9093, + "y":-4.48467 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.6667, + "id":20, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":70.6667, + "x":295.33, + "y":1510.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":33, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":461.333, + "y":136 + }, + { + "x":424, + "y":258.667 + }, + { + "x":-38.6667, + "y":121.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":329.333, + "y":1704 + }, + { + "height":0, + "id":34, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":901.333, + "y":1.33333 + }, + { + "x":901.333, + "y":129.333 + }, + { + "x":4, + "y":128 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":269.333, + "y":1786.67 + }, + { + "height":0, + "id":35, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":461.333, + "y":-136 + }, + { + "x":500, + "y":-10.6667 + }, + { + "x":33.3333, + "y":122.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":578.667, + "y":1838.67 + }, + { + "height":0, + "id":36, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":458.667, + "y":152 + }, + { + "x":418.667, + "y":270.667 + }, + { + "x":-40, + "y":121.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1221.33, + "y":1778.67 + }, + { + "height":0, + "id":37, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":478.667, + "y":34.6667 + }, + { + "x":469.333, + "y":160 + }, + { + "x":-14.6667, + "y":125.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1239.75, + "y":1842.92 + }, + { + "height":0, + "id":38, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54.6667, + "y":-1.33333 + }, + { + "x":64, + "y":337.333 + }, + { + "x":13.3333, + "y":338.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4203.67, + "y":1174.67 + }, + { + "height":0, + "id":39, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54.6667, + "y":-1.33333 + }, + { + "x":65.3333, + "y":337.333 + }, + { + "x":10.6667, + "y":340 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5717.33, + "y":1378.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":1935.27, + "id":18, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":143.151, + "x":6135.58, + "y":726.182 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":55, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":88 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level02.json b/jellytruck/js/data/Level02.json new file mode 100644 index 0000000000000000000000000000000000000000..eec43c64f238e70e72f9badc1cab93cfec7ae5a7 --- /dev/null +++ b/jellytruck/js/data/Level02.json @@ -0,0 +1,855 @@ +{ "height":29, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":29, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":78, + "x":0, + "y":0 + }, + { + "image":"Level02.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":165, + "id":51, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":467, + "x":2663, + "y":1442 + }, + { + "height":29, + "id":52, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":460.333, + "x":2663.67, + "y":1267 + }, + { + "height":238, + "id":53, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":320, + "x":1344, + "y":1075 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":30, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":113.5, + "y":1 + }, + { + "x":113, + "y":199 + }, + { + "x":0, + "y":199 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1169.5, + "y":1213.5 + }, + { + "height":0, + "id":31, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112.667, + "y":-0.666667 + }, + { + "x":113.333, + "y":197.333 + }, + { + "x":-0.666667, + "y":197.333 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1955.33, + "y":363.333 + }, + { + "height":0, + "id":32, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":0 + }, + { + "x":115, + "y":197.5 + }, + { + "x":0, + "y":197.5 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3177, + "y":1188.5 + }, + { + "height":0, + "id":33, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112, + "y":1.33333 + }, + { + "x":113.333, + "y":197.333 + }, + { + "x":1.33333, + "y":197.333 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4154.67, + "y":1326.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":26.6667, + "id":34, + "name":"", + "properties": + { + "obj_name":"Rect3", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":21.3333, + "x":656, + "y":1441.33 + }, + { + "height":25.3333, + "id":35, + "name":"", + "properties": + { + "obj_name":"Rect3", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":21.3333, + "x":756, + "y":1442.67 + }, + { + "height":26.6667, + "id":36, + "name":"", + "properties": + { + "obj_name":"Rect4", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.6667, + "x":864, + "y":1442.67 + }, + { + "height":38.25, + "id":37, + "name":"", + "properties": + { + "obj_name":"Lift1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":47.0833, + "x":1490.92, + "y":1355.5 + }, + { + "height":19, + "id":41, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_3", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":23, + "x":2224, + "y":856 + }, + { + "height":26, + "id":42, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_4", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22, + "x":2660, + "y":850 + }, + { + "height":40, + "id":46, + "name":"", + "properties": + { + "obj_name":"Shape2", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":48, + "x":2721.33, + "y":1274.67 + }, + { + "height":44, + "id":47, + "name":"", + "properties": + { + "obj_name":"Shape2", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":48, + "x":3023.67, + "y":1276 + }, + { + "height":43, + "id":49, + "name":"", + "properties": + { + "obj_name":"Shape3", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":44, + "x":3680, + "y":1207 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":144, + "id":40, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":5444, + "x":32, + "y":1936 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":50, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":4313, + "y":1430 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":25, + "name":"", + "polygon":[ + { + "x":109.333, + "y":14.6667 + }, + { + "x":127, + "y":15 + }, + { + "x":-3.5, + "y":1281.75 + }, + { + "x":-4.41667, + "y":1282.08 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3138, + "y":8 + }, + { + "height":0, + "id":26, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":125, + "y":-11 + }, + { + "x":245, + "y":1237 + }, + { + "x":117, + "y":1249 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4028, + "y":15 + }, + { + "height":0, + "id":27, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":370, + "y":1 + }, + { + "x":370, + "y":126 + }, + { + "x":-3, + "y":128 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4149, + "y":1138 + }, + { + "height":0, + "id":28, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":130, + "y":10 + }, + { + "x":45, + "y":1256 + }, + { + "x":-78, + "y":1249 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4468, + "y":3 + }, + { + "height":0, + "id":29, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":55, + "y":-2 + }, + { + "x":68, + "y":338 + }, + { + "x":9, + "y":338 + }], + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":4637, + "y":1098 + }, + { + "height":0, + "id":44, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":124, + "y":-12 + }, + { + "x":205.333, + "y":805.333 + }, + { + "x":76, + "y":817.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2536, + "y":16 + }, + { + "height":0, + "id":45, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":32, + "y":1.33333 + }, + { + "x":36.1667, + "y":398.083 + }, + { + "x":32.9167, + "y":398.5 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2620, + "y":892 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":17, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":702.227, + "y":-0.159091 + }, + { + "x":885.864, + "y":-0.340909 + }, + { + "x":930.045, + "y":-55.6136 + }, + { + "x":1567.14, + "y":-55.6136 + }, + { + "x":1593.5, + "y":-334.886 + }, + { + "x":1644.05, + "y":-905.432 + }, + { + "x":1906.77, + "y":-904.159 + }, + { + "x":2147.5, + "y":-905.432 + }, + { + "x":2203.32, + "y":-516.886 + }, + { + "x":2271.32, + "y":-51.6136 + }, + { + "x":2676.95, + "y":-53.25 + }, + { + "x":3136.05, + "y":-55.6136 + }, + { + "x":3260.77, + "y":-149.25 + }, + { + "x":3688.23, + "y":-153.25 + }, + { + "x":3831.14, + "y":-55.4318 + }, + { + "x":4297.32, + "y":-55.9773 + }, + { + "x":4687.5, + "y":-55.25 + }, + { + "x":4893.32, + "y":-55.25 + }, + { + "x":5380.05, + "y":-54.3409 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":112.5, + "y":1483.25 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2088, + "id":19, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":320, + "x":11, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":1952, + "id":20, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":144, + "x":5060, + "y":-40 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14, + "id":22, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":74, + "x":484, + "y":1287 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":54, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":78 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level03.json b/jellytruck/js/data/Level03.json new file mode 100644 index 0000000000000000000000000000000000000000..f8126d15f1056fa5aa75d8edce5887797bfb5f69 --- /dev/null +++ b/jellytruck/js/data/Level03.json @@ -0,0 +1,1294 @@ +{ "height":32, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":32, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":86, + "x":0, + "y":0 + }, + { + "image":"Level03_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":24, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":124.242, + "y":-18.1818 + }, + { + "x":254.545, + "y":1236.36 + }, + { + "x":118.182, + "y":1242.42 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":884.848, + "y":51.5152 + }, + { + "height":0, + "id":25, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":111.333, + "y":-51.3333 + }, + { + "x":186.667, + "y":114.667 + }, + { + "x":72, + "y":168.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1013.33, + "y":1291.33 + }, + { + "height":0, + "id":26, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":91.3333, + "y":47.3333 + }, + { + "x":32.6667, + "y":157.333 + }, + { + "x":-60, + "y":109.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1150.33, + "y":1347.67 + }, + { + "height":0, + "id":27, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":66, + "y":2 + }, + { + "x":62, + "y":128 + }, + { + "x":-6.66667, + "y":125.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1191, + "y":1381.67 + }, + { + "height":0, + "id":28, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":65.3333, + "y":-18 + }, + { + "x":98.6667, + "y":102.667 + }, + { + "x":30.6667, + "y":123.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1226.67, + "y":1386.67 + }, + { + "height":0, + "id":29, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54, + "y":-36 + }, + { + "x":125.333, + "y":67.3333 + }, + { + "x":70, + "y":105.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1255.33, + "y":1382.67 + }, + { + "height":0, + "id":30, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":40.6667, + "y":-56 + }, + { + "x":144, + "y":18.6667 + }, + { + "x":102, + "y":77.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1280.67, + "y":1374 + }, + { + "height":0, + "id":31, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":120, + "y":32.6667 + }, + { + "x":52.6667, + "y":260.667 + }, + { + "x":-69.3333, + "y":220.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1352.67, + "y":1154.67 + }, + { + "height":0, + "id":32, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":130.303, + "y":12.1212 + }, + { + "x":15.1515, + "y":1151.52 + }, + { + "x":-115.152, + "y":1139.39 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1463.64, + "y":33.3333 + }, + { + "height":0, + "id":56, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":118, + "y":1 + }, + { + "x":120.333, + "y":-367 + }, + { + "x":4, + "y":-368 + }], + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":4411, + "y":1358 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Camera", + "objects":[ + { + "height":129, + "id":74, + "name":"", + "properties": + { + "focusX":4194, + "focusY":1525, + "zoom":0.8 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":413, + "x":3781, + "y":1461 + }, + { + "height":126, + "id":76, + "name":"", + "properties": + { + "focusX":4230, + "focusY":1340, + "zoom":0.9 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":412, + "x":3818, + "y":1277 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":33, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":0 + }, + { + "x":114.667, + "y":197.333 + }, + { + "x":3.33333, + "y":197.333 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1587.33, + "y":1464 + }, + { + "height":0, + "id":34, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":113.333, + "y":0.666667 + }, + { + "x":114.667, + "y":198 + }, + { + "x":2, + "y":197.333 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2706.67, + "y":1434.67 + }, + { + "height":0, + "id":35, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112, + "y":0.666667 + }, + { + "x":115.333, + "y":197.333 + }, + { + "x":0.666667, + "y":199.333 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4519.33, + "y":1406.67 + }, + { + "height":0, + "id":36, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":115, + "y":0 + }, + { + "x":117, + "y":198 + }, + { + "x":-1, + "y":199 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":5375, + "y":1018 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":20, + "id":37, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_3", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22.5, + "x":628.5, + "y":1005 + }, + { + "height":23, + "id":38, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_2", + "xoffset":0.9, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":23.5, + "x":1001.5, + "y":1152 + }, + { + "height":21, + "id":39, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_1", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22, + "x":677.5, + "y":1287.5 + }, + { + "height":20.5, + "id":40, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_4", + "xoffset":0.9, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":20.5, + "x":1057.5, + "y":1402 + }, + { + "height":26.3333, + "id":41, + "name":"", + "properties": + { + "obj_name":"Mill", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":26.3333, + "x":1152.67, + "y":1650.67 + }, + { + "height":24.6667, + "id":43, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18, + "x":1888.67, + "y":1387.33 + }, + { + "height":24.6667, + "id":44, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.6667, + "x":2053.33, + "y":1401.33 + }, + { + "height":22, + "id":45, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.6667, + "x":2212, + "y":1405.33 + }, + { + "height":24.6667, + "id":46, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22, + "x":2377.33, + "y":1397.33 + }, + { + "height":24.6667, + "id":47, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":17.3333, + "x":2560, + "y":1373.33 + }, + { + "height":18, + "id":50, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18, + "x":3412, + "y":1523.5 + }, + { + "height":31.5, + "id":51, + "name":"", + "properties": + { + "obj_name":"Cube3", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":13.5, + "x":3417.5, + "y":1439 + }, + { + "height":30, + "id":52, + "name":"", + "properties": + { + "obj_name":"Cube3", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":14, + "x":3419.5, + "y":1351 + }, + { + "height":31.5, + "id":53, + "name":"", + "properties": + { + "obj_name":"Switch", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":53, + "x":3907, + "y":1494.5 + }, + { + "height":45.5, + "id":54, + "name":"", + "properties": + { + "obj_name":"Bridge1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.9 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":19.5, + "x":4382.5, + "y":1538 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":152, + "id":42, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":3528, + "x":1064, + "y":840 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":288, + "id":49, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":424, + "x":4008, + "y":1696 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":48, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":5543, + "y":1133 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":17, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":116.091, + "y":-8.81818 + }, + { + "x":197, + "y":-8.09091 + }, + { + "x":241.909, + "y":-3 + }, + { + "x":306.091, + "y":2.63636 + }, + { + "x":357, + "y":16.8182 + }, + { + "x":399.545, + "y":37.9091 + }, + { + "x":442.636, + "y":72.8182 + }, + { + "x":471.545, + "y":105.909 + }, + { + "x":496.455, + "y":144.636 + }, + { + "x":522.818, + "y":203.545 + }, + { + "x":543.545, + "y":267 + }, + { + "x":560.818, + "y":351 + }, + { + "x":573.909, + "y":509.545 + }, + { + "x":586.455, + "y":673.727 + }, + { + "x":596.273, + "y":810.091 + }, + { + "x":600.091, + "y":922.818 + }, + { + "x":608.091, + "y":979.909 + }, + { + "x":630.091, + "y":1014.27 + }, + { + "x":669, + "y":1041.18 + }, + { + "x":732.273, + "y":1055.36 + }, + { + "x":830.273, + "y":1055 + }, + { + "x":981.909, + "y":1047.18 + }, + { + "x":1120.09, + "y":1019.36 + }, + { + "x":1203.18, + "y":985.727 + }, + { + "x":1249.73, + "y":962.455 + }, + { + "x":1315, + "y":918.091 + }, + { + "x":1386.09, + "y":857.909 + }, + { + "x":1425.91, + "y":815 + }, + { + "x":1499.73, + "y":786.818 + }, + { + "x":1591, + "y":759.909 + }, + { + "x":1665.18, + "y":746.091 + }, + { + "x":1778.09, + "y":733.545 + }, + { + "x":2161.36, + "y":731.727 + }, + { + "x":2481.91, + "y":729.727 + }, + { + "x":2797.73, + "y":729.182 + }, + { + "x":3222.64, + "y":727 + }, + { + "x":3899.36, + "y":723.545 + }, + { + "x":3943.18, + "y":1255.73 + }, + { + "x":4209.18, + "y":1247.18 + }, + { + "x":4218.45, + "y":1060.09 + }, + { + "x":4236.09, + "y":712.091 + }, + { + "x":4337.55, + "y":712.636 + }, + { + "x":4470.45, + "y":710.273 + }, + { + "x":4583.91, + "y":709.545 + }, + { + "x":4626.27, + "y":706.455 + }, + { + "x":4685.73, + "y":697.727 + }, + { + "x":4743, + "y":681.909 + }, + { + "x":4794.09, + "y":661.182 + }, + { + "x":4854.64, + "y":627.909 + }, + { + "x":4914.27, + "y":583.727 + }, + { + "x":4956.09, + "y":543.909 + }, + { + "x":5005.18, + "y":488.091 + }, + { + "x":5050.45, + "y":423.909 + }, + { + "x":5083.36, + "y":369 + }, + { + "x":5102.27, + "y":345.364 + }, + { + "x":5138.09, + "y":319.182 + }, + { + "x":5185.91, + "y":299.727 + }, + { + "x":5248.45, + "y":289 + }, + { + "x":5309.18, + "y":288.818 + }, + { + "x":5411.73, + "y":290.818 + }, + { + "x":5669.36, + "y":293.364 + }, + { + "x":5970.09, + "y":299.182 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":147, + "y":841 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.5455, + "id":23, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":74.5455, + "x":356.364, + "y":707.212 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2304, + "id":18, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":224, + "x":0, + "y":-8 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2304, + "id":20, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":92, + "x":5821, + "y":14 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":79, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.0.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":86 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level04.json b/jellytruck/js/data/Level04.json new file mode 100644 index 0000000000000000000000000000000000000000..6e8d137e908c997e2d80e4db789febd32513c64a --- /dev/null +++ b/jellytruck/js/data/Level04.json @@ -0,0 +1,1424 @@ +{ "height":30, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":30, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":112, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/..\/..\/..\/Game Project\/8\/Jelly_Resource\/Level\/Level04\/Level04_Ref.png.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Crusher", + "objects":[ + { + "ellipse":true, + "height":130, + "id":57, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4068.75, + "y":923 + }, + { + "ellipse":true, + "height":130, + "id":58, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4205.75, + "y":1059 + }, + { + "ellipse":true, + "height":130, + "id":59, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4157.75, + "y":814.667 + }, + { + "ellipse":true, + "height":130, + "id":60, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4252.75, + "y":716.667 + }, + { + "ellipse":true, + "height":130, + "id":61, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4346.75, + "y":605.167 + }, + { + "ellipse":true, + "height":130, + "id":62, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4478.25, + "y":529.167 + }, + { + "ellipse":true, + "height":130, + "id":63, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4294.75, + "y":947.5 + }, + { + "ellipse":true, + "height":130, + "id":64, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4388.25, + "y":851.5 + }, + { + "ellipse":true, + "height":130, + "id":65, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4502.75, + "y":770 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":53, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":7632, + "y":1832 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":224, + "id":34, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":4976, + "x":368, + "y":233 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":203.515, + "id":35, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":620, + "x":5424.25, + "y":1429.58 + }, + { + "height":221.212, + "id":36, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":821.212, + "x":6084.85, + "y":1703.04 + }, + { + "height":127.273, + "id":52, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":1003.03, + "x":7006.06, + "y":1960.61 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":21, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":0 + }, + { + "x":114, + "y":678 + }, + { + "x":2, + "y":680 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2086, + "y":823.636 + }, + { + "height":0, + "id":22, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":110, + "y":2 + }, + { + "x":112, + "y":682 + }, + { + "x":4, + "y":682 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3514.24, + "y":820.727 + }, + { + "height":0, + "id":23, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112, + "y":-2 + }, + { + "x":112, + "y":676 + }, + { + "x":4, + "y":676 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":5213.52, + "y":795.576 + }, + { + "height":0, + "id":24, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":108, + "y":1.65343 + }, + { + "x":108, + "y":563.818 + }, + { + "x":0, + "y":562.165 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":7322.91, + "y":1364.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":25, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":518.667, + "y":-186.667 + }, + { + "x":703.333, + "y":344.667 + }, + { + "x":186, + "y":530.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4640.67, + "y":190.667 + }, + { + "height":0, + "id":26, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":250, + "y":0 + }, + { + "x":250, + "y":94 + }, + { + "x":2.06612, + "y":94 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5482.97, + "y":1204.06 + }, + { + "height":0, + "id":27, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":245.967, + "y":-2 + }, + { + "x":248, + "y":90 + }, + { + "x":2.03279, + "y":90 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5788.97, + "y":1312.06 + }, + { + "height":0, + "id":28, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":245.246, + "y":2 + }, + { + "x":247.29, + "y":94 + }, + { + "x":-2.04372, + "y":96 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":6089.01, + "y":1397.73 + }, + { + "height":0, + "id":29, + "name":"", + "polygon":[ + { + "x":3, + "y":4 + }, + { + "x":245.333, + "y":4 + }, + { + "x":245.333, + "y":94 + }, + { + "x":2.04444, + "y":94 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":6387.64, + "y":1486.73 + }, + { + "height":0, + "id":30, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":244.556, + "y":2 + }, + { + "x":244.556, + "y":90 + }, + { + "x":-4.11019, + "y":90 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":6697.08, + "y":1594.73 + }, + { + "height":0, + "id":31, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":247.934, + "y":2.05797 + }, + { + "x":250, + "y":94.6667 + }, + { + "x":2.06612, + "y":94.6667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":6989.64, + "y":1714.06 + }, + { + "height":0, + "id":50, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":712, + "y":1.33333 + }, + { + "x":714.667, + "y":96 + }, + { + "x":0, + "y":94.6667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":7281.33, + "y":1832.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":51, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":576.25, + "y":2.5 + }, + { + "x":615.5, + "y":43.5 + }, + { + "x":656.75, + "y":73 + }, + { + "x":694.25, + "y":85.75 + }, + { + "x":740.75, + "y":90.75 + }, + { + "x":800.75, + "y":73.25 + }, + { + "x":855.5, + "y":41 + }, + { + "x":895.75, + "y":4.5 + }, + { + "x":944.25, + "y":-22.5 + }, + { + "x":984.75, + "y":-39.5 + }, + { + "x":1027.75, + "y":-53.75 + }, + { + "x":1073.5, + "y":-64.5 + }, + { + "x":1118.75, + "y":-70.5 + }, + { + "x":1162.5, + "y":-72.5 + }, + { + "x":1213, + "y":-66.5 + }, + { + "x":1259.75, + "y":-55.5 + }, + { + "x":1297.25, + "y":-43.75 + }, + { + "x":1335, + "y":-28.5 + }, + { + "x":1372.25, + "y":-9.5 + }, + { + "x":1395.75, + "y":5.75 + }, + { + "x":1541, + "y":5 + }, + { + "x":1541.25, + "y":579.25 + }, + { + "x":1981.25, + "y":578 + }, + { + "x":1944.25, + "y":9.25 + }, + { + "x":1972.5, + "y":-6.75 + }, + { + "x":2006.75, + "y":-23 + }, + { + "x":2045.25, + "y":-38.75 + }, + { + "x":2090.5, + "y":-48 + }, + { + "x":2144.75, + "y":-49.25 + }, + { + "x":2188.75, + "y":-35.75 + }, + { + "x":2228, + "y":-11.5 + }, + { + "x":2261, + "y":24.5 + }, + { + "x":2289.75, + "y":49.25 + }, + { + "x":2325.75, + "y":66.5 + }, + { + "x":2370.5, + "y":71.5 + }, + { + "x":2413, + "y":57 + }, + { + "x":2457.25, + "y":29.5 + }, + { + "x":2492.75, + "y":2 + }, + { + "x":2538.75, + "y":-25.5 + }, + { + "x":2578.5, + "y":-38.75 + }, + { + "x":2619, + "y":-43.5 + }, + { + "x":2661.75, + "y":-37.5 + }, + { + "x":2703.5, + "y":-19.75 + }, + { + "x":2748, + "y":9.5 + }, + { + "x":2774.5, + "y":43.75 + }, + { + "x":2805.5, + "y":67.5 + }, + { + "x":2852.5, + "y":75.75 + }, + { + "x":2897.5, + "y":59 + }, + { + "x":2935, + "y":32.5 + }, + { + "x":2955.5, + "y":10.5 + }, + { + "x":3040.75, + "y":10 + }, + { + "x":3041.25, + "y":343.25 + }, + { + "x":3041.75, + "y":570.75 + }, + { + "x":3364.25, + "y":568.75 + }, + { + "x":3364.25, + "y":332 + }, + { + "x":3364.25, + "y":12 + }, + { + "x":3400.5, + "y":41.75 + }, + { + "x":3436.75, + "y":61 + }, + { + "x":3488.5, + "y":73.25 + }, + { + "x":3541.75, + "y":72.75 + }, + { + "x":3596, + "y":55.25 + }, + { + "x":3642, + "y":27.75 + }, + { + "x":3673.5, + "y":4.5 + }, + { + "x":3702, + "y":-12.5 + }, + { + "x":3740.25, + "y":-26.75 + }, + { + "x":3778.75, + "y":-34.5 + }, + { + "x":3828, + "y":-31.75 + }, + { + "x":3881.5, + "y":-15.75 + }, + { + "x":3918.25, + "y":6.75 + }, + { + "x":3945.5, + "y":29.5 + }, + { + "x":3980.5, + "y":55.25 + }, + { + "x":4017.75, + "y":69.5 + }, + { + "x":4060.25, + "y":80 + }, + { + "x":4112.75, + "y":67.75 + }, + { + "x":4173, + "y":37 + }, + { + "x":4226.5, + "y":81.75 + }, + { + "x":4304.25, + "y":69.5 + }, + { + "x":4334.5, + "y":1.75 + }, + { + "x":4388.5, + "y":-38 + }, + { + "x":4417, + "y":-73.25 + }, + { + "x":4415.5, + "y":-134.25 + }, + { + "x":4479, + "y":-126.5 + }, + { + "x":4516, + "y":-163.5 + }, + { + "x":4511.25, + "y":-199.75 + }, + { + "x":4529.5, + "y":-217.75 + }, + { + "x":4565.25, + "y":-197.75 + }, + { + "x":4600.5, + "y":-219.5 + }, + { + "x":4606.25, + "y":-294.5 + }, + { + "x":4649.5, + "y":-255.75 + }, + { + "x":4676.25, + "y":-148.5 + }, + { + "x":4697, + "y":39.5 + }, + { + "x":4720.75, + "y":39.25 + }, + { + "x":4721.5, + "y":323.5 + }, + { + "x":4721, + "y":559.25 + }, + { + "x":5129.75, + "y":557.75 + }, + { + "x":5130.5, + "y":324.75 + }, + { + "x":5130.5, + "y":41 + }, + { + "x":5392, + "y":41.5 + }, + { + "x":5392.25, + "y":356 + }, + { + "x":5392.5, + "y":556.5 + }, + { + "x":6644.33, + "y":966.348 + }, + { + "x":8053.42, + "y":1039.08 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":13.25, + "y":1118.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":22, + "id":47, + "name":"", + "properties": + { + "obj_name":"Bridge2", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":24, + "x":1754.33, + "y":1133 + }, + { + "height":22, + "id":48, + "name":"", + "properties": + { + "obj_name":"Bridge3", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.6667, + "x":3255.33, + "y":1137.33 + }, + { + "height":21.3333, + "id":49, + "name":"", + "properties": + { + "obj_name":"Bridge2", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":19.3333, + "x":4942.33, + "y":1175 + }, + { + "height":24, + "id":54, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":17.75, + "x":4853.75, + "y":711 + }, + { + "height":24, + "id":55, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":17.75, + "x":4987.75, + "y":711 + }, + { + "height":24, + "id":56, + "name":"", + "properties": + { + "obj_name":"Rect5", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":17.75, + "x":5086.75, + "y":711 + }, + { + "height":25, + "id":68, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_6", + "xoffset":0.6, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":25.5, + "x":7446.5, + "y":1742.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2126, + "id":18, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":250, + "x":4, + "y":24 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Camera", + "objects":[ + { + "height":463.636363636364, + "id":69, + "name":"", + "properties": + { + "focusX":4597, + "focusY":718, + "zoom":0.8 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":203.030303030303, + "x":4466.66666666667, + "y":478.787878787879 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2156, + "id":19, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":128, + "x":7917, + "y":4 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14, + "id":20, + "name":"Truck", + "properties": + { + "type":2 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":72, + "x":479.333, + "y":1073 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":70, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.2", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":112 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level05.json b/jellytruck/js/data/Level05.json new file mode 100644 index 0000000000000000000000000000000000000000..a99506ad2d70e43bbcfefd450c50bdd99cece55f --- /dev/null +++ b/jellytruck/js/data/Level05.json @@ -0,0 +1,1177 @@ +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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":46, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":99, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/..\/..\/..\/Game Project\/8\/Jelly_Resource\/Level\/Level05\/Level_05_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Crusher", + "objects":[ + { + "ellipse":true, + "height":130, + "id":43, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":10000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130.167, + "x":4021, + "y":893.833 + }, + { + "ellipse":true, + "height":130, + "id":46, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":10000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130.167, + "x":4162.5, + "y":894.333 + }, + { + "ellipse":true, + "height":130, + "id":47, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":10000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130.167, + "x":4303, + "y":893.833 + }, + { + "ellipse":true, + "height":130, + "id":48, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":10000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130.167, + "x":3954.5, + "y":1044.33 + }, + { + "ellipse":true, + "height":130, + "id":49, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":10000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130.167, + "x":4092, + "y":1044.33 + }, + { + "ellipse":true, + "height":130, + "id":50, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":10000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130.167, + "x":4228.5, + "y":1043.33 + }, + { + "ellipse":true, + "height":130, + "id":51, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":10000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130.167, + "x":4365.5, + "y":1044.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":45.3333, + "id":52, + "name":"", + "properties": + { + "obj_name":"Shape4", + "texture":"gum_2", + "xoffset":0.2, + "yoffset":0.7 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":48, + "x":1218.53, + "y":1979.88 + }, + { + "height":45.3333, + "id":55, + "name":"", + "properties": + { + "obj_name":"Shape4", + "texture":"gum_2", + "xoffset":0.2, + "yoffset":0.7 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":48, + "x":775.696666666666, + "y":1363.54666666667 + }, + { + "height":45.3333, + "id":56, + "name":"", + "properties": + { + "obj_name":"Shape5", + "texture":"gum_2", + "xoffset":0.8, + "yoffset":0.7 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":48, + "x":3293.02666666667, + "y":1673.88 + }, + { + "height":41.3333, + "id":57, + "name":"", + "properties": + { + "obj_name":"Shape1", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":21.3333, + "x":3373.33, + "y":985.333 + }, + { + "height":21.3333, + "id":58, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22.6667, + "x":4415.33, + "y":1236.67 + }, + { + "height":20, + "id":59, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":20.6667, + "x":5098.67, + "y":1352.67 + }, + { + "height":21.3333, + "id":61, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":20.6667, + "x":4428.67, + "y":1659.33 + }, + { + "height":22.6667, + "id":62, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22.6667, + "x":5083.33, + "y":1774 + }, + { + "height":25.3333, + "id":63, + "name":"", + "properties": + { + "obj_name":"Mill", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":24, + "x":4803.33, + "y":1290.67 + }, + { + "height":24.6667, + "id":64, + "name":"", + "properties": + { + "obj_name":"Mill", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":25.3333, + "x":4805.33, + "y":1714 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":464, + "id":40, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":7104, + "x":16, + "y":2816 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":41, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":4796, + "y":2062 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":328, + "id":42, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":1416, + "x":1672, + "y":1992 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":26, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":166, + "y":-10 + }, + { + "x":200, + "y":546 + }, + { + "x":38, + "y":558 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":736.333333333333, + "y":876.666666666667 + }, + { + "height":0, + "id":27, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":344, + "y":-234 + }, + { + "x":372, + "y":-192 + }, + { + "x":26, + "y":38 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":910, + "y":1432 + }, + { + "height":0, + "id":28, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":42.6667, + "y":-0.666667 + }, + { + "x":44, + "y":43.3333 + }, + { + "x":-1.33333, + "y":43.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1258, + "y":1198 + }, + { + "height":0, + "id":29, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":352.5, + "y":-236.5 + }, + { + "x":390, + "y":-182.5 + }, + { + "x":36.5, + "y":54 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1352, + "y":2041 + }, + { + "height":0, + "id":30, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":43.5, + "y":0 + }, + { + "x":43.5, + "y":46 + }, + { + "x":-2, + "y":45.5 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1704.5, + "y":1802.5 + }, + { + "height":0, + "id":31, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":42, + "y":-0.5 + }, + { + "x":43.5, + "y":42 + }, + { + "x":1, + "y":43.5 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2804, + "y":1497.5 + }, + { + "height":0, + "id":32, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":351, + "y":237 + }, + { + "x":326, + "y":278 + }, + { + "x":-28, + "y":42 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2847, + "y":1497 + }, + { + "height":0, + "id":33, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":165, + "y":10 + }, + { + "x":129, + "y":566 + }, + { + "x":-33, + "y":557 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3205, + "y":1166.66666666667 + }, + { + "height":0, + "id":35, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":536.364, + "y":0 + }, + { + "x":545.455, + "y":718.182 + }, + { + "x":-6.06061, + "y":718.182 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3954.55, + "y":242.424 + }, + { + "height":0, + "id":73, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":52, + "y":0 + }, + { + "x":52.6666666666665, + "y":-30.6666666666666 + }, + { + "x":-0.666666666666515, + "y":-30.6666666666666 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3296.66666666667, + "y":876.666666666667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":36, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":109.091, + "y":0 + }, + { + "x":109.091, + "y":190.909 + }, + { + "x":0, + "y":196.97 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1321.21, + "y":1000 + }, + { + "height":0, + "id":37, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112.121, + "y":0 + }, + { + "x":121.212, + "y":193.939 + }, + { + "x":6.06061, + "y":193.939 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2666.67, + "y":1293.94 + }, + { + "height":0, + "id":38, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":115.152, + "y":3.0303 + }, + { + "x":112.121, + "y":503.03 + }, + { + "x":-6.06061, + "y":503.03 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3163.64, + "y":642.424 + }, + { + "height":0, + "id":39, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":509.091, + "y":-9.09091 + }, + { + "x":506.061, + "y":100 + }, + { + "x":3.0303, + "y":106.061 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4548.48, + "y":1460.61 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":18, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":708, + "y":0.666667 + }, + { + "x":734.667, + "y":470 + }, + { + "x":1058.67, + "y":272.667 + }, + { + "x":1102, + "y":249.333 + }, + { + "x":1102, + "y":424 + }, + { + "x":1105.33, + "y":1571.67 + }, + { + "x":2164.33, + "y":1485.67 + }, + { + "x":2164.33, + "y":640.667 + }, + { + "x":2157.33, + "y":-39.3333 + }, + { + "x":2199.33, + "y":-42.3333 + }, + { + "x":2553.33, + "y":143.667 + }, + { + "x":2599.33, + "y":-418.333 + }, + { + "x":3163.33, + "y":-425.333 + }, + { + "x":3298.33, + "y":-484.333 + }, + { + "x":3875.33, + "y":-483.333 + }, + { + "x":3874.33, + "y":-196.333 + }, + { + "x":3899.33, + "y":466.667 + }, + { + "x":4373.33, + "y":473.667 + }, + { + "x":4408.33, + "y":35.6667 + }, + { + "x":4451.33, + "y":-519.333 + }, + { + "x":4468.33, + "y":-754.333 + }, + { + "x":5383.33, + "y":-755.333 + }, + { + "x":5419.33, + "y":-172.333 + }, + { + "x":5462.33, + "y":478.667 + }, + { + "x":6238.33, + "y":489.667 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":646.667, + "y":1589.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":3320, + "id":21, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":760, + "x":4, + "y":-4 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":3312, + "id":23, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":664, + "x":5940, + "y":8 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.7273, + "id":25, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73.8182, + "x":1007.75, + "y":1505.42 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Camera", + "objects":[ + { + "height":273.5, + "id":66, + "name":"", + "properties": + { + "focusX":1220, + "focusY":1785, + "zoom":0.85 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":392, + "x":1024, + "y":1502.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":74, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":99 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level06.json b/jellytruck/js/data/Level06.json new file mode 100644 index 0000000000000000000000000000000000000000..8f86b51fdf797c825dec78af5a56efc3343cc1c1 --- /dev/null +++ b/jellytruck/js/data/Level06.json @@ -0,0 +1,2995 @@ +{ "height":46, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":46, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":109, + "x":0, + "y":0 + }, + { + "image":"Level6_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":0, + "id":31, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":319, + "y":0 + }, + { + "x":320, + "y":43 + }, + { + "x":0, + "y":45.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":298, + "y":2256.5 + }, + { + "height":0, + "id":32, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":319, + "y":0 + }, + { + "x":319.5, + "y":44 + }, + { + "x":0, + "y":45 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":600.5, + "y":2254.5 + }, + { + "height":0, + "id":33, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":145, + "y":72 + }, + { + "x":125, + "y":112 + }, + { + "x":-18.5, + "y":37.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":920, + "y":2254 + }, + { + "height":0, + "id":34, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":160.5, + "y":-3.5 + }, + { + "x":164, + "y":40.5 + }, + { + "x":1.5, + "y":48.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":964.5, + "y":2285 + }, + { + "height":0, + "id":35, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":149, + "y":-58 + }, + { + "x":166.5, + "y":-18.5 + }, + { + "x":17.5, + "y":45 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1092.5, + "y":2281.5 + }, + { + "height":0, + "id":36, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":139.5, + "y":-72.5 + }, + { + "x":159.5, + "y":-34 + }, + { + "x":19, + "y":38 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1237, + "y":2225.5 + }, + { + "height":0, + "id":37, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92.5, + "y":-29.5 + }, + { + "x":105.5, + "y":13 + }, + { + "x":11, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1374.5, + "y":2153.5 + }, + { + "height":0, + "id":38, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100.5, + "y":-8.5 + }, + { + "x":104.5, + "y":34.5 + }, + { + "x":4, + "y":44 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1467, + "y":2124 + }, + { + "height":0, + "id":39, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":96.5, + "y":25.5 + }, + { + "x":86.5, + "y":68.5 + }, + { + "x":-11.5, + "y":43.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1567.5, + "y":2115.5 + }, + { + "height":0, + "id":40, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":83.5, + "y":50 + }, + { + "x":60.5, + "y":89.5 + }, + { + "x":-26.5, + "y":39 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1663, + "y":2142 + }, + { + "height":0, + "id":41, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100, + "y":11 + }, + { + "x":96, + "y":53.5 + }, + { + "x":-4.5, + "y":46.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1710, + "y":2175 + }, + { + "height":0, + "id":42, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":97.5, + "y":-17 + }, + { + "x":105.5, + "y":25 + }, + { + "x":4.5, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1808, + "y":2185.5 + }, + { + "height":0, + "id":43, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90.5, + "y":-32.5 + }, + { + "x":105.5, + "y":9 + }, + { + "x":8.5, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1905.5, + "y":2169 + }, + { + "height":0, + "id":44, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":89.5, + "y":-38 + }, + { + "x":108, + "y":1 + }, + { + "x":14, + "y":40.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1996.5, + "y":2137 + }, + { + "height":0, + "id":45, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":133, + "y":-68 + }, + { + "x":156, + "y":-30.5 + }, + { + "x":18, + "y":38 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2086.5, + "y":2099.5 + }, + { + "height":0, + "id":46, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":95, + "y":-37 + }, + { + "x":112.5, + "y":2.5 + }, + { + "x":18, + "y":38.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2219.5, + "y":2032.5 + }, + { + "height":0, + "id":47, + "name":"", + "polygon":[ + { + "x":0.5, + "y":-3 + }, + { + "x":96, + "y":-18 + }, + { + "x":105.5, + "y":22.5 + }, + { + "x":8, + "y":41 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2315, + "y":1997.5 + }, + { + "height":0, + "id":48, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":102, + "y":3.5 + }, + { + "x":100, + "y":46.5 + }, + { + "x":0, + "y":41.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2411, + "y":1980 + }, + { + "height":0, + "id":49, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":97.5, + "y":30.5 + }, + { + "x":82.5, + "y":71 + }, + { + "x":-13.5, + "y":40.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2513, + "y":1984 + }, + { + "height":0, + "id":50, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":87, + "y":46 + }, + { + "x":67.5, + "y":85.5 + }, + { + "x":-21.5, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2609.5, + "y":2014.5 + }, + { + "height":0, + "id":51, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":99.5, + "y":17.5 + }, + { + "x":91.5, + "y":61 + }, + { + "x":-8.5, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2662.5, + "y":2044 + }, + { + "height":0, + "id":52, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":97.5, + "y":-15.5 + }, + { + "x":103.5, + "y":29.5 + }, + { + "x":3.5, + "y":43 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2733, + "y":2057 + }, + { + "height":0, + "id":53, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92, + "y":-37 + }, + { + "x":109.5, + "y":7 + }, + { + "x":14, + "y":42.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2809.5, + "y":2044.5 + }, + { + "height":0, + "id":54, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":86, + "y":-50.5 + }, + { + "x":109.5, + "y":-13 + }, + { + "x":23, + "y":38.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2891, + "y":2011.5 + }, + { + "height":0, + "id":55, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":79, + "y":-54.5 + }, + { + "x":104.5, + "y":-19.5 + }, + { + "x":22, + "y":37 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2975.5, + "y":1961.5 + }, + { + "height":0, + "id":56, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90.5, + "y":-39.5 + }, + { + "x":108.5, + "y":1 + }, + { + "x":15, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3054, + "y":1908.5 + }, + { + "height":0, + "id":57, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":98, + "y":-19 + }, + { + "x":107, + "y":21.5 + }, + { + "x":7, + "y":43.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3144, + "y":1869.5 + }, + { + "height":0, + "id":58, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":99.5, + "y":0.5 + }, + { + "x":101.5, + "y":46 + }, + { + "x":-0.5, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3239.5, + "y":1852.5 + }, + { + "height":0, + "id":59, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":105.5, + "y":26.5 + }, + { + "x":94, + "y":68.5 + }, + { + "x":-10, + "y":41.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3337.5, + "y":1854.5 + }, + { + "height":0, + "id":60, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":91, + "y":37 + }, + { + "x":74.5, + "y":79 + }, + { + "x":-19, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3441, + "y":1882 + }, + { + "height":0, + "id":61, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":98, + "y":7.5 + }, + { + "x":93.5, + "y":52 + }, + { + "x":-5, + "y":43 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3508.5, + "y":1909 + }, + { + "height":0, + "id":62, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100, + "y":-16 + }, + { + "x":107.5, + "y":26.5 + }, + { + "x":7, + "y":44 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3578, + "y":1913 + }, + { + "height":0, + "id":63, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":91, + "y":-33 + }, + { + "x":107.5, + "y":9 + }, + { + "x":13, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3670, + "y":1898.5 + }, + { + "height":0, + "id":64, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92, + "y":-47 + }, + { + "x":110, + "y":-9.5 + }, + { + "x":19, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3759.5, + "y":1867.5 + }, + { + "height":0, + "id":65, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":86, + "y":-46.5 + }, + { + "x":107.5, + "y":-9 + }, + { + "x":17.5, + "y":38 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3851, + "y":1822 + }, + { + "height":0, + "id":66, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":97.5, + "y":-34 + }, + { + "x":113.5, + "y":7.5 + }, + { + "x":18.5, + "y":40.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3935.5, + "y":1778 + }, + { + "height":0, + "id":67, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":99, + "y":-10.5 + }, + { + "x":105.5, + "y":35 + }, + { + "x":5.5, + "y":44 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4032, + "y":1745.5 + }, + { + "height":0, + "id":68, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":101, + "y":26 + }, + { + "x":89.5, + "y":67 + }, + { + "x":-8, + "y":45 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4130, + "y":1734.5 + }, + { + "height":0, + "id":69, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":95.5, + "y":34.5 + }, + { + "x":81, + "y":75 + }, + { + "x":-15, + "y":41 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4229.5, + "y":1761 + }, + { + "height":0, + "id":70, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":102, + "y":8 + }, + { + "x":96, + "y":52 + }, + { + "x":-4.5, + "y":43 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4307, + "y":1789 + }, + { + "height":0, + "id":71, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":96.5, + "y":-15 + }, + { + "x":102, + "y":28 + }, + { + "x":4, + "y":43 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4391.5, + "y":1795 + }, + { + "height":0, + "id":72, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90.5, + "y":-35 + }, + { + "x":107.5, + "y":6.5 + }, + { + "x":11, + "y":41.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4485, + "y":1780.5 + }, + { + "height":0, + "id":73, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":89, + "y":-47.5 + }, + { + "x":111.5, + "y":-8.5 + }, + { + "x":20.5, + "y":39 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4575, + "y":1746.5 + }, + { + "height":0, + "id":74, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":88.5, + "y":-47 + }, + { + "x":108.5, + "y":-7 + }, + { + "x":20, + "y":38 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4664, + "y":1700.5 + }, + { + "height":0, + "id":75, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":96, + "y":-31 + }, + { + "x":111, + "y":11 + }, + { + "x":15, + "y":43 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4751, + "y":1654.5 + }, + { + "height":0, + "id":76, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100, + "y":-11 + }, + { + "x":104, + "y":33.5 + }, + { + "x":7, + "y":44.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4846, + "y":1624 + }, + { + "height":0, + "id":77, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":99.5, + "y":13.5 + }, + { + "x":95.5, + "y":57.5 + }, + { + "x":-6.5, + "y":45.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4945, + "y":1615 + }, + { + "height":0, + "id":78, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":89, + "y":45 + }, + { + "x":69.5, + "y":84.5 + }, + { + "x":-20.5, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5043, + "y":1629 + }, + { + "height":0, + "id":79, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":97, + "y":26 + }, + { + "x":84.5, + "y":69.5 + }, + { + "x":-12, + "y":42.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5130, + "y":1674.5 + }, + { + "height":0, + "id":80, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100.5, + "y":-3 + }, + { + "x":101.5, + "y":39.5 + }, + { + "x":3, + "y":46 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5206, + "y":1695 + }, + { + "height":0, + "id":81, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":94.5, + "y":-28.5 + }, + { + "x":108.5, + "y":13 + }, + { + "x":11, + "y":42.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5290.5, + "y":1692 + }, + { + "height":0, + "id":82, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90.5, + "y":-42.5 + }, + { + "x":109.5, + "y":-2 + }, + { + "x":18, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5385, + "y":1664.5 + }, + { + "height":0, + "id":83, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":87.5, + "y":-52 + }, + { + "x":110, + "y":-14 + }, + { + "x":23.5, + "y":37.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5475, + "y":1623.5 + }, + { + "height":0, + "id":84, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":82, + "y":-53 + }, + { + "x":106, + "y":-14.5 + }, + { + "x":21, + "y":38 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5562.5, + "y":1573.5 + }, + { + "height":0, + "id":85, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92, + "y":-40 + }, + { + "x":106, + "y":-1 + }, + { + "x":17, + "y":39.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5644, + "y":1522 + }, + { + "height":0, + "id":86, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100.5, + "y":-11.5 + }, + { + "x":106, + "y":31.5 + }, + { + "x":5.5, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5735.5, + "y":1481 + }, + { + "height":0, + "id":87, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92.5, + "y":40 + }, + { + "x":76, + "y":81 + }, + { + "x":-16.5, + "y":44.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5834, + "y":1471 + }, + { + "height":0, + "id":88, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":83, + "y":50 + }, + { + "x":60.5, + "y":91 + }, + { + "x":-25, + "y":39.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5924, + "y":1510.5 + }, + { + "height":0, + "id":89, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90, + "y":13 + }, + { + "x":85, + "y":63 + }, + { + "x":-13, + "y":42.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6004.5, + "y":1559.5 + }, + { + "height":0, + "id":90, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":98, + "y":-6.5 + }, + { + "x":100.5, + "y":41.5 + }, + { + "x":0.5, + "y":47 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6060, + "y":1568.5 + }, + { + "height":0, + "id":91, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92.5, + "y":-28 + }, + { + "x":107.5, + "y":17 + }, + { + "x":11, + "y":44.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6126.5, + "y":1564 + }, + { + "height":0, + "id":92, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":85, + "y":-43 + }, + { + "x":106.5, + "y":-4.5 + }, + { + "x":18.5, + "y":44 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6211, + "y":1537.5 + }, + { + "height":0, + "id":93, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":81.5, + "y":-53 + }, + { + "x":105.5, + "y":-16.5 + }, + { + "x":20.5, + "y":39 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6296.5, + "y":1494.5 + }, + { + "height":0, + "id":94, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":86, + "y":-45 + }, + { + "x":108, + "y":-5 + }, + { + "x":19, + "y":39.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6376.5, + "y":1442.5 + }, + { + "height":0, + "id":95, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92, + "y":-28.5 + }, + { + "x":107, + "y":14 + }, + { + "x":11, + "y":43 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6462.5, + "y":1399 + }, + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":102.5, + "y":0.5 + }, + { + "x":103.5, + "y":46.5 + }, + { + "x":2.5, + "y":46.5 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6553, + "y":1372 + }, + { + "height":0, + "id":97, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":89, + "y":39.5 + }, + { + "x":73, + "y":80.5 + }, + { + "x":-19, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6654.5, + "y":1374.5 + }, + { + "height":0, + "id":98, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":83, + "y":48 + }, + { + "x":62.5, + "y":86 + }, + { + "x":-25.5, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":6740, + "y":1414 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":18, + "id":99, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.5, + "x":607.5, + "y":2133 + }, + { + "height":13, + "id":100, + "name":"", + "properties": + { + "obj_name":"Cart", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":96.5, + "x":567, + "y":2209 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":30, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":6063, + "y":1573 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":25, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":-1 + }, + { + "x":111, + "y":169 + }, + { + "x":-2, + "y":171 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2329, + "y":1848 + }, + { + "height":0, + "id":26, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":113, + "y":0 + }, + { + "x":115, + "y":170 + }, + { + "x":-1, + "y":170 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3194, + "y":1717 + }, + { + "height":0, + "id":27, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":115, + "y":0 + }, + { + "x":114, + "y":167 + }, + { + "x":1, + "y":168 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4050, + "y":1599 + }, + { + "height":0, + "id":28, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":0 + }, + { + "x":113, + "y":168 + }, + { + "x":0, + "y":168 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4883, + "y":1482 + }, + { + "height":0, + "id":29, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":113, + "y":-1 + }, + { + "x":112, + "y":170 + }, + { + "x":-2, + "y":170 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":5747, + "y":1355 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":18, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":211.455, + "y":-8.72727 + }, + { + "x":426, + "y":-9.09091 + }, + { + "x":580, + "y":-9.09091 + }, + { + "x":712.909, + "y":-9.81818 + }, + { + "x":781.091, + "y":-11.0909 + }, + { + "x":827.091, + "y":13.8182 + }, + { + "x":865.636, + "y":21.8182 + }, + { + "x":908.727, + "y":20.9091 + }, + { + "x":944.182, + "y":15.0909 + }, + { + "x":972, + "y":8.18182 + }, + { + "x":1000.18, + "y":1.09091 + }, + { + "x":1029.64, + "y":-10 + }, + { + "x":1061.64, + "y":-22.1818 + }, + { + "x":1090.18, + "y":-38.9091 + }, + { + "x":1124, + "y":-53.6364 + }, + { + "x":1155.82, + "y":-73.2727 + }, + { + "x":1191.09, + "y":-90.5455 + }, + { + "x":1222.18, + "y":-105.091 + }, + { + "x":1254, + "y":-118.182 + }, + { + "x":1286.55, + "y":-128.545 + }, + { + "x":1317.64, + "y":-137.818 + }, + { + "x":1348.91, + "y":-144.909 + }, + { + "x":1385.64, + "y":-149.091 + }, + { + "x":1417.09, + "y":-148.727 + }, + { + "x":1450.91, + "y":-145.091 + }, + { + "x":1487.09, + "y":-137.091 + }, + { + "x":1515.82, + "y":-124.182 + }, + { + "x":1538.18, + "y":-108.727 + }, + { + "x":1563.82, + "y":-95.6364 + }, + { + "x":1596.18, + "y":-87.6364 + }, + { + "x":1631.82, + "y":-82.9091 + }, + { + "x":1665.27, + "y":-81.8182 + }, + { + "x":1709.09, + "y":-88 + }, + { + "x":1745.09, + "y":-93.8182 + }, + { + "x":1779.64, + "y":-103.636 + }, + { + "x":1811.09, + "y":-112.909 + }, + { + "x":1841.27, + "y":-124.545 + }, + { + "x":1874.91, + "y":-137.455 + }, + { + "x":1902.55, + "y":-149.455 + }, + { + "x":1931.64, + "y":-161.455 + }, + { + "x":1964.18, + "y":-176.909 + }, + { + "x":1992.36, + "y":-191.818 + }, + { + "x":2022.18, + "y":-207.818 + }, + { + "x":2056.36, + "y":-224.909 + }, + { + "x":2092.18, + "y":-240 + }, + { + "x":2133.27, + "y":-255.636 + }, + { + "x":2174.18, + "y":-268.909 + }, + { + "x":2213.09, + "y":-278.909 + }, + { + "x":2250, + "y":-284.727 + }, + { + "x":2284.18, + "y":-288.364 + }, + { + "x":2320.91, + "y":-286.182 + }, + { + "x":2356.18, + "y":-284.182 + }, + { + "x":2390, + "y":-278.182 + }, + { + "x":2421.09, + "y":-270 + }, + { + "x":2454.73, + "y":-256.909 + }, + { + "x":2474.18, + "y":-243.636 + }, + { + "x":2501.64, + "y":-231.091 + }, + { + "x":2527.09, + "y":-221.818 + }, + { + "x":2554.91, + "y":-215.818 + }, + { + "x":2585.09, + "y":-212.909 + }, + { + "x":2618, + "y":-214.727 + }, + { + "x":2658, + "y":-220 + }, + { + "x":2686.91, + "y":-227.818 + }, + { + "x":2716.91, + "y":-238.727 + }, + { + "x":2744.18, + "y":-252.182 + }, + { + "x":2764.91, + "y":-262.364 + }, + { + "x":2792.73, + "y":-279.273 + }, + { + "x":2819.45, + "y":-295.455 + }, + { + "x":2846.73, + "y":-315.091 + }, + { + "x":2872.36, + "y":-333.455 + }, + { + "x":2900.18, + "y":-350 + }, + { + "x":2932, + "y":-366.727 + }, + { + "x":2966, + "y":-382 + }, + { + "x":3000.36, + "y":-394.727 + }, + { + "x":3039.09, + "y":-405.818 + }, + { + "x":3078.73, + "y":-412.909 + }, + { + "x":3120.91, + "y":-415.091 + }, + { + "x":3170.55, + "y":-413.273 + }, + { + "x":3212.36, + "y":-407.636 + }, + { + "x":3248.73, + "y":-400 + }, + { + "x":3283.27, + "y":-389.273 + }, + { + "x":3312, + "y":-377.455 + }, + { + "x":3342.36, + "y":-365.636 + }, + { + "x":3372.18, + "y":-358 + }, + { + "x":3402.91, + "y":-355.091 + }, + { + "x":3452.91, + "y":-355.636 + }, + { + "x":3495.45, + "y":-362.909 + }, + { + "x":3540.73, + "y":-373.273 + }, + { + "x":3576.18, + "y":-385.273 + }, + { + "x":3616.36, + "y":-400.909 + }, + { + "x":3656, + "y":-419.273 + }, + { + "x":3692.18, + "y":-436.909 + }, + { + "x":3732.55, + "y":-459.273 + }, + { + "x":3766.73, + "y":-477.091 + }, + { + "x":3809.09, + "y":-495.636 + }, + { + "x":3849.27, + "y":-509.636 + }, + { + "x":3894.36, + "y":-520.727 + }, + { + "x":3934, + "y":-526.545 + }, + { + "x":3984.73, + "y":-527.636 + }, + { + "x":4030.91, + "y":-523.091 + }, + { + "x":4070.36, + "y":-512.545 + }, + { + "x":4107.82, + "y":-498.364 + }, + { + "x":4143.09, + "y":-485.636 + }, + { + "x":4179.09, + "y":-477.091 + }, + { + "x":4220.18, + "y":-472.909 + }, + { + "x":4257.64, + "y":-473.091 + }, + { + "x":4303.27, + "y":-478.909 + }, + { + "x":4347.27, + "y":-489.455 + }, + { + "x":4405.27, + "y":-508.727 + }, + { + "x":4465.82, + "y":-536.727 + }, + { + "x":4526.91, + "y":-570.727 + }, + { + "x":4583.45, + "y":-599.636 + }, + { + "x":4636.91, + "y":-620.727 + }, + { + "x":4678, + "y":-633.818 + }, + { + "x":4722.73, + "y":-644 + }, + { + "x":4765.82, + "y":-650.364 + }, + { + "x":4817.82, + "y":-651.273 + }, + { + "x":4865.09, + "y":-644.909 + }, + { + "x":4905.09, + "y":-634 + }, + { + "x":4942.73, + "y":-620.182 + }, + { + "x":4976.18, + "y":-597.455 + }, + { + "x":5009.09, + "y":-583.091 + }, + { + "x":5049.09, + "y":-573.818 + }, + { + "x":5079.09, + "y":-571.636 + }, + { + "x":5111.45, + "y":-571.636 + }, + { + "x":5147.09, + "y":-576.364 + }, + { + "x":5184, + "y":-584.909 + }, + { + "x":5223.45, + "y":-596.909 + }, + { + "x":5261.64, + "y":-610.727 + }, + { + "x":5302.18, + "y":-628 + }, + { + "x":5350.73, + "y":-654 + }, + { + "x":5409.27, + "y":-686.909 + }, + { + "x":5461.27, + "y":-720.727 + }, + { + "x":5509.82, + "y":-749.091 + }, + { + "x":5548.73, + "y":-767.636 + }, + { + "x":5588.91, + "y":-781.455 + }, + { + "x":5619.45, + "y":-789.455 + }, + { + "x":5652.36, + "y":-794.182 + }, + { + "x":5684.91, + "y":-794.545 + }, + { + "x":5723.64, + "y":-786.364 + }, + { + "x":5756.55, + "y":-771.818 + }, + { + "x":5787.45, + "y":-751.091 + }, + { + "x":5822.55, + "y":-724.909 + }, + { + "x":5860.73, + "y":-708 + }, + { + "x":5893.45, + "y":-699.636 + }, + { + "x":5922.73, + "y":-696.727 + }, + { + "x":5957.64, + "y":-697.455 + }, + { + "x":5987.64, + "y":-701.818 + }, + { + "x":6026.73, + "y":-711.273 + }, + { + "x":6067.27, + "y":-726.909 + }, + { + "x":6102, + "y":-742.364 + }, + { + "x":6133.64, + "y":-759.091 + }, + { + "x":6167.82, + "y":-779.091 + }, + { + "x":6202.73, + "y":-802.727 + }, + { + "x":6235.09, + "y":-822.727 + }, + { + "x":6262.91, + "y":-840 + }, + { + "x":6302.36, + "y":-859.273 + }, + { + "x":6337.45, + "y":-872.364 + }, + { + "x":6368.55, + "y":-883.273 + }, + { + "x":6402, + "y":-891.455 + }, + { + "x":6438.55, + "y":-895.273 + }, + { + "x":6475.09, + "y":-895.636 + }, + { + "x":6507.82, + "y":-890.545 + }, + { + "x":6541.64, + "y":-882.182 + }, + { + "x":6584, + "y":-863.273 + }, + { + "x":6612, + "y":-841.091 + }, + { + "x":6642.18, + "y":-824.364 + }, + { + "x":6676.55, + "y":-814.727 + }, + { + "x":6710.18, + "y":-811.273 + }, + { + "x":6749.82, + "y":-813.091 + }, + { + "x":6783.27, + "y":-819.455 + }, + { + "x":6816.18, + "y":-828 + }, + { + "x":6844, + "y":-840 + }, + { + "x":6878.73, + "y":-853.636 + }, + { + "x":6912.55, + "y":-871.091 + }, + { + "x":6943.82, + "y":-889.091 + }, + { + "x":6994, + "y":-921.636 + }, + { + "x":7157.82, + "y":-944.364 + }, + { + "x":7398.18, + "y":-980 + }, + { + "x":7633.18, + "y":-1009 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":141.818, + "y":2270 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":3280, + "id":20, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":328, + "x":16, + "y":16 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":3312, + "id":22, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":440, + "x":7371, + "y":-8 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":15.2727, + "id":23, + "name":"Truck", + "properties": + { + "type":4 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":72.3636, + "x":715.091, + "y":2224.73 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }], + "nextobjectid":104, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.0.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":109 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level07.json b/jellytruck/js/data/Level07.json new file mode 100644 index 0000000000000000000000000000000000000000..5763108d408e3d7daf8a86f980cde07c62e7ed0e --- /dev/null +++ b/jellytruck/js/data/Level07.json @@ -0,0 +1,1172 @@ +{ "height":31, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":31, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":91, + "x":0, + "y":0 + }, + { + "image":"Level_07_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lego", + "objects":[ + { + "height":26, + "id":59, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":true, + "physics_key":"mill1", + "speed":200, + "texture":"mill1", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":30, + "x":1160, + "y":1346 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Crusher", + "objects":[ + { + "ellipse":true, + "height":130, + "id":34, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2278, + "y":1422 + }, + { + "ellipse":true, + "height":130, + "id":35, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2278, + "y":1562 + }, + { + "ellipse":true, + "height":130, + "id":36, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2278, + "y":1703 + }, + { + "ellipse":true, + "height":130, + "id":37, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2385, + "y":1793.5 + }, + { + "ellipse":true, + "height":130, + "id":38, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2532, + "y":1790 + }, + { + "ellipse":true, + "height":130, + "id":39, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2447.83, + "y":1360.17 + }, + { + "ellipse":true, + "height":130, + "id":40, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2448, + "y":1496 + }, + { + "ellipse":true, + "height":130, + "id":41, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":2448.5, + "y":1632.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":124, + "id":42, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":5376, + "x":644, + "y":2100 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":33, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":5850, + "y":1364 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":26, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":109.333, + "y":2.66667 + }, + { + "x":113.333, + "y":198.667 + }, + { + "x":-1.33333, + "y":196 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1561.33, + "y":1177.33 + }, + { + "height":0, + "id":27, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114.667, + "y":-1.33333 + }, + { + "x":116, + "y":194.667 + }, + { + "x":1.33333, + "y":198.667 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3682.67, + "y":1697.33 + }, + { + "height":0, + "id":28, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114.667, + "y":0 + }, + { + "x":113.333, + "y":193.333 + }, + { + "x":0, + "y":198.667 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4674.67, + "y":1701.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":29, + "name":"", + "polygon":[ + { + "x":0, + "y":-9.33333 + }, + { + "x":236, + "y":-8.66667 + }, + { + "x":234.667, + "y":298.667 + }, + { + "x":-1.33333, + "y":298 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4690, + "y":1366 + }, + { + "height":0, + "id":30, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1076, + "y":-2.92308 + }, + { + "x":1072, + "y":222.154 + }, + { + "x":10, + "y":225.077 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5192.67, + "y":1360.59 + }, + { + "height":0, + "id":31, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":204, + "y":-4 + }, + { + "x":212, + "y":362 + }, + { + "x":-2, + "y":364 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2510, + "y":1036 + }, + { + "height":0, + "id":32, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":164, + "y":-114 + }, + { + "x":558, + "y":462 + }, + { + "x":372, + "y":574 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2216, + "y":938 + }, + { + "height":0, + "id":44, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":279, + "y":0 + }, + { + "x":281, + "y":218 + }, + { + "x":0, + "y":218 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2377, + "y":1839 + }, + { + "height":0, + "id":47, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1881.33, + "y":4 + }, + { + "x":1881.33, + "y":312 + }, + { + "x":5.33333, + "y":324 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2806.67, + "y":1354.67 + }, + { + "height":0, + "id":48, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":217.333, + "y":-1.33333 + }, + { + "x":220, + "y":153.333 + }, + { + "x":-1.33333, + "y":157.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2589.33, + "y":1525.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":37, + "id":68, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":520, + "x":3013.67, + "y":1646 + }, + { + "height":37.3333, + "id":69, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":401.333, + "x":4029.67, + "y":1637.17 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":19, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":222.75, + "y":-3 + }, + { + "x":498, + "y":-3.75 + }, + { + "x":614.5, + "y":-5 + }, + { + "x":738.75, + "y":-4.5 + }, + { + "x":782.5, + "y":55 + }, + { + "x":834, + "y":112.5 + }, + { + "x":889.25, + "y":162.5 + }, + { + "x":956.5, + "y":203.25 + }, + { + "x":1000.75, + "y":220.25 + }, + { + "x":1061.75, + "y":228.25 + }, + { + "x":1130, + "y":219.75 + }, + { + "x":1188.25, + "y":196.75 + }, + { + "x":1245.75, + "y":161 + }, + { + "x":1295, + "y":118.5 + }, + { + "x":1351.75, + "y":59.75 + }, + { + "x":1387.5, + "y":15.75 + }, + { + "x":1405.75, + "y":-8.25 + }, + { + "x":1442.75, + "y":14 + }, + { + "x":1484.75, + "y":31.5 + }, + { + "x":1530.75, + "y":42 + }, + { + "x":1588, + "y":50.75 + }, + { + "x":1642.25, + "y":51.5 + }, + { + "x":1691, + "y":45.5 + }, + { + "x":1751, + "y":32.75 + }, + { + "x":1794.25, + "y":21 + }, + { + "x":1844.5, + "y":2.25 + }, + { + "x":1960.75, + "y":0.5 + }, + { + "x":2068, + "y":-0.25 + }, + { + "x":2195.5, + "y":-0.75 + }, + { + "x":2230.5, + "y":22.25 + }, + { + "x":2261, + "y":59 + }, + { + "x":2181.5, + "y":68.25 + }, + { + "x":2146.75, + "y":165.25 + }, + { + "x":2131.5, + "y":220.5 + }, + { + "x":2134.25, + "y":302 + }, + { + "x":2140.75, + "y":497.5 + }, + { + "x":2273.58, + "y":487.5 + }, + { + "x":2274.08, + "y":554.583 + }, + { + "x":2553.5, + "y":560.5 + }, + { + "x":2563.75, + "y":481.25 + }, + { + "x":3402.17, + "y":483.25 + }, + { + "x":3831.5, + "y":481.917 + }, + { + "x":4079.5, + "y":484.583 + }, + { + "x":4507.5, + "y":487.25 + }, + { + "x":4846.17, + "y":487.25 + }, + { + "x":5138.17, + "y":488.583 + }, + { + "x":5358.17, + "y":487.25 + }, + { + "x":5663.5, + "y":484.583 + }, + { + "x":6210.17, + "y":485.917 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":104.5, + "y":1356.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2232, + "id":23, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":176, + "x":12, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":1896, + "id":24, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":164, + "x":6244, + "y":292 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":13.75, + "id":25, + "name":"Truck", + "properties": + { + "type":2 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73, + "x":662.75, + "y":1274.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":39, + "id":45, + "name":"", + "properties": + { + "obj_name":"Shape6", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":45, + "x":3071, + "y":1789 + }, + { + "height":39, + "id":46, + "name":"", + "properties": + { + "obj_name":"Shape6", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":45, + "x":3417, + "y":1784 + }, + { + "height":36, + "id":50, + "name":"", + "properties": + { + "obj_name":"BladeUp", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":344, + "x":4060, + "y":1677.33 + }, + { + "height":42.6667, + "id":51, + "name":"", + "properties": + { + "obj_name":"BladeDown", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":372, + "x":4051, + "y":1827.33 + }, + { + "height":146.667, + "id":52, + "name":"", + "properties": + { + "obj_name":"Pusher", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":32.6667, + "x":5050.67, + "y":1757.33 + }, + { + "height":38.6667, + "id":63, + "name":"", + "properties": + { + "obj_name":"Mill", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":41.3333, + "x":5053.33, + "y":937.333 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Camera", + "objects":[ + { + "height":334.667, + "id":60, + "name":"", + "properties": + { + "focusX":5072, + "focusY":1565, + "zoom":0.8 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":402.667, + "x":4865.33, + "y":1580 + }, + { + "height":381.333, + "id":64, + "name":"", + "properties": + { + "focusX":2499, + "focusY":1563, + "zoom":0.8 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":149.333, + "x":2349.33, + "y":1436 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":71, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":91 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level08.json b/jellytruck/js/data/Level08.json new file mode 100644 index 0000000000000000000000000000000000000000..2460823e32a544ae5eed4fb8e09d458fad605f1c --- /dev/null +++ b/jellytruck/js/data/Level08.json @@ -0,0 +1,772 @@ +{ "height":28, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":28, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":78, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/JellyTruck_Dev\/Jelly_Resources\/Level\/Level08\/Level_08_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":132, + "id":46, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":2612, + "x":1248, + "y":1872 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":272, + "id":47, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":2136, + "x":224, + "y":1608 + }, + { + "height":288, + "id":48, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":2608, + "x":2680, + "y":1704 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":45, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":3067, + "y":1624.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":37, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":673.667, + "y":0.333333 + }, + { + "x":673.667, + "y":25 + }, + { + "x":0, + "y":25.6667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1881, + "y":652 + }, + { + "height":0, + "id":38, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23.6667, + "y":0 + }, + { + "x":24.6667, + "y":834.667 + }, + { + "x":-0.666667, + "y":834.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1869.33, + "y":661.667 + }, + { + "height":0, + "id":39, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1151, + "y":0 + }, + { + "x":1150, + "y":24.6667 + }, + { + "x":0.666667, + "y":25.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1880.67, + "y":1488.67 + }, + { + "height":0, + "id":40, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":258.667, + "y":-0.666667 + }, + { + "x":258.667, + "y":18.3333 + }, + { + "x":0, + "y":18.6667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3022.67, + "y":1487.67 + }, + { + "height":0, + "id":41, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":25.6667, + "y":-0.333333 + }, + { + "x":24.6667, + "y":157 + }, + { + "x":0.333333, + "y":157 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3007.33, + "y":1493 + }, + { + "height":0, + "id":42, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":716.667, + "y":-0.333333 + }, + { + "x":717, + "y":24.3333 + }, + { + "x":0.333333, + "y":24.3333 + }], + "rotation":0, + "type":"static", + "visible":false, + "width":0, + "x":3013, + "y":1624.33 + }, + { + "height":0, + "id":43, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":716.333, + "y":0.333333 + }, + { + "x":717, + "y":25.3333 + }, + { + "x":0, + "y":25.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2722.67, + "y":651.667 + }, + { + "height":0, + "id":44, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":25.3333, + "y":0.333333 + }, + { + "x":25, + "y":691.333 + }, + { + "x":-0.333333, + "y":691.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3418.67, + "y":659.667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":30, + "id":49, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":31, + "x":2613, + "y":794 + }, + { + "height":30, + "id":50, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":31, + "x":2424, + "y":959 + }, + { + "height":30, + "id":51, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":31, + "x":2799, + "y":959 + }, + { + "height":30, + "id":52, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":31, + "x":2256, + "y":1124 + }, + { + "height":30, + "id":53, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":31, + "x":2614, + "y":1122 + }, + { + "height":30, + "id":54, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":31, + "x":2963, + "y":1123 + }, + { + "height":40, + "id":57, + "name":"", + "properties": + { + "obj_name":"Lift8", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":63.3333, + "x":3583.33, + "y":1561.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2008, + "id":31, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":308, + "x":5304, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Camera", + "objects":[ + { + "height":92, + "id":55, + "name":"", + "properties": + { + "focusX":2375, + "focusY":850, + "zoom":0.65 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":875.333333333333, + "x":2020, + "y":594 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":70, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":427.273, + "y":0 + }, + { + "x":427.273, + "y":33.3333 + }, + { + "x":3.0303, + "y":3.0303 + }, + { + "x":6.06061, + "y":36.3636 + }, + { + "x":427.273, + "y":33.3333 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":1116, + "y":1 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2024, + "id":32, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":192, + "x":0, + "y":-8 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":16, + "id":33, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":74.3333, + "x":2018, + "y":554.667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":34, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":189.333, + "y":0 + }, + { + "x":190.667, + "y":60 + }, + { + "x":-1.33333, + "y":60 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2354.67, + "y":1193.33 + }, + { + "height":0, + "id":35, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":172, + "y":0 + }, + { + "x":170.667, + "y":60 + }, + { + "x":0, + "y":58.6667 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2717.33, + "y":1188 + }, + { + "height":0, + "id":36, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":62.6667, + "y":1.33333 + }, + { + "x":60, + "y":172 + }, + { + "x":-1.33333, + "y":172 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3184, + "y":1524 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":71, + "orientation":"orthogonal", + "renderorder":"right-down", + "templategroups":[], + "tiledversion":"2017.10.11", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":78 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level09.json b/jellytruck/js/data/Level09.json new file mode 100644 index 0000000000000000000000000000000000000000..67ad23a544eebbe9ce2a55aff7ecfa23dbfc68c9 --- /dev/null +++ b/jellytruck/js/data/Level09.json @@ -0,0 +1,1202 @@ +{ "height":37, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":37, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":87, + "x":0, + "y":0 + }, + { + "image":"level09_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Crusher", + "objects":[ + { + "ellipse":true, + "height":132, + "id":53, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2004, + "y":1191 + }, + { + "ellipse":true, + "height":132, + "id":54, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2004.5, + "y":1331.5 + }, + { + "ellipse":true, + "height":132, + "id":55, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2004.5, + "y":1472.5 + }, + { + "ellipse":true, + "height":132, + "id":56, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2040, + "y":1608.5 + }, + { + "ellipse":true, + "height":132, + "id":57, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2057, + "y":1748.5 + }, + { + "ellipse":true, + "height":132, + "id":58, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":134, + "x":2056, + "y":1889.5 + }, + { + "ellipse":true, + "height":132, + "id":59, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2174, + "y":1129 + }, + { + "ellipse":true, + "height":132, + "id":60, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2174.5, + "y":1265 + }, + { + "ellipse":true, + "height":132, + "id":61, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2174, + "y":1402 + }, + { + "ellipse":true, + "height":132, + "id":62, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":134, + "x":2217, + "y":1547 + }, + { + "ellipse":true, + "height":132, + "id":63, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":135, + "x":2224.5, + "y":1686 + }, + { + "ellipse":true, + "height":132, + "id":64, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":2227, + "y":1823 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":51, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":3594, + "y":928 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":216, + "id":52, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":6176, + "x":8, + "y":2392 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":39, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3376, + "y":8 + }, + { + "x":3376, + "y":152 + }, + { + "x":16, + "y":160 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":56, + "y":336 + }, + { + "height":0, + "id":40, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3376, + "y":-40 + }, + { + "x":3368, + "y":104 + }, + { + "x":0, + "y":144 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2792, + "y":368 + }, + { + "height":0, + "id":68, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":568, + "y":32 + }, + { + "x":493, + "y":609 + }, + { + "x":64, + "y":592 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2324, + "y":518 + }, + { + "height":0, + "id":71, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":427, + "y":18 + }, + { + "x":473, + "y":323 + }, + { + "x":-38, + "y":329 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2389, + "y":1109 + }, + { + "height":0, + "id":72, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":509, + "y":-5 + }, + { + "x":445, + "y":290 + }, + { + "x":65, + "y":283 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2352, + "y":1437 + }, + { + "height":0, + "id":73, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":381, + "y":7 + }, + { + "x":426, + "y":216 + }, + { + "x":-54, + "y":216 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2417, + "y":1719 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":41, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":520, + "y":8 + }, + { + "x":504, + "y":184 + }, + { + "x":0, + "y":192 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":752, + "y":712 + }, + { + "height":0, + "id":42, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":352, + "y":0 + }, + { + "x":360, + "y":80 + }, + { + "x":0, + "y":80 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2152, + "y":2008 + }, + { + "height":0, + "id":43, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":374.667, + "y":-1.33333 + }, + { + "x":376, + "y":88 + }, + { + "x":1.33333, + "y":89.3333 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2962.67, + "y":822.667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":23, + "id":66, + "name":"", + "properties": + { + "obj_name":"Balloon", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":29, + "x":1017, + "y":2011 + }, + { + "height":23, + "id":67, + "name":"", + "properties": + { + "obj_name":"Rect2_9", + "texture":"gum_1", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":24, + "x":1187, + "y":1706 + }, + { + "height":22, + "id":75, + "name":"", + "properties": + { + "obj_name":"Rect1_9", + "texture":"gum_2", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":23, + "x":762, + "y":1447 + }, + { + "height":22, + "id":76, + "name":"", + "properties": + { + "obj_name":"Rect2_9", + "texture":"gum_3", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":20, + "x":1204, + "y":1239 + }, + { + "height":23, + "id":77, + "name":"", + "properties": + { + "obj_name":"Rect1_9", + "texture":"gum_4", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":24, + "x":774, + "y":978 + }, + { + "height":21, + "id":78, + "name":"", + "properties": + { + "obj_name":"Shape1_9", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":13, + "x":1321, + "y":760 + }, + { + "height":21, + "id":80, + "name":"", + "properties": + { + "obj_name":"Rect1_9", + "texture":"gum_1", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":21, + "x":2784, + "y":1669 + }, + { + "height":21, + "id":81, + "name":"", + "properties": + { + "obj_name":"Rect2_9", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":25, + "x":3323, + "y":1671 + }, + { + "height":12, + "id":82, + "name":"", + "properties": + { + "obj_name":"Shape9", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":21, + "x":3057, + "y":1607 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lego", + "objects":[ + { + "height":25, + "id":79, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":true, + "physics_key":"mill1", + "speed":-120, + "texture":"mill2", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":23, + "x":3138, + "y":1123 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":34, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":622.25, + "y":0.5 + }, + { + "x":586.5, + "y":203.25 + }, + { + "x":620.75, + "y":514 + }, + { + "x":567.75, + "y":805.25 + }, + { + "x":618, + "y":1064.5 + }, + { + "x":578.75, + "y":1275.5 + }, + { + "x":1054.5, + "y":1277.5 + }, + { + "x":1098, + "y":1058.5 + }, + { + "x":1031.25, + "y":800 + }, + { + "x":1097, + "y":517.25 + }, + { + "x":1049, + "y":203.25 + }, + { + "x":1098, + "y":1 + }, + { + "x":1770.75, + "y":1 + }, + { + "x":1815, + "y":204.75 + }, + { + "x":1770, + "y":512.75 + }, + { + "x":1782.75, + "y":546.5 + }, + { + "x":1834.75, + "y":799.5 + }, + { + "x":1768.5, + "y":1059 + }, + { + "x":1821, + "y":1318.5 + }, + { + "x":2260.5, + "y":1318.25 + }, + { + "x":2650.5, + "y":1351.75 + }, + { + "x":3033.25, + "y":1349.5 + }, + { + "x":3171.25, + "y":1025.5 + }, + { + "x":3132.25, + "y":800.25 + }, + { + "x":3163.5, + "y":514 + }, + { + "x":3203.5, + "y":202.75 + }, + { + "x":3166, + "y":1.25 + }, + { + "x":3665.5, + "y":2 + }, + { + "x":3713.75, + "y":203.25 + }, + { + "x":3664.75, + "y":516.25 + }, + { + "x":3743, + "y":801.5 + }, + { + "x":3664.5, + "y":1061.75 + }, + { + "x":3751, + "y":1397 + }, + { + "x":4253.5, + "y":1388.5 + }, + { + "x":4148.75, + "y":1060.5 + }, + { + "x":4227.25, + "y":810.25 + }, + { + "x":4151, + "y":517.5 + }, + { + "x":4212, + "y":205.25 + }, + { + "x":4150, + "y":-0.5 + }, + { + "x":6003, + "y":-0.5 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":165.75, + "y":926.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2680, + "id":36, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":216, + "x":-16, + "y":-16 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2680, + "id":37, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":592, + "x":3760, + "y":-8 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.5, + "id":38, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":72.5, + "x":988.5, + "y":2161.5 + }, + { + "height":98, + "id":65, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":4, + "x":1023, + "y":2031 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":83, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":87 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level10.json b/jellytruck/js/data/Level10.json new file mode 100644 index 0000000000000000000000000000000000000000..42c0c594ce71d39dc39ed628e81f8702d28faeed --- /dev/null +++ b/jellytruck/js/data/Level10.json @@ -0,0 +1,969 @@ +{ "height":50, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":384, + "id":45, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":3920, + "x":640, + "y":2896 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":352, + "id":47, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":1656, + "x":1704, + "y":2296 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":46, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":1294, + "y":1136 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":42, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92, + "y":0 + }, + { + "x":92, + "y":920 + }, + { + "x":8, + "y":920 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3280, + "y":1340 + }, + { + "height":0, + "id":43, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100, + "y":0 + }, + { + "x":88, + "y":920 + }, + { + "x":16, + "y":920 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3880, + "y":160 + }, + { + "height":0, + "id":44, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":84, + "y":0 + }, + { + "x":72, + "y":908 + }, + { + "x":-12, + "y":904 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1820, + "y":236 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":36, + "name":"Ground", + "polyline":[ + { + "x":-0.687747035573121, + "y":-5 + }, + { + "x":697.272727272727, + "y":-4 + }, + { + "x":1513.33333333333, + "y":-1.66666666666652 + }, + { + "x":1777.3125, + "y":1.9375 + }, + { + "x":1828, + "y":380 + }, + { + "x":1764, + "y":646 + }, + { + "x":1814, + "y":900 + }, + { + "x":1800, + "y":1696 + }, + { + "x":2978, + "y":1730 + }, + { + "x":3032, + "y":1256 + }, + { + "x":3160, + "y":594 + }, + { + "x":3122, + "y":382 + }, + { + "x":3165.25, + "y":-5.25 + }, + { + "x":3678.09090909091, + "y":-5.27272727272725 + }, + { + "x":4167.5625, + "y":-5.1875 + }, + { + "x":6009.75, + "y":-5.25 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":20, + "y":1784 + }, + { + "height":0, + "id":37, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":813, + "y":-2 + }, + { + "x":824, + "y":210.5 + }, + { + "x":820, + "y":372 + }, + { + "x":28, + "y":396 + }, + { + "x":60, + "y":188 + }, + { + "x":4, + "y":8 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":3184, + "y":1004 + }, + { + "height":0, + "id":38, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":1411.89699570815, + "y":-4 + }, + { + "x":1411.89699570815, + "y":56 + }, + { + "x":1450.9356223176, + "y":152 + }, + { + "x":-65.0643776824034, + "y":188 + }, + { + "x":-6.50643776824034, + "y":0 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":521.064377682403, + "y":1136 + }, + { + "height":0, + "id":78, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":260.47572815534, + "y":-6.62311557788945 + }, + { + "x":264, + "y":697.082914572864 + }, + { + "x":262.718446601942, + "y":1231.89949748744 + }, + { + "x":8.97087378640777, + "y":1311.37688442211 + }, + { + "x":19.2233009708738, + "y":622.572864321608 + }, + { + "x":1.28155339805825, + "y":26.4924623115578 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":232, + "y":-13.3768844221104 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":64, + "name":"", + "polygon":[ + { + "x":-15.75, + "y":6.75 + }, + { + "x":98.8039772727273, + "y":-81.4772727272727 + }, + { + "x":253.026515151515, + "y":-81.4507575757577 + }, + { + "x":268.151515151515, + "y":17.465909090909 + }, + { + "x":113.318181818182, + "y":18.465909090909 + }, + { + "x":-10.8636363636363, + "y":17.5454545454545 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1523.18181818182, + "y":1783.90909090909 + }, + { + "height":0, + "id":65, + "name":"", + "polygon":[ + { + "x":5.9284722222219, + "y":-1.94513888888889 + }, + { + "x":151.831092171718, + "y":-1.9674873737373 + }, + { + "x":250.765625, + "y":74 + }, + { + "x":-2, + "y":75.5 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3185, + "y":928.5 + }, + { + "height":0, + "id":67, + "name":"", + "polygon":[ + { + "x":26.3333333333335, + "y":-0.333333333333258 + }, + { + "x":26.1666666666665, + "y":72.0833333333333 + }, + { + "x":68.791666666667, + "y":71.7083333333333 + }, + { + "x":68.666666666667, + "y":-0.666666666666515 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3225, + "y":1411 + }, + { + "height":0, + "id":69, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":45, + "y":0 + }, + { + "x":45.5, + "y":338 + }, + { + "x":0, + "y":337.75 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1638, + "y":722 + }, + { + "height":0, + "id":70, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":45, + "y":0 + }, + { + "x":43.5, + "y":338.5 + }, + { + "x":0.5, + "y":338.5 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1760, + "y":787 + }, + { + "height":0, + "id":74, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2.66666666666697, + "y":185.333333333333 + }, + { + "x":530.666666666667, + "y":185.333333333333 + }, + { + "x":533.333333333333, + "y":1.33333333333331 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3036, + "y":392 + }, + { + "height":0, + "id":75, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-45.4545454545455, + "y":318.181818181818 + }, + { + "x":1284.84848484848, + "y":533.333333333333 + }, + { + "x":1254.54545454545, + "y":212.121212121212 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1942.42424242424, + "y":781.818181818182 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Camera", + "objects":[ + { + "height":351.515, + "id":48, + "name":"", + "properties": + { + "focusX":1400, + "focusY":1500, + "zoom":1 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":503.03, + "x":1166.67, + "y":1439.39 + }, + { + "height":339.394, + "id":50, + "name":"", + "properties": + { + "focusX":3295, + "focusY":845, + "zoom":1 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":493.939, + "x":3296.97, + "y":684.848 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":36, + "id":53, + "name":"", + "properties": + { + "obj_name":"Hammer_Right", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":35, + "x":1589, + "y":1384 + }, + { + "height":26, + "id":54, + "name":"", + "properties": + { + "obj_name":"Hammer_Left", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.2 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":28, + "x":3354, + "y":580 + }, + { + "height":41, + "id":56, + "name":"", + "properties": + { + "obj_name":"Lift1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":50, + "x":4113, + "y":1717 + }, + { + "height":24, + "id":57, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":24, + "x":1711, + "y":1090 + }, + { + "height":26, + "id":58, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":24, + "x":1710, + "y":1027 + }, + { + "height":23, + "id":59, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":23, + "x":1710, + "y":965 + }, + { + "height":20, + "id":60, + "name":"", + "properties": + { + "obj_name":"Cube2", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":30, + "x":1602, + "y":1093 + }, + { + "height":37, + "id":62, + "name":"", + "properties": + { + "obj_name":"Cube3", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":17, + "x":1717, + "y":847 + }, + { + "height":18.5454545454547, + "id":66, + "name":"", + "properties": + { + "obj_name":"Shape1", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":9.09090909090901, + "x":3447, + "y":1612.82 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":3664, + "id":39, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":528, + "x":-24.0303, + "y":-51.0303 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":3680, + "id":40, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":512, + "x":4679.39, + "y":-35.8788 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":16.5, + "id":41, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73.5, + "x":844, + "y":1743 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":79, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":99 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level11.json b/jellytruck/js/data/Level11.json new file mode 100644 index 0000000000000000000000000000000000000000..ee5fb71978095be20b6746e6a6ed26d25d1fcd8f --- /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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":36, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":85, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/..\/Jelly_Resource\/Level\/Level11\/Level11_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":62, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":2858, + "y":1575 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":0, + "id":61, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_1", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":0, + "x":5242, + "y":1116 + }, + { + "height":61.3333333333333, + "id":64, + "name":"", + "properties": + { + "obj_name":"Ball11", + "texture":"hallow", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":56, + "x":476, + "y":688 + }, + { + "height":32, + "id":65, + "name":"", + "properties": + { + "obj_name":"Shape1_11", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":20, + "x":2637.33333333333, + "y":653.333333333333 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":54, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54, + "y":-2 + }, + { + "x":76, + "y":814 + }, + { + "x":20, + "y":816 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2500, + "y":1008 + }, + { + "height":0, + "id":57, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":96, + "y":3.33333 + }, + { + "x":90, + "y":520 + }, + { + "x":0, + "y":516.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5222, + "y":952.667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":58, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":0 + }, + { + "x":114, + "y":190 + }, + { + "x":0, + "y":194 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4830, + "y":1348 + }, + { + "height":0, + "id":59, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":0 + }, + { + "x":112, + "y":198 + }, + { + "x":2, + "y":196 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3382, + "y":1292 + }, + { + "height":0, + "id":60, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":110, + "y":-2 + }, + { + "x":110, + "y":194 + }, + { + "x":-4, + "y":196 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2818, + "y":684 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":47, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":842.5, + "y":0.5 + }, + { + "x":903.75, + "y":32.25 + }, + { + "x":981.5, + "y":57 + }, + { + "x":1046.25, + "y":71.5 + }, + { + "x":1132.75, + "y":73.5 + }, + { + "x":1213.5, + "y":67.5 + }, + { + "x":1305.5, + "y":47 + }, + { + "x":1362.75, + "y":27 + }, + { + "x":1422.25, + "y":-2.75 + }, + { + "x":1481, + "y":-11.5 + }, + { + "x":1545.25, + "y":-17.25 + }, + { + "x":1609.5, + "y":-22.5 + }, + { + "x":1672.75, + "y":-25.25 + }, + { + "x":1723.5, + "y":-23.75 + }, + { + "x":1783.25, + "y":-20.5 + }, + { + "x":1832.25, + "y":-15 + }, + { + "x":1898, + "y":-1.75 + }, + { + "x":1945.75, + "y":34.5 + }, + { + "x":1997.75, + "y":55.5 + }, + { + "x":2060, + "y":70.75 + }, + { + "x":2118.25, + "y":76.75 + }, + { + "x":2187.25, + "y":70.75 + }, + { + "x":2256, + "y":59.5 + }, + { + "x":2333.75, + "y":33.5 + }, + { + "x":2399.75, + "y":3.5 + }, + { + "x":2439.25, + "y":-8.5 + }, + { + "x":2494.75, + "y":-13.5 + }, + { + "x":2554.75, + "y":-16.5 + }, + { + "x":2602.75, + "y":-15.5 + }, + { + "x":2653.5, + "y":-14.75 + }, + { + "x":2720, + "y":-6.75 + }, + { + "x":2776.5, + "y":-1.25 + }, + { + "x":2833, + "y":7.25 + }, + { + "x":2873.25, + "y":14.25 + }, + { + "x":2914.75, + "y":23 + }, + { + "x":2958.75, + "y":33.25 + }, + { + "x":3013, + "y":52.25 + }, + { + "x":3062, + "y":71.75 + }, + { + "x":3115, + "y":85.25 + }, + { + "x":3175.25, + "y":92.25 + }, + { + "x":3254.75, + "y":89.5 + }, + { + "x":3327, + "y":77.5 + }, + { + "x":3393.75, + "y":58.75 + }, + { + "x":3438.5, + "y":41.5 + }, + { + "x":3489.5, + "y":19.75 + }, + { + "x":3526, + "y":-4.25 + }, + { + "x":3577.75, + "y":14.75 + }, + { + "x":3627, + "y":25.75 + }, + { + "x":3681.75, + "y":35.5 + }, + { + "x":3739.25, + "y":41.25 + }, + { + "x":3806.75, + "y":41 + }, + { + "x":3884.25, + "y":35.5 + }, + { + "x":3944.75, + "y":21.25 + }, + { + "x":4011.75, + "y":-4.75 + }, + { + "x":4048.5, + "y":21.25 + }, + { + "x":4108.5, + "y":51.25 + }, + { + "x":4170.5, + "y":72.5 + }, + { + "x":4242, + "y":86.5 + }, + { + "x":4312.25, + "y":88.25 + }, + { + "x":4376.25, + "y":82.75 + }, + { + "x":4441.5, + "y":70 + }, + { + "x":4497, + "y":53.25 + }, + { + "x":4551.75, + "y":31.5 + }, + { + "x":4624.75, + "y":-3.5 + }, + { + "x":4624.25, + "y":252 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":42.25, + "y":844.5 + }, + { + "height":0, + "id":48, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":82.6667, + "y":1.33333 + }, + { + "x":179.333, + "y":-30 + }, + { + "x":250.667, + "y":-72 + }, + { + "x":306, + "y":-112.667 + }, + { + "x":384.667, + "y":-182 + }, + { + "x":460, + "y":-229.333 + }, + { + "x":529.333, + "y":-259.333 + }, + { + "x":593.333, + "y":-270 + }, + { + "x":704, + "y":-232 + }, + { + "x":757.333, + "y":-182 + }, + { + "x":802.667, + "y":-118.667 + }, + { + "x":794.667, + "y":538.667 + }, + { + "x":688, + "y":514 + }, + { + "x":-40.6667, + "y":516.667 + }, + { + "x":-78.6667, + "y":530.667 + }, + { + "x":-154, + "y":558.667 + }, + { + "x":-230.667, + "y":579.333 + }, + { + "x":-301.333, + "y":592 + }, + { + "x":-394, + "y":592.667 + }, + { + "x":-491.333, + "y":579.333 + }, + { + "x":-562.667, + "y":554.667 + }, + { + "x":-636, + "y":520 + }, + { + "x":-706.667, + "y":496 + }, + { + "x":-790, + "y":480 + }, + { + "x":-872, + "y":474.667 + }, + { + "x":-962.667, + "y":487.333 + }, + { + "x":-1036.67, + "y":520 + }, + { + "x":-1100.67, + "y":548.667 + }, + { + "x":-1182, + "y":571.333 + }, + { + "x":-1298.67, + "y":581.333 + }, + { + "x":-1418, + "y":570 + }, + { + "x":-1541.33, + "y":535.333 + }, + { + "x":-1623.33, + "y":496 + }, + { + "x":-1740, + "y":465.333 + }, + { + "x":-1827.33, + "y":469.333 + }, + { + "x":-1906.67, + "y":493.333 + }, + { + "x":-2016.67, + "y":550.667 + }, + { + "x":-2109.33, + "y":588 + }, + { + "x":-2201.33, + "y":610.667 + }, + { + "x":-2325.33, + "y":621.333 + }, + { + "x":-2461.33, + "y":608.667 + }, + { + "x":-2616.67, + "y":561.333 + }, + { + "x":-2718.67, + "y":511.333 + }, + { + "x":-2794, + "y":493.333 + }, + { + "x":-2894.67, + "y":486.667 + }, + { + "x":-2975.33, + "y":491.333 + }, + { + "x":-3077.33, + "y":512 + }, + { + "x":-3156, + "y":535.333 + }, + { + "x":-3220, + "y":559.333 + }, + { + "x":-3308.67, + "y":593.333 + }, + { + "x":-3390, + "y":612 + }, + { + "x":-3500.67, + "y":609.333 + }, + { + "x":-3626.67, + "y":585.333 + }, + { + "x":-3748.67, + "y":541.333 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":5223.33, + "y":953.333 + }, + { + "height":0, + "id":49, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":-74.6667, + "y":46 + }, + { + "x":-182, + "y":38 + }, + { + "x":-286, + "y":-8 + }, + { + "x":-360.667, + "y":-61.3333 + }, + { + "x":-444, + "y":-133.333 + }, + { + "x":-538, + "y":-191.333 + }, + { + "x":-649.333, + "y":-224.667 + }, + { + "x":-732, + "y":-204.667 + }, + { + "x":-811.333, + "y":-153.333 + }, + { + "x":-872.667, + "y":-64 + }, + { + "x":-851.333, + "y":636.667 + }, + { + "x":-106.667, + "y":640.667 + }, + { + "x":-23.3333, + "y":638.667 + }, + { + "x":51.3333, + "y":691.333 + }, + { + "x":190, + "y":750 + }, + { + "x":292, + "y":758.667 + }, + { + "x":386, + "y":742 + }, + { + "x":487.333, + "y":691.333 + }, + { + "x":552, + "y":638.667 + }, + { + "x":623.333, + "y":628.667 + }, + { + "x":700.667, + "y":626.667 + }, + { + "x":786.667, + "y":628.667 + }, + { + "x":860, + "y":636 + }, + { + "x":945.333, + "y":648 + }, + { + "x":1022, + "y":664 + }, + { + "x":1093.33, + "y":679.333 + }, + { + "x":1173.33, + "y":699.333 + }, + { + "x":1284.67, + "y":709.333 + }, + { + "x":1384.67, + "y":690 + }, + { + "x":1485.33, + "y":658.667 + }, + { + "x":1534, + "y":636.667 + }, + { + "x":1597.33, + "y":621.333 + }, + { + "x":1664.67, + "y":612.667 + }, + { + "x":1744.67, + "y":604.667 + }, + { + "x":1821.33, + "y":606.667 + }, + { + "x":1894, + "y":614 + }, + { + "x":1962, + "y":625.333 + }, + { + "x":2013.33, + "y":637.333 + }, + { + "x":2070, + "y":655.333 + }, + { + "x":2127.33, + "y":674.667 + }, + { + "x":2174.67, + "y":694.667 + }, + { + "x":2241.33, + "y":716 + }, + { + "x":2330, + "y":733.333 + }, + { + "x":2406, + "y":736 + }, + { + "x":2497.33, + "y":721.333 + }, + { + "x":2583.33, + "y":686 + }, + { + "x":2658, + "y":636 + }, + { + "x":2692, + "y":655.333 + }, + { + "x":2750.67, + "y":682.667 + }, + { + "x":2807.33, + "y":700.667 + }, + { + "x":2862, + "y":710.667 + }, + { + "x":2925.33, + "y":712 + }, + { + "x":2988.67, + "y":703.333 + }, + { + "x":3045.33, + "y":686.667 + }, + { + "x":3101.33, + "y":661.333 + }, + { + "x":3142.67, + "y":635.333 + }, + { + "x":3165.33, + "y":650 + }, + { + "x":3204.67, + "y":673.333 + }, + { + "x":3248.67, + "y":693.333 + }, + { + "x":3294.67, + "y":708.667 + }, + { + "x":3352, + "y":722 + }, + { + "x":3408.67, + "y":726.667 + }, + { + "x":3473.33, + "y":724 + }, + { + "x":3542.67, + "y":712 + }, + { + "x":3610, + "y":697.333 + }, + { + "x":3668.67, + "y":673.333 + }, + { + "x":3733.33, + "y":646 + }, + { + "x":3762.67, + "y":632.667 + }, + { + "x":3805.33, + "y":603.333 + }, + { + "x":3858, + "y":577.333 + }, + { + "x":3916.67, + "y":554 + }, + { + "x":3963.33, + "y":540.667 + }, + { + "x":4003.33, + "y":533.333 + }, + { + "x":4082.67, + "y":528.667 + }, + { + "x":4132.67, + "y":528 + }, + { + "x":4199.33, + "y":534.667 + }, + { + "x":4262, + "y":546.667 + }, + { + "x":4318, + "y":563.333 + }, + { + "x":4375.33, + "y":580.667 + }, + { + "x":4413.33, + "y":599.333 + }, + { + "x":4466, + "y":618 + }, + { + "x":4532.67, + "y":631.333 + }, + { + "x":4580.67, + "y":634 + }, + { + "x":4621.33, + "y":630.667 + }, + { + "x":4676.67, + "y":581.333 + }, + { + "x":4732.67, + "y":536 + }, + { + "x":4784.67, + "y":508.667 + }, + { + "x":4828, + "y":489.333 + }, + { + "x":4876.67, + "y":476.667 + }, + { + "x":4924, + "y":476.667 + }, + { + "x":4970.67, + "y":487.333 + }, + { + "x":5020, + "y":515.333 + }, + { + "x":5064, + "y":561.333 + }, + { + "x":5092, + "y":597.333 + }, + { + "x":5114.67, + "y":633.333 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":910.667, + "y":1531.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2608, + "id":50, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":144, + "x":-18, + "y":-16 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2600, + "id":51, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":248, + "x":5868, + "y":-20 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":15.2727, + "id":52, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73.8182, + "x":467.091, + "y":716.909 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":66, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":85 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level12.json b/jellytruck/js/data/Level12.json new file mode 100644 index 0000000000000000000000000000000000000000..61f95ffff4801959c2ec151d89dab1ba82094d54 --- /dev/null +++ b/jellytruck/js/data/Level12.json @@ -0,0 +1,1570 @@ +{ "height":35, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":35, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":89, + "x":0, + "y":0 + }, + { + "image":"Level12_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Crusher", + "objects":[ + { + "ellipse":true, + "height":132, + "id":110, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5114, + "y":500.667 + }, + { + "ellipse":true, + "height":132, + "id":111, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5254, + "y":541.167 + }, + { + "ellipse":true, + "height":132, + "id":112, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5358.5, + "y":635.667 + }, + { + "ellipse":true, + "height":132, + "id":113, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5358.5, + "y":776.667 + }, + { + "ellipse":true, + "height":132, + "id":114, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5376, + "y":917.167 + }, + { + "ellipse":true, + "height":132, + "id":115, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5413.5, + "y":1053.67 + }, + { + "ellipse":true, + "height":132, + "id":116, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5413, + "y":1193.17 + }, + { + "ellipse":true, + "height":132, + "id":117, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5413.5, + "y":1333.17 + }, + { + "ellipse":true, + "height":132, + "id":118, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5401.5, + "y":1476.17 + }, + { + "ellipse":true, + "height":132, + "id":119, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5189.5, + "y":701 + }, + { + "ellipse":true, + "height":132, + "id":120, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5189.5, + "y":838.5 + }, + { + "ellipse":true, + "height":132, + "id":121, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5198, + "y":979 + }, + { + "ellipse":true, + "height":132, + "id":122, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5241.5, + "y":1122.5 + }, + { + "ellipse":true, + "height":132, + "id":123, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5243, + "y":1259.5 + }, + { + "ellipse":true, + "height":132, + "id":124, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":132, + "x":5242, + "y":1396.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":104, + "id":106, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":5672, + "x":232, + "y":2400 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":304, + "id":109, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":1640, + "x":2080, + "y":1712 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lego", + "objects":[ + { + "height":23.6667, + "id":132, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":true, + "physics_key":"mill3", + "speed":200, + "texture":"mill3", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":25, + "x":1401, + "y":1488.33 + }, + { + "height":13.3333, + "id":152, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":1, + "friction":20, + "limit":false, + "low":0, + "mass":10, + "motor":false, + "physics_key":"bridge12", + "speed":10, + "texture":"bridge12", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"balanceBox", + "visible":true, + "width":14.6667, + "x":3359.33, + "y":1263.33 + }, + { + "height":10.6667, + "id":153, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":10, + "limit":false, + "mass":2.5, + "physics_key":"bolt12", + "texture":"bolt12" + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"bolt", + "visible":true, + "width":13.3333, + "x":3360, + "y":1082.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":108, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":4976, + "y":775.667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":719, + "y":-739 + }, + { + "x":811, + "y":-649 + }, + { + "x":93, + "y":89 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1496.16666666667, + "y":1996 + }, + { + "height":0, + "id":97, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":321, + "y":-330 + }, + { + "x":406, + "y":-248 + }, + { + "x":85, + "y":83 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2566.5, + "y":1588.5 + }, + { + "height":0, + "id":142, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":390.667, + "y":1.33333 + }, + { + "x":329.333, + "y":146.667 + }, + { + "x":65.3333, + "y":145.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4793.66, + "y":781.333 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":102, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":113.5, + "y":1 + }, + { + "x":113.5, + "y":199.5 + }, + { + "x":-1, + "y":197.5 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2209, + "y":1070 + }, + { + "height":0, + "id":103, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":113.5, + "y":0.5 + }, + { + "x":114, + "y":197 + }, + { + "x":-0.5, + "y":199 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3055, + "y":1090 + }, + { + "height":0, + "id":104, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":1.5 + }, + { + "x":115, + "y":198.5 + }, + { + "x":0.5, + "y":199 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3609.5, + "y":1092.5 + }, + { + "height":0, + "id":105, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":95, + "y":0.5 + }, + { + "x":95.5, + "y":198.5 + }, + { + "x":0, + "y":198 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":5334.5, + "y":986.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":155, + "name":"", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":338, + "y":0 + }, + { + "x":655, + "y":2 + }, + { + "x":713, + "y":-28 + }, + { + "x":771, + "y":-51 + }, + { + "x":831, + "y":-66 + }, + { + "x":891, + "y":-69 + }, + { + "x":958, + "y":-65 + }, + { + "x":1021, + "y":-48 + }, + { + "x":1082, + "y":-26 + }, + { + "x":1128, + "y":0 + }, + { + "x":1182, + "y":42 + }, + { + "x":1249, + "y":78 + }, + { + "x":1312, + "y":99 + }, + { + "x":1395, + "y":99 + }, + { + "x":1462, + "y":79 + }, + { + "x":1531, + "y":42 + }, + { + "x":1581, + "y":5 + }, + { + "x":1633, + "y":-43 + }, + { + "x":1674, + "y":-70 + }, + { + "x":1735, + "y":-94 + }, + { + "x":1805, + "y":-104 + }, + { + "x":1881.5, + "y":-95.5 + }, + { + "x":1908.66666666667, + "y":-87.1666666666667 + }, + { + "x":1910.16666666667, + "y":-112.833333333333 + }, + { + "x":1941.33333333333, + "y":-112.333333333333 + }, + { + "x":1941.66666666667, + "y":-144.833333333333 + }, + { + "x":1970, + "y":-145.5 + }, + { + "x":1970, + "y":-174.333333333333 + }, + { + "x":1999.5, + "y":-175 + }, + { + "x":1999.66666666667, + "y":-204.666666666667 + }, + { + "x":2028, + "y":-206 + }, + { + "x":2028, + "y":-234 + }, + { + "x":2057.5, + "y":-234 + }, + { + "x":2057, + "y":-265 + }, + { + "x":2086, + "y":-264.5 + }, + { + "x":2087, + "y":-296 + }, + { + "x":2115.5, + "y":-295.5 + }, + { + "x":2116, + "y":-327.5 + }, + { + "x":2146, + "y":-328 + }, + { + "x":2147, + "y":-358 + }, + { + "x":2330, + "y":-358 + }, + { + "x":2134, + "y":95 + }, + { + "x":2128, + "y":757 + }, + { + "x":2351, + "y":760 + }, + { + "x":2389, + "y":69 + }, + { + "x":2420, + "y":56 + }, + { + "x":2420, + "y":3 + }, + { + "x":2494.5, + "y":6 + }, + { + "x":2496, + "y":-23 + }, + { + "x":2526.5, + "y":-25.5 + }, + { + "x":2527, + "y":-55 + }, + { + "x":2553.5, + "y":-55 + }, + { + "x":2553.5, + "y":-85.5 + }, + { + "x":2582.5, + "y":-86 + }, + { + "x":2582.5, + "y":-115.5 + }, + { + "x":2612, + "y":-116 + }, + { + "x":2613.5, + "y":-145 + }, + { + "x":2641.5, + "y":-145 + }, + { + "x":2642, + "y":-175.333333333333 + }, + { + "x":2670.5, + "y":-177 + }, + { + "x":2670.5, + "y":-207.5 + }, + { + "x":2699.5, + "y":-207.5 + }, + { + "x":2699.5, + "y":-236 + }, + { + "x":2730, + "y":-236.5 + }, + { + "x":2730, + "y":-266.5 + }, + { + "x":2759, + "y":-266.5 + }, + { + "x":2760, + "y":-295 + }, + { + "x":2789, + "y":-296.5 + }, + { + "x":2789, + "y":-326 + }, + { + "x":2817.5, + "y":-326 + }, + { + "x":2818.5, + "y":-356.5 + }, + { + "x":3125, + "y":-361 + }, + { + "x":3073, + "y":24 + }, + { + "x":3010, + "y":612 + }, + { + "x":3592, + "y":568 + }, + { + "x":3543, + "y":6 + }, + { + "x":3490, + "y":-363 + }, + { + "x":3896, + "y":-361 + }, + { + "x":3895, + "y":-330 + }, + { + "x":3924, + "y":-328 + }, + { + "x":3924, + "y":-298 + }, + { + "x":3954, + "y":-298 + }, + { + "x":3955, + "y":-269 + }, + { + "x":3983, + "y":-269 + }, + { + "x":3984, + "y":-239 + }, + { + "x":4013, + "y":-238 + }, + { + "x":4013, + "y":-208 + }, + { + "x":4043, + "y":-206 + }, + { + "x":4044, + "y":-177 + }, + { + "x":4073, + "y":-177 + }, + { + "x":4074, + "y":-148 + }, + { + "x":4102, + "y":-147 + }, + { + "x":4103, + "y":-116 + }, + { + "x":4130, + "y":-116 + }, + { + "x":4131, + "y":-86 + }, + { + "x":4160, + "y":-86 + }, + { + "x":4161, + "y":-55 + }, + { + "x":4189, + "y":-56 + }, + { + "x":4189, + "y":-26 + }, + { + "x":4220, + "y":-26 + }, + { + "x":4221, + "y":5 + }, + { + "x":4249, + "y":5 + }, + { + "x":4381, + "y":7 + }, + { + "x":4434, + "y":7 + }, + { + "x":4478, + "y":66 + }, + { + "x":4516, + "y":110 + }, + { + "x":4561, + "y":151 + }, + { + "x":4606, + "y":181 + }, + { + "x":4660, + "y":209 + }, + { + "x":4708, + "y":222 + }, + { + "x":4778, + "y":225 + }, + { + "x":4836, + "y":210 + }, + { + "x":4886, + "y":183 + }, + { + "x":4937, + "y":146 + }, + { + "x":4984, + "y":100 + }, + { + "x":5025, + "y":53 + }, + { + "x":5060, + "y":8 + }, + { + "x":5177, + "y":7 + }, + { + "x":5296, + "y":9 + }, + { + "x":5447, + "y":8 + }, + { + "x":5588, + "y":7 + }, + { + "x":5713, + "y":7 + }, + { + "x":5840, + "y":8 + }, + { + "x":6002, + "y":9 + }, + { + "x":6239, + "y":9 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":58, + "y":1616 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2528, + "id":93, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":464, + "x":5936, + "y":-16 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2512, + "id":94, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":208, + "x":-8, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.75, + "id":95, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73.5, + "x":567.64, + "y":1401.91 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":30.5, + "id":128, + "name":"", + "properties": + { + "obj_name":"Cube3", + "texture":"gum_3", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":14, + "x":552.5, + "y":1485.5 + }, + { + "height":31, + "id":129, + "name":"", + "properties": + { + "obj_name":"Cube3", + "texture":"gum_4", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":14, + "x":611.5, + "y":1485.5 + }, + { + "height":17.5, + "id":130, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":19.5, + "x":531.5, + "y":1576 + }, + { + "height":18, + "id":131, + "name":"", + "properties": + { + "obj_name":"Cube1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":19, + "x":622.5, + "y":1576 + }, + { + "height":18.3333, + "id":134, + "name":"", + "properties": + { + "obj_name":"Bottle12", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":9.33333, + "x":3850, + "y":1135.33 + }, + { + "height":19.5, + "id":143, + "name":"", + "properties": + { + "obj_name":"Bottle12", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":9.75, + "x":4860, + "y":658.167 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":163, + "orientation":"orthogonal", + "renderorder":"right-down", + "templategroups":[], + "tiledversion":"2017.10.11", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":89 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level13.json b/jellytruck/js/data/Level13.json new file mode 100644 index 0000000000000000000000000000000000000000..a7d147866343f26a60248c14413829092be4d191 --- /dev/null +++ b/jellytruck/js/data/Level13.json @@ -0,0 +1,931 @@ +{ "height":30, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":30, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":85, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":176, + "id":97, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":5688, + "x":216, + "y":1968 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":98, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":5558.67, + "y":1138.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":308, + "id":99, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":456, + "x":3144, + "y":1588 + }, + { + "height":304, + "id":100, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":432, + "x":5068, + "y":1236 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":94, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":109.091, + "y":0 + }, + { + "x":109.091, + "y":190.909 + }, + { + "x":3.0303, + "y":193.939 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2624.24, + "y":1172.73 + }, + { + "height":0, + "id":95, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":130.303, + "y":-9.09091 + }, + { + "x":118.182, + "y":181.818 + }, + { + "x":3.0303, + "y":200 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3693.94, + "y":1212.12 + }, + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112.121, + "y":-3.0303 + }, + { + "x":118.182, + "y":193.939 + }, + { + "x":3.0303, + "y":193.939 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":5415.15, + "y":1012.12 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/JellyTruck_Dev\/Jelly_Resources\/Level\/Level13\/Level13_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":112, + "name":"", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":282.666666666667, + "y":-1.33333333333348 + }, + { + "x":758.666666666667, + "y":-2.66666666666674 + }, + { + "x":838.666666666667, + "y":-12 + }, + { + "x":902.666666666667, + "y":-37.3333333333335 + }, + { + "x":938.666666666667, + "y":-73.3333333333335 + }, + { + "x":988, + "y":-121.333333333333 + }, + { + "x":1040, + "y":-164 + }, + { + "x":1090.66666666667, + "y":-200 + }, + { + "x":1146.66666666667, + "y":-225.333333333333 + }, + { + "x":1188, + "y":-233.333333333333 + }, + { + "x":1233.33333333333, + "y":-233.333333333333 + }, + { + "x":1286.66666666667, + "y":-214.666666666667 + }, + { + "x":1325.33333333333, + "y":-185.333333333333 + }, + { + "x":1369.33333333333, + "y":-146.666666666667 + }, + { + "x":1410.66666666667, + "y":-94.6666666666667 + }, + { + "x":1454.66666666667, + "y":-28 + }, + { + "x":1484, + "y":21.3333333333333 + }, + { + "x":1512, + "y":73.3333333333333 + }, + { + "x":1525.33333333333, + "y":92 + }, + { + "x":1550.66666666667, + "y":116 + }, + { + "x":1590.66666666667, + "y":140 + }, + { + "x":1642.66666666667, + "y":150.666666666667 + }, + { + "x":1709.33333333333, + "y":148 + }, + { + "x":1769.33333333333, + "y":129.333333333333 + }, + { + "x":1834.66666666667, + "y":93.3333333333333 + }, + { + "x":1881.33333333333, + "y":44 + }, + { + "x":1921.33333333333, + "y":12 + }, + { + "x":1934.66666666667, + "y":2.66666666666652 + }, + { + "x":1941.33333333333, + "y":1.33333333333326 + }, + { + "x":1958.66666666667, + "y":-2.66666666666674 + }, + { + "x":2002.66666666667, + "y":2.66666666666652 + }, + { + "x":2028, + "y":12 + }, + { + "x":2050.66666666667, + "y":25.3333333333333 + }, + { + "x":2078.66666666667, + "y":60 + }, + { + "x":2106.66666666667, + "y":90.6666666666665 + }, + { + "x":2149.33333333333, + "y":124 + }, + { + "x":2188, + "y":141.333333333333 + }, + { + "x":2228, + "y":149.333333333333 + }, + { + "x":2265.33333333333, + "y":144 + }, + { + "x":2300, + "y":128 + }, + { + "x":2329.33333333333, + "y":109.333333333333 + }, + { + "x":2354.66666666667, + "y":89.3333333333333 + }, + { + "x":2384, + "y":57.3333333333333 + }, + { + "x":2402.66666666667, + "y":42.6666666666665 + }, + { + "x":2425.33333333333, + "y":32 + }, + { + "x":2460, + "y":30.6666666666665 + }, + { + "x":2477.33333333333, + "y":30.6666666666665 + }, + { + "x":2506.66666666667, + "y":46.6666666666665 + }, + { + "x":2533.33333333333, + "y":70.6666666666665 + }, + { + "x":2552, + "y":92 + }, + { + "x":2582.66666666667, + "y":114.666666666667 + }, + { + "x":2612, + "y":130.666666666667 + }, + { + "x":2648, + "y":138.666666666667 + }, + { + "x":2681.33333333333, + "y":134.666666666667 + }, + { + "x":2714.66666666667, + "y":118.666666666667 + }, + { + "x":2742.66666666667, + "y":102.666666666667 + }, + { + "x":2760, + "y":76 + }, + { + "x":2784, + "y":50.6666666666665 + }, + { + "x":2817.33333333333, + "y":30.6666666666665 + }, + { + "x":2834.66666666667, + "y":30.6666666666665 + }, + { + "x":2854.66666666667, + "y":32 + }, + { + "x":2877.33333333333, + "y":37.3333333333333 + }, + { + "x":2890.66666666667, + "y":48 + }, + { + "x":2913.33333333333, + "y":60 + }, + { + "x":2957.33333333333, + "y":92 + }, + { + "x":3066.66666666667, + "y":93.3333333333333 + }, + { + "x":3066.66666666667, + "y":314.666666666667 + }, + { + "x":3053.33333333333, + "y":642.666666666667 + }, + { + "x":3469.33333333333, + "y":622.666666666667 + }, + { + "x":3456, + "y":328 + }, + { + "x":3445.33333333333, + "y":94.6666666666665 + }, + { + "x":3621.33333333333, + "y":93.3333333333333 + }, + { + "x":3750.66666666667, + "y":93.3333333333333 + }, + { + "x":3786.66666666667, + "y":61.3333333333333 + }, + { + "x":3821.33333333333, + "y":36 + }, + { + "x":3860, + "y":21.3333333333333 + }, + { + "x":3890.66666666667, + "y":22.6666666666665 + }, + { + "x":3922.66666666667, + "y":33.3333333333333 + }, + { + "x":3949.33333333333, + "y":53.3333333333333 + }, + { + "x":3977.33333333333, + "y":84 + }, + { + "x":4000, + "y":105.333333333333 + }, + { + "x":4029.33333333333, + "y":125.333333333333 + }, + { + "x":4068, + "y":134.666666666667 + }, + { + "x":4108, + "y":134.666666666667 + }, + { + "x":4153.33333333333, + "y":122.666666666667 + }, + { + "x":4198.66666666667, + "y":98.6666666666665 + }, + { + "x":4238.66666666667, + "y":53.3333333333333 + }, + { + "x":4301.33333333333, + "y":1.33333333333326 + }, + { + "x":4361.33333333333, + "y":-34.6666666666667 + }, + { + "x":4442.66666666667, + "y":-74.6666666666667 + }, + { + "x":4530.66666666667, + "y":-106.666666666667 + }, + { + "x":4613.33333333333, + "y":-134.666666666667 + }, + { + "x":4730.66666666667, + "y":-162.666666666667 + }, + { + "x":4904, + "y":-164 + }, + { + "x":4957.33333333333, + "y":-142.666666666667 + }, + { + "x":5000, + "y":-162.666666666667 + }, + { + "x":5078.66666666667, + "y":-158.666666666667 + }, + { + "x":5062.66666666667, + "y":-16 + }, + { + "x":5134.66666666667, + "y":-14.6666666666667 + }, + { + "x":5184, + "y":-14.6666666666667 + }, + { + "x":5253.33333333333, + "y":-16 + }, + { + "x":5237.33333333333, + "y":-161.333333333333 + }, + { + "x":5285.33333333333, + "y":-161.333333333333 + }, + { + "x":5312, + "y":-162.666666666667 + }, + { + "x":5337.33333333333, + "y":-162.666666666667 + }, + { + "x":5936, + "y":-162.666666666667 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":118.666666666667, + "y":1300 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2160, + "id":91, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":224, + "x":-16, + "y":-8 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2176, + "id":92, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":208, + "x":5904, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.6667, + "id":93, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73.6667, + "x":577.667, + "y":1218.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":25.3333, + "id":101, + "name":"", + "properties": + { + "obj_name":"Ball19", + "texture":"gum_6", + "xoffset":0.6, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":28.6667, + "x":1054, + "y":995.333 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lego", + "objects":[ + { + "height":25, + "id":102, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":true, + "physics_key":"mill1", + "speed":200, + "texture":"mill1", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":25, + "x":2338.5, + "y":1083.5 + }, + { + "height":22, + "id":103, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":true, + "low":-20, + "mass":2.5, + "motor":false, + "physics_key":"bridge2", + "speed":200, + "texture":"bridge2", + "torque":1000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":23.3333, + "x":3366.67, + "y":1382.67 + }, + { + "height":44, + "id":106, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0, + "friction":0.1, + "limit":false, + "mass":1, + "physics_key":"Box2", + "texture":"Box2" + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"balanceBox", + "visible":true, + "width":44, + "x":3518, + "y":1456 + }, + { + "height":53, + "id":107, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0, + "friction":0.1, + "limit":false, + "mass":2, + "physics_key":"Box1", + "texture":"Box1" + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"balanceBox", + "visible":true, + "width":44, + "x":3198, + "y":1456 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":113, + "orientation":"orthogonal", + "renderorder":"right-down", + "templategroups":[], + "tiledversion":"2017.10.11", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":85 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level14.json b/jellytruck/js/data/Level14.json new file mode 100644 index 0000000000000000000000000000000000000000..d55572be0ec12295e23f6953a0e49108fe4b0201 --- /dev/null +++ b/jellytruck/js/data/Level14.json @@ -0,0 +1,680 @@ +{ "height":32, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":32, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":90, + "x":0, + "y":0 + }, + { + "image":"Level14_ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":208, + "id":98, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":5552, + "x":80, + "y":2016 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":99, + "name":"FLag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":5505.33, + "y":1613.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":22, + "id":102, + "name":"", + "properties": + { + "obj_name":"Ball14", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":23, + "x":2663, + "y":835 + }, + { + "height":21, + "id":108, + "name":"", + "properties": + { + "obj_name":"Ball14", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":25, + "x":2929, + "y":820 + }, + { + "height":23, + "id":112, + "name":"", + "properties": + { + "obj_name":"Ball14", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":25, + "x":3173, + "y":785 + }, + { + "height":18, + "id":116, + "name":"", + "properties": + { + "obj_name":"Ball14", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":26, + "x":3401, + "y":769 + }, + { + "height":18, + "id":121, + "name":"", + "properties": + { + "obj_name":"Bottle14", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":9.33333, + "x":3836, + "y":611 + }, + { + "height":18, + "id":136, + "name":"", + "properties": + { + "obj_name":"Bottle14", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":10, + "x":4055, + "y":609 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":292, + "id":100, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":1720, + "x":2296, + "y":1160 + }, + { + "height":378.788, + "id":164, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":384.848, + "x":18.1818, + "y":1145.45 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":159, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":42.6667 + }, + { + "x":-662.667, + "y":89.3333 + }, + { + "x":-704, + "y":0 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4288, + "y":737.333 + }, + { + "height":0, + "id":101, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6390.91, + "y":0 + }, + { + "x":6393.94, + "y":436.364 + }, + { + "x":-6.06061, + "y":430.303 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":23.1515, + "y":1612.06 + }, + { + "height":0, + "id":165, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":21.3333333333335, + "y":0 + }, + { + "x":22.666666666667, + "y":765.333333333333 + }, + { + "x":0, + "y":766.666666666667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3997.33333333333, + "y":870.666666666667 + }, + { + "height":0, + "id":166, + "name":"", + "polygon":[ + { + "x":-4, + "y":2.66666666666663 + }, + { + "x":664, + "y":-44 + }, + { + "x":621.333333333333, + "y":12 + }, + { + "x":-40, + "y":68 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3624, + "y":824 + }, + { + "height":0, + "id":167, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":662.666666666667, + "y":-57.3333333333334 + }, + { + "x":684, + "y":25.3333333333333 + }, + { + "x":124, + "y":10.6666666666666 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3585.33333333333, + "y":892 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":94, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":116, + "y":0 + }, + { + "x":118, + "y":682 + }, + { + "x":2, + "y":680 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2750.67, + "y":620 + }, + { + "height":0, + "id":95, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112, + "y":2 + }, + { + "x":110, + "y":680 + }, + { + "x":-2, + "y":680 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3000, + "y":576 + }, + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":116, + "y":2 + }, + { + "x":114, + "y":678 + }, + { + "x":4, + "y":684 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3242, + "y":538 + }, + { + "height":0, + "id":97, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":110, + "y":2 + }, + { + "x":112, + "y":684 + }, + { + "x":2, + "y":688 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3552.66666666667, + "y":485.333 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":87, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":410.667, + "y":-1.33333 + }, + { + "x":1048.67, + "y":2 + }, + { + "x":1298, + "y":-65.3333 + }, + { + "x":1597.33, + "y":-144.667 + }, + { + "x":1913.08, + "y":-224.667 + }, + { + "x":1917, + "y":-206.417 + }, + { + "x":1795.58, + "y":-173.083 + }, + { + "x":1795.67, + "y":-1.83333 + }, + { + "x":1929.67, + "y":-3.08317 + }, + { + "x":1922.67, + "y":200.667 + }, + { + "x":1933.33, + "y":1188 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":402.667, + "y":1052 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2296, + "id":90, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":80, + "x":-8, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2288, + "id":92, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":424, + "x":5693, + "y":8 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.75, + "id":93, + "name":"Truck", + "properties": + { + "type":3 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":74.25, + "x":1162, + "y":1020.25 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":168, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.0.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":90 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level15.json b/jellytruck/js/data/Level15.json new file mode 100644 index 0000000000000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"height":50, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":88, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/..\/JellyTruck_Dev\/Jelly_Resources 23 May 2018\/Level\/Level15\/Level15_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":272, + "id":106, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":4128, + "x":984, + "y":3144 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":296, + "id":108, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":720, + "x":2000, + "y":2040 + }, + { + "height":304, + "id":109, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":704, + "x":4656, + "y":1984 + }, + { + "height":130, + "id":122, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":382, + "x":3515, + "y":2549 + }, + { + "height":65, + "id":135, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":382, + "x":3515, + "y":2734 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":107, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":4557.5, + "y":1733 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":20, + "id":98, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_3", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":23.3333, + "x":3011.33, + "y":1830 + }, + { + "height":20.6667, + "id":99, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_2", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":20.6667, + "x":3444.67, + "y":1972.67 + }, + { + "height":20, + "id":102, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_4", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22.6667, + "x":3464, + "y":2254.67 + }, + { + "height":24.6667, + "id":104, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_3", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":24.6667, + "x":3030.67, + "y":2110 + }, + { + "height":20, + "id":105, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_1", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":21.3333, + "x":3062.67, + "y":2412 + }, + { + "height":20.5, + "id":113, + "name":"", + "properties": + { + "obj_name":"Lift8", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":50, + "x":1853, + "y":1870 + }, + { + "height":42, + "id":120, + "name":"", + "properties": + { + "obj_name":"BladeDown", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":370.667, + "x":3523, + "y":2716 + }, + { + "height":36, + "id":121, + "name":"", + "properties": + { + "obj_name":"BladeUp", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":345, + "x":3529.5, + "y":2572.5 + }, + { + "height":238.5, + "id":126, + "name":"", + "properties": + { + "obj_name":"LiftR", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":29, + "x":1850.5, + "y":2471.5 + }, + { + "height":238, + "id":127, + "name":"", + "properties": + { + "obj_name":"LiftL", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":27.5, + "x":1240.5, + "y":2043 + }, + { + "height":127, + "id":131, + "name":"", + "properties": + { + "obj_name":"Pusher2", + "texture":"gum_7", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":93.3333, + "x":4081.67, + "y":2660 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":92, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":115, + "y":0 + }, + { + "x":115, + "y":171 + }, + { + "x":1, + "y":170 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1624, + "y":1742 + }, + { + "height":0, + "id":93, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":114, + "y":0 + }, + { + "x":113, + "y":168.5 + }, + { + "x":-1, + "y":169 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":2843, + "y":1649.5 + }, + { + "height":0, + "id":94, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":110.667, + "y":-1.33333 + }, + { + "x":113.333, + "y":166.667 + }, + { + "x":0, + "y":166.667 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3886.67, + "y":2584 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":95, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":156, + "y":-16 + }, + { + "x":200, + "y":1272 + }, + { + "x":44, + "y":1280 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3412, + "y":1284 + }, + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":436, + "y":-4 + }, + { + "x":432, + "y":140 + }, + { + "x":-8, + "y":144 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3524, + "y":2412 + }, + { + "height":0, + "id":97, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":160, + "y":32 + }, + { + "x":-24, + "y":1304 + }, + { + "x":-184, + "y":1276 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3976, + "y":1248 + }, + { + "height":0, + "id":114, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":454, + "y":0 + }, + { + "x":454.667, + "y":26 + }, + { + "x":0, + "y":26 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1330.67, + "y":2512 + }, + { + "height":0, + "id":115, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":454.667, + "y":-0.666667 + }, + { + "x":455.333, + "y":26 + }, + { + "x":0, + "y":24.6667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1334.67, + "y":2310 + }, + { + "height":0, + "id":116, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":456, + "y":1.33333 + }, + { + "x":456, + "y":28 + }, + { + "x":0, + "y":27.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1334, + "y":2104.67 + }, + { + "height":0, + "id":117, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":432.667, + "y":-0.333333 + }, + { + "x":432.667, + "y":28.6667 + }, + { + "x":0, + "y":26.6667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1334.67, + "y":1900.67 + }, + { + "height":0, + "id":118, + "name":"", + "polygon":[ + { + "x":2.99573863636374, + "y":-0.640625 + }, + { + "x":31.3333, + "y":0.666667 + }, + { + "x":32.3333, + "y":1051 + }, + { + "x":1.44791699999996, + "y":1051.34375 + }], + "rotation":0, + "type":"static", + "visible":false, + "width":0, + "x":1972.67, + "y":1704.67 + }, + { + "height":0, + "id":119, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":26.5 + }, + { + "x":551.25, + "y":26.25 + }, + { + "x":551.25, + "y":-0.5 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1981, + "y":1698 + }, + { + "height":0, + "id":125, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":49, + "y":0 + }, + { + "x":51.5, + "y":1226 + }, + { + "x":0.5, + "y":1226 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2640, + "y":1723 + }, + { + "height":0, + "id":132, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":165.333, + "y":37.3333 + }, + { + "x":-104, + "y":1297.33 + }, + { + "x":-268, + "y":1264 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4454.67, + "y":1706.67 + }, + { + "height":0, + "id":133, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":168, + "y":-9.33333 + }, + { + "x":238.667, + "y":1286.67 + }, + { + "x":76, + "y":1296 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4661.33, + "y":946.667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Camera", + "objects":[ + { + "height":329.333333333333, + "id":134, + "name":"", + "properties": + { + "focusX":4152, + "focusY":2552, + "zoom":0.9 + }, + "propertytypes": + { + "focusX":"int", + "focusY":"int", + "zoom":"float" + }, + "rotation":0, + "type":"focus", + "visible":true, + "width":445.333333333333, + "x":4046.66666666667, + "y":2452 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":86, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":1270.67, + "y":-6.66667 + }, + { + "x":2460, + "y":-14.6667 + }, + { + "x":2542.67, + "y":-533.333 + }, + { + "x":2610.67, + "y":-972 + }, + { + "x":2926.67, + "y":-968 + }, + { + "x":3002.67, + "y":-21.3333 + }, + { + "x":3412, + "y":-18.6667 + }, + { + "x":4206.67, + "y":-17.3333 + }, + { + "x":4261.33, + "y":-341.333 + }, + { + "x":4302.67, + "y":-590.667 + }, + { + "x":4370.67, + "y":-1041.33 + }, + { + "x":4481.33, + "y":-1013.33 + }, + { + "x":4621.33, + "y":-1013.33 + }, + { + "x":4840, + "y":-22.6667 + }, + { + "x":5605.33, + "y":-21.3333 + }, + { + "x":6176, + "y":-29.3333 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":89.3333, + "y":2746.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":3600, + "id":87, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":368, + "x":576, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":3584, + "id":90, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":560, + "x":5120, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":15.75, + "id":91, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":72.375, + "x":1572, + "y":2680 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":136, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":88 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level16.json b/jellytruck/js/data/Level16.json new file mode 100644 index 0000000000000000000000000000000000000000..f5c177061334d82abf69886fc7c6524824d52582 --- /dev/null +++ b/jellytruck/js/data/Level16.json @@ -0,0 +1,1398 @@ +{ "height":49, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":49, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":85, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":59, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":4918, + "y":2062.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/JellyTruck_Dev\/Jelly_Resources\/Level\/Level16\/Level16_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":16, + "id":55, + "name":"", + "properties": + { + "obj_name":"Rect6", + "texture":"gum_1", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":17, + "x":3080.33, + "y":942.333 + }, + { + "height":21.6667, + "id":56, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_2", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":21.3333, + "x":5219.67, + "y":1341.33 + }, + { + "height":20, + "id":57, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_4", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22, + "x":894.333, + "y":1801.33 + }, + { + "height":21.6667, + "id":58, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_1", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22, + "x":1498, + "y":1920.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":51, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":116, + "y":2 + }, + { + "x":112, + "y":196 + }, + { + "x":-2, + "y":196 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3734, + "y":588 + }, + { + "height":0, + "id":52, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":106, + "y":-2 + }, + { + "x":112, + "y":190 + }, + { + "x":10, + "y":198 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4312, + "y":1188 + }, + { + "height":0, + "id":53, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":104, + "y":-8 + }, + { + "x":96, + "y":200 + }, + { + "x":-8, + "y":176 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1640, + "y":1896 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":54, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":96, + "y":8 + }, + { + "x":88, + "y":656 + }, + { + "x":8, + "y":640 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5432, + "y":1736 + }, + { + "height":0, + "id":63, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":84, + "y":0 + }, + { + "x":82, + "y":514.981 + }, + { + "x":0, + "y":516.97 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5220, + "y":954 + }, + { + "height":0, + "id":65, + "name":"", + "polygon":[ + { + "x":-6, + "y":58 + }, + { + "x":92, + "y":56 + }, + { + "x":94, + "y":646 + }, + { + "x":-2, + "y":650 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":816, + "y":1526 + }, + { + "height":0, + "id":66, + "name":"", + "polygon":[ + { + "x":0, + "y":38 + }, + { + "x":86, + "y":38 + }, + { + "x":88, + "y":448 + }, + { + "x":4, + "y":450 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1478, + "y":1498 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":44, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":838.5, + "y":-0.5 + }, + { + "x":898.5, + "y":40 + }, + { + "x":979, + "y":84 + }, + { + "x":1043.5, + "y":108 + }, + { + "x":1125.75, + "y":121.75 + }, + { + "x":1205.25, + "y":114.25 + }, + { + "x":1313.5, + "y":77.5 + }, + { + "x":1365.75, + "y":38.75 + }, + { + "x":1422.5, + "y":-5.25 + }, + { + "x":1475.75, + "y":-44.25 + }, + { + "x":1537.5, + "y":-75.25 + }, + { + "x":1607.25, + "y":-95.5 + }, + { + "x":1669, + "y":-96.5 + }, + { + "x":1723.75, + "y":-88.75 + }, + { + "x":1779.75, + "y":-69 + }, + { + "x":1834.5, + "y":-40.75 + }, + { + "x":1887.25, + "y":-6 + }, + { + "x":1941.5, + "y":28 + }, + { + "x":1994.25, + "y":49.25 + }, + { + "x":2056.25, + "y":64.5 + }, + { + "x":2114.75, + "y":70.25 + }, + { + "x":2183.25, + "y":64.75 + }, + { + "x":2252.5, + "y":52.75 + }, + { + "x":2329.75, + "y":27.25 + }, + { + "x":2379.75, + "y":6.75 + }, + { + "x":2424.25, + "y":-22 + }, + { + "x":2489, + "y":-60.25 + }, + { + "x":2539.25, + "y":-84.25 + }, + { + "x":2598.5, + "y":-103.75 + }, + { + "x":2672, + "y":-113.5 + }, + { + "x":2733.25, + "y":-103.75 + }, + { + "x":2783.75, + "y":-88 + }, + { + "x":2838, + "y":-62.5 + }, + { + "x":2877.75, + "y":-32 + }, + { + "x":2912, + "y":-1 + }, + { + "x":2955.25, + "y":39.25 + }, + { + "x":3013, + "y":78 + }, + { + "x":3064.25, + "y":98 + }, + { + "x":3122.25, + "y":108 + }, + { + "x":3183.5, + "y":110.5 + }, + { + "x":3254.25, + "y":101.75 + }, + { + "x":3327.75, + "y":81.75 + }, + { + "x":3391, + "y":62 + }, + { + "x":3432.25, + "y":40.5 + }, + { + "x":3485.5, + "y":14.75 + }, + { + "x":3530.25, + "y":-5.5 + }, + { + "x":3574.75, + "y":-43.75 + }, + { + "x":3637.25, + "y":-73.25 + }, + { + "x":3701.75, + "y":-96.5 + }, + { + "x":3760.25, + "y":-102.75 + }, + { + "x":3826.25, + "y":-98.25 + }, + { + "x":3881, + "y":-79.5 + }, + { + "x":3938.25, + "y":-51 + }, + { + "x":3992.5, + "y":-11.75 + }, + { + "x":4044.5, + "y":21.5 + }, + { + "x":4104.75, + "y":51.5 + }, + { + "x":4166.75, + "y":72.5 + }, + { + "x":4238, + "y":86.5 + }, + { + "x":4308.25, + "y":88.25 + }, + { + "x":4373, + "y":82.25 + }, + { + "x":4437.25, + "y":70 + }, + { + "x":4493.75, + "y":53.25 + }, + { + "x":4547.5, + "y":31.25 + }, + { + "x":4620.25, + "y":-4.5 + }, + { + "x":4620.25, + "y":251.5 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":46, + "y":844.5 + }, + { + "height":0, + "id":45, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":82.6667, + "y":1.33333 + }, + { + "x":179, + "y":-29.3333 + }, + { + "x":250.333, + "y":-71.3333 + }, + { + "x":305.667, + "y":-113.333 + }, + { + "x":384.667, + "y":-181.333 + }, + { + "x":459.667, + "y":-229 + }, + { + "x":529.667, + "y":-260.333 + }, + { + "x":593, + "y":-270 + }, + { + "x":705.333, + "y":-233 + }, + { + "x":757.667, + "y":-181.667 + }, + { + "x":803, + "y":-119 + }, + { + "x":792, + "y":539.667 + }, + { + "x":687.667, + "y":514.333 + }, + { + "x":-39, + "y":516.333 + }, + { + "x":-68.3333, + "y":542.667 + }, + { + "x":-148.667, + "y":588 + }, + { + "x":-213.333, + "y":614.667 + }, + { + "x":-297.333, + "y":631.333 + }, + { + "x":-400.333, + "y":631.333 + }, + { + "x":-490.667, + "y":602 + }, + { + "x":-561.667, + "y":557.667 + }, + { + "x":-635, + "y":499 + }, + { + "x":-704, + "y":453.667 + }, + { + "x":-787.667, + "y":424.667 + }, + { + "x":-872.333, + "y":421.333 + }, + { + "x":-964, + "y":442 + }, + { + "x":-1043.33, + "y":478.333 + }, + { + "x":-1104, + "y":521.667 + }, + { + "x":-1183, + "y":562.667 + }, + { + "x":-1298.67, + "y":583.667 + }, + { + "x":-1418, + "y":573 + }, + { + "x":-1541.67, + "y":539.333 + }, + { + "x":-1623, + "y":492.333 + }, + { + "x":-1741.67, + "y":431.667 + }, + { + "x":-1839, + "y":405.333 + }, + { + "x":-1941.67, + "y":413.333 + }, + { + "x":-2038.33, + "y":455 + }, + { + "x":-2120, + "y":528.667 + }, + { + "x":-2202, + "y":585.667 + }, + { + "x":-2283.33, + "y":617.333 + }, + { + "x":-2326.33, + "y":622.333 + }, + { + "x":-2462.33, + "y":616.667 + }, + { + "x":-2617, + "y":564.333 + }, + { + "x":-2707.67, + "y":521 + }, + { + "x":-2794.67, + "y":458.667 + }, + { + "x":-2897.33, + "y":420.667 + }, + { + "x":-2997.67, + "y":413.333 + }, + { + "x":-3088, + "y":436.667 + }, + { + "x":-3177, + "y":489.667 + }, + { + "x":-3245.67, + "y":533.667 + }, + { + "x":-3320.33, + "y":570.333 + }, + { + "x":-3409.33, + "y":594.667 + }, + { + "x":-3504.67, + "y":601 + }, + { + "x":-3634.33, + "y":585.667 + }, + { + "x":-3740, + "y":545.667 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":5223.33, + "y":953.333 + }, + { + "height":0, + "id":46, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":-73, + "y":41.3333 + }, + { + "x":-179, + "y":33 + }, + { + "x":-284, + "y":-13.6667 + }, + { + "x":-358.333, + "y":-67.3333 + }, + { + "x":-440.667, + "y":-137.667 + }, + { + "x":-535.667, + "y":-197 + }, + { + "x":-647, + "y":-229 + }, + { + "x":-731.667, + "y":-207.667 + }, + { + "x":-808.667, + "y":-158.667 + }, + { + "x":-869.667, + "y":-68.3333 + }, + { + "x":-867.333, + "y":632.667 + }, + { + "x":-104.333, + "y":636.333 + }, + { + "x":-19.6667, + "y":635.333 + }, + { + "x":51.3333, + "y":686.667 + }, + { + "x":192.333, + "y":745.333 + }, + { + "x":254.333, + "y":755.667 + }, + { + "x":294.333, + "y":755 + }, + { + "x":346.667, + "y":748.333 + }, + { + "x":387.667, + "y":736.333 + }, + { + "x":488.667, + "y":686.333 + }, + { + "x":554.667, + "y":633.667 + }, + { + "x":619, + "y":584 + }, + { + "x":702.667, + "y":545.333 + }, + { + "x":798.667, + "y":535.667 + }, + { + "x":872.333, + "y":548 + }, + { + "x":949.667, + "y":579.333 + }, + { + "x":1025.67, + "y":629 + }, + { + "x":1093.67, + "y":669.667 + }, + { + "x":1172.33, + "y":696.333 + }, + { + "x":1288.33, + "y":704 + }, + { + "x":1387.33, + "y":684.667 + }, + { + "x":1485.67, + "y":653 + }, + { + "x":1537.67, + "y":632 + }, + { + "x":1599, + "y":588.333 + }, + { + "x":1663.67, + "y":555.333 + }, + { + "x":1730.67, + "y":530.333 + }, + { + "x":1835.67, + "y":522 + }, + { + "x":1907.67, + "y":537.667 + }, + { + "x":1967.67, + "y":564.667 + }, + { + "x":2017, + "y":600.667 + }, + { + "x":2072.33, + "y":655.333 + }, + { + "x":2131, + "y":699 + }, + { + "x":2177.33, + "y":719.333 + }, + { + "x":2243, + "y":739.333 + }, + { + "x":2332.33, + "y":742 + }, + { + "x":2409.33, + "y":731.333 + }, + { + "x":2498.33, + "y":706.667 + }, + { + "x":2581.33, + "y":670.333 + }, + { + "x":2642, + "y":642.333 + }, + { + "x":2688.67, + "y":612.333 + }, + { + "x":2740.67, + "y":578.667 + }, + { + "x":2789.33, + "y":556.333 + }, + { + "x":2862, + "y":536 + }, + { + "x":2925.33, + "y":529.667 + }, + { + "x":2987.67, + "y":542.667 + }, + { + "x":3034.33, + "y":561 + }, + { + "x":3093, + "y":593.667 + }, + { + "x":3128.67, + "y":620.667 + }, + { + "x":3167, + "y":645.667 + }, + { + "x":3208.33, + "y":669.667 + }, + { + "x":3251, + "y":688 + }, + { + "x":3297.67, + "y":704 + }, + { + "x":3353, + "y":716.667 + }, + { + "x":3410.67, + "y":721.667 + }, + { + "x":3476.67, + "y":719 + }, + { + "x":3545, + "y":708.667 + }, + { + "x":3612, + "y":692.333 + }, + { + "x":3671.33, + "y":669.333 + }, + { + "x":3736, + "y":642 + }, + { + "x":3763.33, + "y":628.667 + }, + { + "x":3806.67, + "y":599 + }, + { + "x":3861, + "y":573 + }, + { + "x":3917, + "y":549.667 + }, + { + "x":3965, + "y":536 + }, + { + "x":4005, + "y":528.667 + }, + { + "x":4084, + "y":524.333 + }, + { + "x":4134.33, + "y":523.667 + }, + { + "x":4201.67, + "y":530.667 + }, + { + "x":4265, + "y":541.333 + }, + { + "x":4319.67, + "y":558 + }, + { + "x":4375.67, + "y":576 + }, + { + "x":4414.33, + "y":595.333 + }, + { + "x":4468.67, + "y":614.333 + }, + { + "x":4535, + "y":627 + }, + { + "x":4583.67, + "y":629.333 + }, + { + "x":4623, + "y":626.333 + }, + { + "x":4677.67, + "y":577.333 + }, + { + "x":4735.33, + "y":532.333 + }, + { + "x":4787.33, + "y":503.333 + }, + { + "x":4830.67, + "y":485.333 + }, + { + "x":4878, + "y":473 + }, + { + "x":4925.67, + "y":472.667 + }, + { + "x":4975, + "y":483 + }, + { + "x":5023.33, + "y":511.333 + }, + { + "x":5068, + "y":557 + }, + { + "x":5094.67, + "y":593.667 + }, + { + "x":5116, + "y":628.333 + }, + { + "x":5116, + "y":1202.67 + }, + { + "x":5096.33, + "y":1887 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":908.667, + "y":1536 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":3544, + "id":47, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":144, + "x":-16, + "y":-8 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":3520, + "id":49, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":256, + "x":5864, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14, + "id":50, + "name":"Truck", + "properties": + { + "type":3 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":74.6667, + "x":708.667, + "y":799.333 + }, + { + "height":26, + "id":60, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":28, + "x":552, + "y":650 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":75, + "orientation":"orthogonal", + "renderorder":"right-down", + "templategroups":[], + "tiledversion":"2017.10.11", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":85 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level17.json b/jellytruck/js/data/Level17.json new file mode 100644 index 0000000000000000000000000000000000000000..ab906cb7071745db4abb0e401aad603115fbc9ad --- /dev/null +++ b/jellytruck/js/data/Level17.json @@ -0,0 +1,1640 @@ +{ "height":34, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":34, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":88, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/JellyTruck_Dev\/Jelly_Resources\/Level\/Level17\/Level17_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":224, + "id":56, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":5856, + "x":224, + "y":2128 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":308, + "id":58, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":1644, + "x":4084, + "y":1280 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":57, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":5580.17, + "y":1956 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":20.6667, + "id":53, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_2", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22, + "x":1664.67, + "y":880 + }, + { + "height":20, + "id":54, + "name":"", + "properties": + { + "obj_name":"Rect2", + "texture":"gum_1", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22, + "x":2040.67, + "y":1094 + }, + { + "height":20, + "id":55, + "name":"", + "properties": + { + "obj_name":"Rect1", + "texture":"gum_3", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":20.6667, + "x":1670.67, + "y":1267.33 + }, + { + "height":37, + "id":72, + "name":"", + "properties": + { + "obj_name":"Ball17", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":47, + "x":3158, + "y":1362 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":50, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":115.152, + "y":3.0303 + }, + { + "x":118.182, + "y":193.939 + }, + { + "x":9.09091, + "y":196.97 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3351.52, + "y":1381.82 + }, + { + "height":0, + "id":51, + "name":"", + "polygon":[ + { + "x":18.8618, + "y":0 + }, + { + "x":412.801, + "y":3.0303 + }, + { + "x":412.801, + "y":196.97 + }, + { + "x":20.0367, + "y":199.909 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":5737.53, + "y":1327.27 + }, + { + "height":0, + "id":52, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":104, + "y":0 + }, + { + "x":96, + "y":168 + }, + { + "x":8, + "y":168 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1544, + "y":656 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":42, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":249, + "y":4 + }, + { + "x":547, + "y":2.5 + }, + { + "x":745, + "y":3 + }, + { + "x":827, + "y":1 + }, + { + "x":827.5, + "y":-25.6667 + }, + { + "x":855, + "y":-25.5 + }, + { + "x":855.333, + "y":-56.3333 + }, + { + "x":884.5, + "y":-56.6667 + }, + { + "x":884.667, + "y":-85.8333 + }, + { + "x":914, + "y":-86.1667 + }, + { + "x":914.333, + "y":-117.333 + }, + { + "x":944, + "y":-117.833 + }, + { + "x":944.167, + "y":-147.333 + }, + { + "x":972.833, + "y":-147.5 + }, + { + "x":973.167, + "y":-177 + }, + { + "x":1003.17, + "y":-178.833 + }, + { + "x":1002.83, + "y":-207.5 + }, + { + "x":1031.67, + "y":-208.333 + }, + { + "x":1031.67, + "y":-237.333 + }, + { + "x":1060.67, + "y":-238.5 + }, + { + "x":1060.83, + "y":-267.333 + }, + { + "x":1090.83, + "y":-268.667 + }, + { + "x":1091, + "y":-299.333 + }, + { + "x":1119.67, + "y":-299.833 + }, + { + "x":1120.5, + "y":-328.667 + }, + { + "x":1149.67, + "y":-329.667 + }, + { + "x":1149.17, + "y":-359.333 + }, + { + "x":1179, + "y":-359.333 + }, + { + "x":1179, + "y":-389 + }, + { + "x":1208.33, + "y":-389.5 + }, + { + "x":1209.33, + "y":-421.167 + }, + { + "x":1237.33, + "y":-420.667 + }, + { + "x":1237.67, + "y":-449.5 + }, + { + "x":1266.67, + "y":-450.5 + }, + { + "x":1266.67, + "y":-480.5 + }, + { + "x":1296.17, + "y":-481 + }, + { + "x":1296.5, + "y":-511.667 + }, + { + "x":1325.83, + "y":-511.333 + }, + { + "x":1325.5, + "y":-541.333 + }, + { + "x":1354.67, + "y":-541.333 + }, + { + "x":1354.83, + "y":-571.667 + }, + { + "x":1384.83, + "y":-572.167 + }, + { + "x":1384.83, + "y":-601.167 + }, + { + "x":1414.5, + "y":-602.333 + }, + { + "x":1414.33, + "y":-632 + }, + { + "x":1443, + "y":-632.333 + }, + { + "x":1443.5, + "y":-662.833 + }, + { + "x":1472.17, + "y":-663 + }, + { + "x":1472.5, + "y":-692.667 + }, + { + "x":1502.17, + "y":-693.333 + }, + { + "x":1502.33, + "y":-722.667 + }, + { + "x":1779, + "y":-722.5 + }, + { + "x":1720.33, + "y":-455.167 + }, + { + "x":1810, + "y":2.5 + }, + { + "x":1966.5, + "y":3 + }, + { + "x":2864, + "y":4 + }, + { + "x":2896, + "y":4 + }, + { + "x":3566, + "y":3.5 + }, + { + "x":3587, + "y":2.5 + }, + { + "x":3614.5, + "y":2.5 + }, + { + "x":3615.5, + "y":-24.5 + }, + { + "x":3644, + "y":-24.5 + }, + { + "x":3644.5, + "y":-55.5 + }, + { + "x":3674, + "y":-56 + }, + { + "x":3673.5, + "y":-85.5 + }, + { + "x":3703, + "y":-85.5 + }, + { + "x":3702.5, + "y":-116 + }, + { + "x":3731.5, + "y":-116.5 + }, + { + "x":3733, + "y":-147.5 + }, + { + "x":3762, + "y":-146.5 + }, + { + "x":3762, + "y":-177 + }, + { + "x":3790.5, + "y":-176.5 + }, + { + "x":3791, + "y":-207.5 + }, + { + "x":3820, + "y":-207 + }, + { + "x":3821.5, + "y":-237 + }, + { + "x":3850, + "y":-237.5 + }, + { + "x":3851, + "y":-267.5 + }, + { + "x":3879, + "y":-268 + }, + { + "x":3879.5, + "y":-298 + }, + { + "x":3906, + "y":-298 + }, + { + "x":3908, + "y":-328 + }, + { + "x":3938, + "y":-329 + }, + { + "x":3938.5, + "y":-357 + }, + { + "x":3967.5, + "y":-358 + }, + { + "x":3968, + "y":-389.5 + }, + { + "x":4540, + "y":-390 + }, + { + "x":4628.17, + "y":103.5 + }, + { + "x":5793.67, + "y":111.333 + }, + { + "x":5810.33, + "y":314.833 + }, + { + "x":5493, + "y":267.5 + }, + { + "x":5488.5, + "y":440.5 + }, + { + "x":5917.5, + "y":440.5 + }, + { + "x":5955, + "y":10 + }, + { + "x":6224, + "y":6.5 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":3, + "y":1519 + }, + { + "height":0, + "id":43, + "name":"Ground", + "polyline":[ + { + "x":5.33333, + "y":-3.33333 + }, + { + "x":280, + "y":-6 + }, + { + "x":282, + "y":788 + }, + { + "x":-6, + "y":798 + }, + { + "x":-78.6667, + "y":506.667 + }, + { + "x":1.33333, + "y":-2.66667 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":2020, + "y":564 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":61, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":92, + "y":94 + }, + { + "x":812, + "y":-650 + }, + { + "x":722, + "y":-740 + }, + { + "x":720, + "y":-738 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3261.67, + "y":1871.33 + }, + { + "height":0, + "id":69, + "name":"", + "polygon":[ + { + "x":-4, + "y":-20 + }, + { + "x":22, + "y":-24 + }, + { + "x":28, + "y":834 + }, + { + "x":-2, + "y":838 + }, + { + "x":0, + "y":834 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":354, + "y":684 + }, + { + "height":0, + "id":70, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":26, + "y":0 + }, + { + "x":28, + "y":834 + }, + { + "x":-4, + "y":838 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":800, + "y":436 + }, + { + "height":0, + "id":71, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2, + "y":24 + }, + { + "x":652, + "y":20 + }, + { + "x":650, + "y":0 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":146, + "y":640 + }, + { + "height":0, + "id":86, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":26, + "y":0 + }, + { + "x":28, + "y":487.661 + }, + { + "x":-4, + "y":490 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":5743.36, + "y":1306.94 + }, + { + "height":0, + "id":105, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":88, + "y":88 + }, + { + "x":-628, + "y":830 + }, + { + "x":-720, + "y":738 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1509, + "y":804 + }, + { + "height":0, + "id":109, + "name":"", + "polygon":[ + { + "x":6, + "y":166 + }, + { + "x":28, + "y":165.333 + }, + { + "x":28.6667, + "y":494 + }, + { + "x":4.66667, + "y":493.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":6203.33, + "y":1031.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":16, + "id":47, + "name":"Truck", + "properties": + { + "type":4 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":75, + "x":537, + "y":819 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lego", + "objects":[ + { + "height":11, + "id":62, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"bridge17", + "speed":0, + "texture":"bridge17", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"platform", + "visible":true, + "width":11, + "x":574, + "y":869 + }, + { + "height":12.6667, + "id":63, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"bridge17", + "speed":0, + "texture":"bridge17", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"platform", + "visible":true, + "width":12, + "x":472.667, + "y":1008.67 + }, + { + "height":12, + "id":64, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"bridge17", + "speed":0, + "texture":"bridge17", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"platform", + "visible":true, + "width":12, + "x":700.5, + "y":1008.5 + }, + { + "height":11, + "id":65, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"bridge17", + "speed":0, + "texture":"bridge17", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"platform", + "visible":true, + "width":11.5, + "x":472.5, + "y":1181.5 + }, + { + "height":12.5, + "id":66, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"bridge17", + "speed":0, + "texture":"bridge17", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"platform", + "visible":true, + "width":13, + "x":699.5, + "y":1182.5 + }, + { + "height":12, + "id":67, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"bridge17", + "speed":0, + "texture":"bridge17", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"platform", + "visible":true, + "width":13.5, + "x":472, + "y":1355 + }, + { + "height":12, + "id":68, + "name":"", + "properties": + { + "bolt":false, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"bridge17", + "speed":0, + "texture":"bridge17", + "torque":0, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"platform", + "visible":true, + "width":12, + "x":700.5, + "y":1355.5 + }, + { + "height":22, + "id":75, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":100, + "motor":true, + "physics_key":"mill1", + "speed":-40, + "texture":"mill2", + "torque":2000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":23.3333, + "x":4761.33, + "y":1122 + }, + { + "height":22.6667, + "id":77, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":100, + "motor":true, + "physics_key":"mill1", + "speed":-40, + "texture":"mill17_1", + "torque":2000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":-44, + "type":"mill", + "visible":true, + "width":24, + "x":5162.67, + "y":1118.33 + }, + { + "height":22.6667, + "id":78, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":100, + "motor":true, + "physics_key":"mill1", + "speed":-40, + "texture":"mill17_2", + "torque":2000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":22.6667, + "x":5570.67, + "y":1118.67 + }, + { + "height":23.3333, + "id":91, + "name":"", + "properties": + { + "friction":2, + "mass":18, + "physics_key":"box17_long", + "texture":"box17_long" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":162.667, + "x":4137.33, + "y":1022.67 + }, + { + "height":20.8333, + "id":92, + "name":"", + "properties": + { + "friction":2, + "mass":15, + "physics_key":"box17_small", + "texture":"box17_small" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":25.1667, + "x":4157.5, + "y":1050.17 + }, + { + "height":21.8333, + "id":96, + "name":"", + "properties": + { + "friction":2, + "mass":15, + "physics_key":"box17_small", + "texture":"box17_small" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":24.1667, + "x":4257.33, + "y":1049.5 + }, + { + "height":22.5, + "id":97, + "name":"", + "properties": + { + "friction":2, + "mass":15, + "physics_key":"box17_small", + "texture":"box17_small" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":26.1667, + "x":4157.17, + "y":1076.33 + }, + { + "height":21, + "id":98, + "name":"", + "properties": + { + "friction":2, + "mass":15, + "physics_key":"box17_small", + "texture":"box17_small" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":24.3333, + "x":4257.83, + "y":1075.33 + }, + { + "height":21.6667, + "id":99, + "name":"", + "properties": + { + "friction":2, + "mass":15, + "physics_key":"box17_small", + "texture":"box17_small" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":22.8333, + "x":4258, + "y":1099.17 + }, + { + "height":20.6667, + "id":100, + "name":"", + "properties": + { + "friction":2, + "mass":15, + "physics_key":"box17_small", + "texture":"box17_small" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":25.5, + "x":4157.83, + "y":1100.17 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2432, + "id":49, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":224, + "x":0, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2464, + "id":46, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":110, + "x":6234, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":110, + "orientation":"orthogonal", + "renderorder":"right-down", + "templategroups":[], + "tiledversion":"2017.10.11", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":88 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level18.json b/jellytruck/js/data/Level18.json new file mode 100644 index 0000000000000000000000000000000000000000..1bca06415d06c7b03a5e25140af653f71fb575e3 --- /dev/null +++ b/jellytruck/js/data/Level18.json @@ -0,0 +1,1318 @@ +{ "height":70, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":70, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":34, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":105, + "name":"", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":1742.42424242424, + "y":0 + }, + { + "x":1742.42424242424, + "y":42.424242424242 + }, + { + "x":-3.03030303030306, + "y":39.393939393939 + }, + { + "x":-3.03030303030306, + "y":0 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":336.363636363636, + "y":4993.93939393939 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":33, + "id":106, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":744, + "x":546, + "y":4488 + }, + { + "height":289, + "id":107, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":44, + "x":1246, + "y":4524 + }, + { + "height":322, + "id":108, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":35, + "x":1939, + "y":3899 + }, + { + "height":38, + "id":109, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":707, + "x":1232, + "y":3895 + }, + { + "height":32.666666666667, + "id":110, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":186.666666666667, + "x":546, + "y":3844.33 + }, + { + "height":34.666666666667, + "id":111, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":344.666666666667, + "x":547.333333333333, + "y":3016.33 + }, + { + "height":36, + "id":112, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":344, + "x":1115, + "y":3015 + }, + { + "height":36, + "id":113, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":344, + "x":1626, + "y":3014 + }, + { + "height":34.6666666666665, + "id":114, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":344, + "x":836, + "y":2570.66666666667 + }, + { + "height":35.333333333333, + "id":116, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":342, + "x":1406.66666666667, + "y":2570 + }, + { + "height":33.3333333333335, + "id":117, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":343.333333333333, + "x":548, + "y":2107.33 + }, + { + "height":33.3333333333335, + "id":118, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":344.666666666667, + "x":1114.66666666667, + "y":2107.33333333333 + }, + { + "height":34, + "id":119, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":344, + "x":1626.66666666667, + "y":2106.66666666667 + }, + { + "height":33.3333333333333, + "id":120, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":344, + "x":836, + "y":1669.33333333333 + }, + { + "height":34, + "id":121, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":343.333333333333, + "x":1406, + "y":1669.33333333333 + }, + { + "height":326, + "id":122, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":35, + "x":1939, + "y":930 + }, + { + "height":326, + "id":125, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":32.6666666666667, + "x":545.333333333333, + "y":934.666666666667 + }, + { + "height":0, + "id":123, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-9.33333333333326, + "y":33.3333333333334 + }, + { + "x":406.666666666667, + "y":164 + }, + { + "x":409.333333333333, + "y":132 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1530.66666666667, + "y":789.333333333333 + }, + { + "height":0, + "id":124, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":408, + "y":-129 + }, + { + "x":419, + "y":-99 + }, + { + "x":0, + "y":37 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":574, + "y":921 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":28, + "id":126, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":30, + "x":788, + "y":3947 + }, + { + "height":25, + "id":127, + "name":"", + "properties": + { + "obj_name":"Ball4", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":28.75, + "x":1068.5, + "y":3948.75 + }, + { + "height":24, + "id":128, + "name":"", + "properties": + { + "obj_name":"Balloon", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":31, + "x":1798, + "y":4763 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lego", + "objects":[ + { + "height":23.6363636363637, + "id":132, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"mill18_2", + "speed":200, + "texture":"mill18_2", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":24.5454545454547, + "x":1045.09090909091, + "y":1056 + }, + { + "height":24, + "id":133, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":false, + "physics_key":"mill18_2", + "speed":200, + "texture":"mill18_3", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":24.5454545454545, + "x":1447.09090909091, + "y":1054.90909090909 + }, + { + "height":24, + "id":134, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":true, + "physics_key":"mill1", + "speed":-100, + "texture":"Blade_mill", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":24.909090909091, + "x":1637.18181818182, + "y":529 + }, + { + "height":25, + "id":135, + "name":"", + "properties": + { + "bolt":true, + "bolt_scale":0.28, + "bounce":0.3, + "friction":50, + "limit":false, + "low":0, + "mass":2.5, + "motor":true, + "physics_key":"mill1", + "speed":-100, + "texture":"Blade_mill", + "torque":8000, + "up":0 + }, + "propertytypes": + { + "bolt":"bool", + "bolt_scale":"float", + "bounce":"float", + "friction":"float", + "limit":"bool", + "low":"float", + "mass":"float", + "motor":"bool", + "physics_key":"string", + "speed":"float", + "texture":"string", + "torque":"float", + "up":"float" + }, + "rotation":0, + "type":"mill", + "visible":true, + "width":24.8181818181818, + "x":1255.18181818182, + "y":253 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":5040, + "id":103, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":168, + "x":2216, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":17.3333, + "id":104, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":18.6667, + "x":698.667, + "y":429.333 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "image":"..\/..\/..\/..\/JellyTruck_Dev\/Jelly_Resources\/Level\/Level18\/Level18_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":82, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1414, + "y":-1 + }, + { + "x":1414.33, + "y":22.3333 + }, + { + "x":0.333333, + "y":22.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":556.667, + "y":4.66667 + }, + { + "height":0, + "id":83, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":22.6667, + "y":0.333333 + }, + { + "x":23, + "y":918.667 + }, + { + "x":-0.333333, + "y":926.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":549.333, + "y":7.33333 + }, + { + "height":0, + "id":84, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23.3333, + "y":0 + }, + { + "x":22.3333, + "y":845.333 + }, + { + "x":-0.333333, + "y":845.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":549, + "y":1266 + }, + { + "height":0, + "id":85, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23, + "y":0 + }, + { + "x":23.6667, + "y":885 + }, + { + "x":0.333333, + "y":885 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":548.667, + "y":2135.67 + }, + { + "height":0, + "id":86, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23.6667, + "y":0 + }, + { + "x":23, + "y":802.667 + }, + { + "x":1, + "y":802.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":548.333, + "y":3045.33 + }, + { + "height":0, + "id":87, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23, + "y":0 + }, + { + "x":22.6667, + "y":615.667 + }, + { + "x":0, + "y":615.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":549, + "y":3874 + }, + { + "height":0, + "id":88, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23.3333, + "y":-0.333333 + }, + { + "x":23.3333, + "y":441.667 + }, + { + "x":0.333333, + "y":441.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":548.667, + "y":4516.67 + }, + { + "height":0, + "id":90, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1414, + "y":1 + }, + { + "x":1414.33, + "y":22.3333 + }, + { + "x":0.333333, + "y":23 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":556.333, + "y":4949.67 + }, + { + "height":0, + "id":91, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23.6667, + "y":0 + }, + { + "x":22.6667, + "y":-735 + }, + { + "x":-0.333333, + "y":-735.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1947, + "y":4958.67 + }, + { + "height":0, + "id":92, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":445.333, + "y":0.666667 + }, + { + "x":446, + "y":23.6667 + }, + { + "x":-0.333333, + "y":23 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1812, + "y":4569.67 + }, + { + "height":0, + "id":93, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":22.6667, + "y":0 + }, + { + "x":22.6667, + "y":-852 + }, + { + "x":-0.666667, + "y":-852 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1947, + "y":3898.67 + }, + { + "height":0, + "id":94, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":23.3333, + "y":0 + }, + { + "x":23.3333, + "y":-882 + }, + { + "x":0, + "y":-882 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1946.67, + "y":3019.67 + }, + { + "height":0, + "id":95, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":24.3333, + "y":0 + }, + { + "x":23, + "y":-837.333 + }, + { + "x":1.33333, + "y":-837.333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1946.33, + "y":2109.33 + }, + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":25.3333, + "y":9.33333 + }, + { + "x":24.6667, + "y":-919 + }, + { + "x":2.33333, + "y":-918.667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1944.67, + "y":924.667 + }, + { + "height":0, + "id":129, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":645, + "y":-8 + }, + { + "x":645, + "y":53 + }, + { + "x":0, + "y":62 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":639, + "y":3502 + }, + { + "height":0, + "id":130, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":62, + "y":0 + }, + { + "x":68, + "y":632 + }, + { + "x":6, + "y":634 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":794, + "y":2856 + }, + { + "height":0, + "id":131, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":62, + "y":0 + }, + { + "x":70, + "y":638 + }, + { + "x":10, + "y":638 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1026, + "y":2856 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":97, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":372, + "y":0 + }, + { + "x":374, + "y":90 + }, + { + "x":-1, + "y":89 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1065, + "y":693 + }, + { + "height":0, + "id":98, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":829.333, + "y":2.66667 + }, + { + "x":830.667, + "y":88 + }, + { + "x":2.66667, + "y":89.3333 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":832, + "y":2006.67 + }, + { + "height":0, + "id":99, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":920, + "y":2.66667 + }, + { + "x":922.667, + "y":89.3333 + }, + { + "x":0, + "y":92 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":794.667, + "y":2888 + }, + { + "height":0, + "id":100, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":377, + "y":-1 + }, + { + "x":376, + "y":88 + }, + { + "x":-1, + "y":87 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":791, + "y":3592 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.5, + "id":102, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":72, + "x":1771, + "y":4911 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":5040, + "id":80, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":304, + "x":16, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":5040, + "id":81, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":224, + "x":2080, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":143, + "orientation":"orthogonal", + "renderorder":"right-down", + "templategroups":[], + "tiledversion":"2017.10.11", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":34 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level19.json b/jellytruck/js/data/Level19.json new file mode 100644 index 0000000000000000000000000000000000000000..46ce559946f01639ec049487d7ff799d03bc8b29 --- /dev/null +++ b/jellytruck/js/data/Level19.json @@ -0,0 +1,2180 @@ +{ "height":31, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":31, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":95, + "x":0, + "y":0 + }, + { + "image":"Level19_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":48, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":84, + "y":-4 + }, + { + "x":84, + "y":912 + }, + { + "x":4, + "y":916 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":1936, + "y":908 + }, + { + "height":0, + "id":49, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":104, + "y":4 + }, + { + "x":88, + "y":916 + }, + { + "x":4, + "y":920 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3640, + "y":768 + }, + { + "height":0, + "id":50, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":84, + "y":-4 + }, + { + "x":80, + "y":924 + }, + { + "x":-8, + "y":928 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":5508, + "y":796 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":51, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":6088, + "y":1422.67 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":40, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":532.916666666667, + "y":-5.16666666666652 + }, + { + "x":586.75, + "y":-39.5 + }, + { + "x":639.75, + "y":-76.1666666666667 + }, + { + "x":699.916666666667, + "y":-107 + }, + { + "x":780.75, + "y":-138.583333333333 + }, + { + "x":845.5, + "y":-154.5 + }, + { + "x":906, + "y":-165.75 + }, + { + "x":987, + "y":-170.833333333333 + }, + { + "x":1072.66666666667, + "y":-162.166666666667 + }, + { + "x":1147.16666666667, + "y":-145 + }, + { + "x":1215.33333333333, + "y":-120.25 + }, + { + "x":1258.5, + "y":-99.1666666666667 + }, + { + "x":1313.91666666667, + "y":-66.9166666666667 + }, + { + "x":1361.25, + "y":-34 + }, + { + "x":1405.5, + "y":-0.5 + }, + { + "x":1442.66666666667, + "y":47.4166666666667 + }, + { + "x":1483.83333333333, + "y":93.3333333333333 + }, + { + "x":1529.66666666667, + "y":134.833333333333 + }, + { + "x":1567.25, + "y":165.75 + }, + { + "x":1622.25, + "y":199.25 + }, + { + "x":1686, + "y":223.5 + }, + { + "x":1742.25, + "y":233.25 + }, + { + "x":1818.75, + "y":228 + }, + { + "x":1876, + "y":212.75 + }, + { + "x":1932, + "y":187.25 + }, + { + "x":1976.75, + "y":156.25 + }, + { + "x":2029.25, + "y":116.25 + }, + { + "x":2073.5, + "y":77.5 + }, + { + "x":2119, + "y":28.8333333333335 + }, + { + "x":2151.16666666667, + "y":-10.8333333333333 + }, + { + "x":2191.33333333333, + "y":-58.4166666666667 + }, + { + "x":2240.75, + "y":-111.5 + }, + { + "x":2305, + "y":-166.25 + }, + { + "x":2360.58333333333, + "y":-203.75 + }, + { + "x":2426.25, + "y":-232.666666666667 + }, + { + "x":2493.16666666667, + "y":-249.083333333333 + }, + { + "x":2557.5, + "y":-251 + }, + { + "x":2619.16666666667, + "y":-240.166666666667 + }, + { + "x":2673.58333333333, + "y":-218.5 + }, + { + "x":2725.5, + "y":-190.833333333333 + }, + { + "x":2774.75, + "y":-159.666666666667 + }, + { + "x":2825.75, + "y":-112.5 + }, + { + "x":2875.91666666667, + "y":-65.8333333333333 + }, + { + "x":2920.83333333333, + "y":-10.5833333333333 + }, + { + "x":2987, + "y":55.5 + }, + { + "x":3034.75, + "y":97.25 + }, + { + "x":3095.75, + "y":140 + }, + { + "x":3161.5, + "y":176 + }, + { + "x":3226, + "y":203.75 + }, + { + "x":3301.75, + "y":220 + }, + { + "x":3365.75, + "y":222 + }, + { + "x":3429.5, + "y":216 + }, + { + "x":3497.75, + "y":198.75 + }, + { + "x":3560, + "y":172.75 + }, + { + "x":3624.75, + "y":135 + }, + { + "x":3691.25, + "y":86.75 + }, + { + "x":3745.75, + "y":37 + }, + { + "x":3783.66666666667, + "y":-3.75 + }, + { + "x":3818, + "y":-58.1666666666667 + }, + { + "x":3855.25, + "y":-114.416666666667 + }, + { + "x":3888.25, + "y":-158.75 + }, + { + "x":3932.91666666667, + "y":-213.666666666667 + }, + { + "x":3974.33333333333, + "y":-259.666666666667 + }, + { + "x":4028.66666666667, + "y":-309.666666666667 + }, + { + "x":4086.5, + "y":-353 + }, + { + "x":4152.33333333333, + "y":-385.25 + }, + { + "x":4209.08333333333, + "y":-404.5 + }, + { + "x":4278.33333333333, + "y":-409.5 + }, + { + "x":4359.08333333333, + "y":-393.916666666667 + }, + { + "x":4432, + "y":-360 + }, + { + "x":4477.75, + "y":-322.75 + }, + { + "x":4530.91666666667, + "y":-274.083333333333 + }, + { + "x":4573.58333333333, + "y":-224.5 + }, + { + "x":4620.58333333333, + "y":-160.083333333333 + }, + { + "x":4664.66666666667, + "y":-93.3333333333333 + }, + { + "x":4708.66666666667, + "y":-13.6666666666667 + }, + { + "x":4741.16666666667, + "y":61.5833333333333 + }, + { + "x":4767.25, + "y":121.5 + }, + { + "x":4806.25, + "y":190 + }, + { + "x":4851.25, + "y":258 + }, + { + "x":4907.5, + "y":318.5 + }, + { + "x":4959.75, + "y":355 + }, + { + "x":5015, + "y":374 + }, + { + "x":5070, + "y":372 + }, + { + "x":5125.25, + "y":353.5 + }, + { + "x":5176, + "y":320 + }, + { + "x":5241.75, + "y":256.5 + }, + { + "x":5285.75, + "y":197.75 + }, + { + "x":5328.33333333333, + "y":140.166666666667 + }, + { + "x":5361.83333333333, + "y":83.1666666666665 + }, + { + "x":5405.08333333333, + "y":0.999999999999773 + }, + { + "x":5560.41666666667, + "y":-3 + }, + { + "x":5880.08333333333, + "y":-2 + }, + { + "x":6034.41666666667, + "y":-2.08333333333326 + }, + { + "x":6623.25, + "y":-2.5 + }, + { + "x":6739.75, + "y":-2 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":31.75, + "y":1423.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":0, + "id":62, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":292, + "y":-130 + }, + { + "x":308, + "y":-94 + }, + { + "x":20, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":558, + "y":900 + }, + { + "height":0, + "id":63, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":310, + "y":-64 + }, + { + "x":320, + "y":-24 + }, + { + "x":10, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":814, + "y":774 + }, + { + "height":0, + "id":64, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":310, + "y":62.6666666666667 + }, + { + "x":304, + "y":106 + }, + { + "x":-8, + "y":42 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1090, + "y":705 + }, + { + "height":0, + "id":65, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":246, + "y":202 + }, + { + "x":216, + "y":238 + }, + { + "x":-26, + "y":32 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1314, + "y":754 + }, + { + "height":0, + "id":66, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":162.666666666667, + "y":266.666666666667 + }, + { + "x":164, + "y":268 + }, + { + "x":129.333333333333, + "y":294.666666666667 + }, + { + "x":-37.3333333333335, + "y":21.3333333333334 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1399, + "y":801.333333333333 + }, + { + "height":0, + "id":67, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":86.6666666666665, + "y":102.666666666667 + }, + { + "x":57.3333333333333, + "y":132 + }, + { + "x":-34.6666666666667, + "y":29.3333333333335 + }], + "rotation":-3, + "type":"touch", + "visible":true, + "width":0, + "x":1568, + "y":1070.66666666667 + }, + { + "height":0, + "id":68, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":120, + "y":57.3333333333333 + }, + { + "x":102.666666666667, + "y":96 + }, + { + "x":-21.3333333333333, + "y":44 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1645.33333333333, + "y":1151.33333333333 + }, + { + "height":0, + "id":69, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":133.333333333333, + "y":-17.3333333333333 + }, + { + "x":138.666666666667, + "y":22.6666666666667 + }, + { + "x":8, + "y":44 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1741.33333333333, + "y":1205.33333333333 + }, + { + "height":0, + "id":70, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":118.666666666667, + "y":-66.6666666666665 + }, + { + "x":138.666666666667, + "y":-29.3333333333333 + }, + { + "x":18.6666666666667, + "y":41.3333333333335 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":1853.33333333333, + "y":1186.66666666667 + }, + { + "height":0, + "id":71, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":102.666666666667, + "y":-85.3333333333333 + }, + { + "x":132, + "y":-53.3333333333333 + }, + { + "x":28, + "y":33.3333333333335 + }], + "rotation":-4, + "type":"touch", + "visible":true, + "width":0, + "x":1960, + "y":1118.66666666667 + }, + { + "height":0, + "id":72, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90.6666666666665, + "y":-98.6666666666667 + }, + { + "x":122.666666666667, + "y":-69.3333333333334 + }, + { + "x":30.6666666666665, + "y":32 + }], + "rotation":-3, + "type":"touch", + "visible":true, + "width":0, + "x":2052, + "y":1028 + }, + { + "height":0, + "id":73, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":98.6666666666665, + "y":-90.6666666666667 + }, + { + "x":120, + "y":-56 + }, + { + "x":29.3333333333335, + "y":30.6666666666666 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2142.66666666667, + "y":924 + }, + { + "height":0, + "id":74, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112, + "y":-72 + }, + { + "x":133.333333333333, + "y":-38.6666666666666 + }, + { + "x":28, + "y":32 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2244, + "y":830.666666666667 + }, + { + "height":0, + "id":75, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":122.666666666667, + "y":-53.3333333333334 + }, + { + "x":138.666666666667, + "y":-14.6666666666666 + }, + { + "x":17.3333333333335, + "y":38.6666666666666 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2361.33333333333, + "y":750.666666666667 + }, + { + "height":0, + "id":76, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":129.333333333333, + "y":-25.3333333333334 + }, + { + "x":137.333333333333, + "y":14.6666666666666 + }, + { + "x":6.66666666666652, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2496, + "y":692.666666666667 + }, + { + "height":0, + "id":77, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":136, + "y":26.6666666666666 + }, + { + "x":125.333333333333, + "y":70.6666666666666 + }, + { + "x":-5.33333333333348, + "y":41.3333333333333 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2630.66666666667, + "y":668 + }, + { + "height":0, + "id":78, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":109.333333333333, + "y":77.3333333333334 + }, + { + "x":82.6666666666665, + "y":112 + }, + { + "x":-24, + "y":33.3333333333334 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2774.66666666667, + "y":701.333333333333 + }, + { + "height":0, + "id":79, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90.666666666667, + "y":100 + }, + { + "x":54.666666666667, + "y":129.333333333333 + }, + { + "x":-29.333333333333, + "y":28 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2889.33333333333, + "y":788 + }, + { + "height":0, + "id":80, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":74.6666666666665, + "y":110.666666666667 + }, + { + "x":44, + "y":134.666666666667 + }, + { + "x":-34.666666666667, + "y":28 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":2980, + "y":892 + }, + { + "height":0, + "id":81, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":98.6666666666665, + "y":88 + }, + { + "x":70.6666666666665, + "y":122.666666666667 + }, + { + "x":-30.666666666667, + "y":30.6666666666667 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3052, + "y":993.333333333333 + }, + { + "height":0, + "id":82, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":118.666666666667, + "y":61.3333333333333 + }, + { + "x":100, + "y":100 + }, + { + "x":-25.333333333333, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3149.33333333333, + "y":1076 + }, + { + "height":0, + "id":83, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":134.666666666667, + "y":25.3333333333335 + }, + { + "x":125.333333333333, + "y":68 + }, + { + "x":-8, + "y":46.6666666666667 + }], + "rotation":-3, + "type":"touch", + "visible":true, + "width":0, + "x":3252, + "y":1126.66666666667 + }, + { + "height":0, + "id":84, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":132, + "y":-28 + }, + { + "x":138.666666666667, + "y":14.6666666666667 + }, + { + "x":8, + "y":41.3333333333335 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3366.66666666667, + "y":1147.66666666667 + }, + { + "height":0, + "id":85, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":125.333333333333, + "y":-54.6666666666667 + }, + { + "x":141.333333333333, + "y":-17.3333333333333 + }, + { + "x":18.6666666666665, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3488, + "y":1115.33333333333 + }, + { + "height":0, + "id":87, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":100, + "y":-89.3333333333334 + }, + { + "x":125.333333333333, + "y":-58.6666666666667 + }, + { + "x":28, + "y":32 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3702.66666666667, + "y":987 + }, + { + "height":0, + "id":86, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":109.333333333333, + "y":-73.3333333333333 + }, + { + "x":134.666666666667, + "y":-41.3333333333333 + }, + { + "x":24, + "y":37.3333333333333 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3598.66666666667, + "y":1063.33333333333 + }, + { + "height":0, + "id":88, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":164, + "y":-204 + }, + { + "x":196, + "y":-176 + }, + { + "x":29.3333333333335, + "y":28 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3794.66666666667, + "y":900 + }, + { + "height":0, + "id":89, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":136, + "y":-110.666666666667 + }, + { + "x":164, + "y":-77.3333333333334 + }, + { + "x":28, + "y":36 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":3922.66666666667, + "y":747 + }, + { + "height":0, + "id":91, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":176, + "y":21.3333333333333 + }, + { + "x":170.666666666666, + "y":65.3333333333333 + }, + { + "x":-5.33333333333394, + "y":42.6666666666666 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4244, + "y":592 + }, + { + "height":0, + "id":94, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":117.333333333333, + "y":133.333333333333 + }, + { + "x":84, + "y":162.666666666667 + }, + { + "x":-34.666666666667, + "y":30.6666666666666 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4682.66666666667, + "y":803 + }, + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":118.666666666666, + "y":126.666666666667 + }, + { + "x":89.333333333333, + "y":157.333333333333 + }, + { + "x":-33.3333333333339, + "y":29.3333333333333 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4879, + "y":1085.33333333333 + }, + { + "height":0, + "id":95, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":90.666666666667, + "y":152 + }, + { + "x":56, + "y":176 + }, + { + "x":-38.6666666666661, + "y":25.3333333333334 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4793.66666666667, + "y":938.666666666667 + }, + { + "height":0, + "id":93, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":141.333333333334, + "y":108 + }, + { + "x":116, + "y":141.333333333333 + }, + { + "x":-25.333333333333, + "y":32 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4558.66666666667, + "y":707.333333333333 + }, + { + "height":0, + "id":92, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":158.666666666667, + "y":85.3333333333333 + }, + { + "x":138.666666666667, + "y":125.333333333333 + }, + { + "x":-20, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4417.33333333333, + "y":620 + }, + { + "height":0, + "id":90, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":172, + "y":-54.6666666666666 + }, + { + "x":185.333333333333, + "y":-14.6666666666666 + }, + { + "x":16, + "y":42.6666666666666 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4061.33333333333, + "y":640.666666666667 + }, + { + "height":0, + "id":97, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":94.6666666666661, + "y":57.3333333333333 + }, + { + "x":70.6666666666661, + "y":92 + }, + { + "x":-21.3333333333339, + "y":40 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":4984, + "y":1190 + }, + { + "height":0, + "id":98, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":106.666666666667, + "y":-10.6666666666665 + }, + { + "x":109.333333333334, + "y":33.3333333333335 + }, + { + "x":4, + "y":45.3333333333335 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5050.66666666667, + "y":1235.66666666667 + }, + { + "height":0, + "id":99, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":93.333333333333, + "y":-57.3333333333335 + }, + { + "x":112, + "y":-21.3333333333335 + }, + { + "x":21.333333333333, + "y":36 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5141.33333333333, + "y":1229 + }, + { + "height":0, + "id":101, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":130.666666666667, + "y":-189.333333333333 + }, + { + "x":166.666666666667, + "y":-164 + }, + { + "x":36, + "y":24 + }], + "rotation":-3, + "type":"touch", + "visible":true, + "width":0, + "x":5289.33333333333, + "y":1097 + }, + { + "height":0, + "id":102, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1424, + "y":4 + }, + { + "x":1424, + "y":49.3333333333334 + }, + { + "x":2.66666666666606, + "y":46.6666666666666 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5424, + "y":903.666666666667 + }, + { + "height":0, + "id":100, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":64, + "y":-82.6666666666665 + }, + { + "x":100, + "y":-57.3333333333333 + }, + { + "x":30.6666666666661, + "y":26.6666666666667 + }], + "rotation":0, + "type":"touch", + "visible":true, + "width":0, + "x":5226, + "y":1176.66666666667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lego", + "objects":[ + { + "height":52.0833333333335, + "id":59, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"ver_bar", + "texture":"red_ver_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":17.833333333333, + "x":5790, + "y":1364.91666666667 + }, + { + "height":53, + "id":103, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"ver_bar", + "texture":"red_ver_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":18.25, + "x":5835.66666666667, + "y":1364.41666666667 + }, + { + "height":52.4166666666667, + "id":104, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"ver_bar", + "texture":"red_ver_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":17.166666666667, + "x":5742.33333333333, + "y":1364.58333333333 + }, + { + "height":52.0833333333333, + "id":105, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"ver_bar", + "texture":"dark_orange_ver_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":17.583333333333, + "x":5742.33333333333, + "y":1298.33333333333 + }, + { + "height":51.9166666666667, + "id":106, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"ver_bar", + "texture":"dark_orange_ver_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":17.916666666667, + "x":5835.66666666667, + "y":1298.16666666667 + }, + { + "height":12.9166666666667, + "id":107, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"hor_bar", + "texture":"orange_hor_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":55.083333333333, + "x":5741.75, + "y":1284.83333333333 + }, + { + "height":12.5833333333333, + "id":108, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"hor_bar", + "texture":"orange_hor_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":56, + "x":5797.25, + "y":1285 + }, + { + "height":13.25, + "id":109, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"hor_bar", + "texture":"yellow_hor_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":56.166666666667, + "x":5742.33333333333, + "y":1351.08333333333 + }, + { + "height":13.5833333333335, + "id":110, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"hor_bar", + "texture":"yellow_hor_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":55, + "x":5799.25, + "y":1350.66666666667 + }, + { + "height":26.4166666666667, + "id":111, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"small_ver_bar", + "texture":"small_orange_ver_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":17.416666666667, + "x":5789.91666666667, + "y":1298.58333333333 + }, + { + "height":26, + "id":112, + "name":"", + "properties": + { + "friction":2, + "mass":5, + "physics_key":"small_ver_bar", + "texture":"small_orange_ver_bar" + }, + "propertytypes": + { + "friction":"float", + "mass":"float", + "physics_key":"string", + "texture":"string" + }, + "rotation":0, + "type":"solid", + "visible":true, + "width":17.666666666667, + "x":5789.91666666667, + "y":1324.66666666667 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":216, + "id":58, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":6835.27272727273, + "x":7.75757575757574, + "y":1975.0303030303 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":25, + "id":52, + "name":"", + "properties": + { + "obj_name":"Ball19", + "texture":"gum_6", + "xoffset":0.6, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":28.5, + "x":4279, + "y":924.166666666667 + }, + { + "height":25.3333333333333, + "id":57, + "name":"", + "properties": + { + "obj_name":"Balloon", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":26.6666666666665, + "x":1018, + "y":1064 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2240, + "id":46, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":360, + "x":6376, + "y":-16 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14.5, + "id":47, + "name":"Truck", + "properties": + { + "type":2 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73, + "x":989.25, + "y":1213.25 + }, + { + "height":98, + "id":56, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":4, + "x":1022, + "y":1080 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2224, + "id":44, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":640, + "x":14, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":113, + "orientation":"orthogonal", + "renderorder":"right-down", + "templategroups":[], + "tiledversion":"2017.10.11", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":95 +} \ No newline at end of file diff --git a/jellytruck/js/data/Level20.json b/jellytruck/js/data/Level20.json new file mode 100644 index 0000000000000000000000000000000000000000..0aec250bc6074ceaef12be260dcf400618296864 --- /dev/null +++ b/jellytruck/js/data/Level20.json @@ -0,0 +1,529 @@ +{ "height":37, + "layers":[ + { + "data":[0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":37, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":81, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":53, + "id":50, + "name":"", + "properties": + { + "obj_name":"BigBall", + "texture":"gum_6", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":50, + "x":2700, + "y":1460 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "image":"Level20_Ref.png", + "name":"Image Layer 1", + "opacity":1, + "type":"imagelayer", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Flag", + "objects":[ + { + "height":80, + "id":54, + "name":"Flag", + "rotation":0, + "type":"", + "visible":true, + "width":60, + "x":5010, + "y":1352 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Fail", + "objects":[ + { + "height":296.97, + "id":49, + "name":"", + "rotation":0, + "type":"fail", + "visible":true, + "width":2351.52, + "x":2530.3, + "y":1572.73 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Score_Point", + "objects":[ + { + "height":0, + "id":44, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":118.182, + "y":-3.0303 + }, + { + "x":109.091, + "y":672.727 + }, + { + "x":0, + "y":675.758 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3042.42, + "y":1190.91 + }, + { + "height":0, + "id":45, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":112.121, + "y":0 + }, + { + "x":112.121, + "y":672.727 + }, + { + "x":6.06061, + "y":678.788 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":3500, + "y":1193.94 + }, + { + "height":0, + "id":46, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":115.152, + "y":0 + }, + { + "x":112.121, + "y":684.848 + }, + { + "x":6.06061, + "y":681.818 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4018.18, + "y":1193.94 + }, + { + "height":0, + "id":47, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":106.061, + "y":0 + }, + { + "x":103.03, + "y":675.758 + }, + { + "x":0, + "y":678.788 + }], + "rotation":0, + "type":"score", + "visible":true, + "width":0, + "x":4596.97, + "y":1193.94 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":39, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":471.333, + "y":-22.6667 + }, + { + "x":617, + "y":-27.6667 + }, + { + "x":685.333, + "y":-50.6667 + }, + { + "x":760, + "y":-116.667 + }, + { + "x":830.667, + "y":-183.333 + }, + { + "x":899, + "y":-224.667 + }, + { + "x":980.333, + "y":-247.667 + }, + { + "x":1091, + "y":-214 + }, + { + "x":1177.33, + "y":-128.667 + }, + { + "x":1248.33, + "y":-62 + }, + { + "x":1304.33, + "y":13 + }, + { + "x":1341, + "y":70 + }, + { + "x":1386, + "y":103 + }, + { + "x":1452.67, + "y":124.333 + }, + { + "x":1532.33, + "y":122 + }, + { + "x":1602.67, + "y":92.3333 + }, + { + "x":1631, + "y":70.3333 + }, + { + "x":1673.33, + "y":38 + }, + { + "x":1733.33, + "y":24 + }, + { + "x":1814.67, + "y":38.3333 + }, + { + "x":1883, + "y":75.3333 + }, + { + "x":2201, + "y":72 + }, + { + "x":2548, + "y":70.3333 + }, + { + "x":2548, + "y":530.667 + }, + { + "x":3506.83, + "y":529.167 + }, + { + "x":4050.33, + "y":529.167 + }, + { + "x":4687.83, + "y":529.667 + }, + { + "x":4691.83, + "y":50.6667 + }, + { + "x":5635.33, + "y":46.1667 + }, + { + "x":5642.83, + "y":49.1667 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":18.6667, + "y":1299.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":55, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2410, + "y":2 + }, + { + "x":2408, + "y":430 + }, + { + "x":4, + "y":432 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":2532, + "y":1630 + }, + { + "height":0, + "id":56, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":232, + "y":0 + }, + { + "x":232, + "y":24 + }, + { + "x":2, + "y":24 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4570, + "y":1350 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2688, + "id":40, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":320, + "x":5512, + "y":-16 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2664, + "id":41, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":160, + "x":-8, + "y":-16 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":14, + "id":42, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":75.75, + "x":2459.25, + "y":1308.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":57, + "orientation":"orthogonal", + "properties": + { + "obj_name":"BigBall", + "texture":"gum_6", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "renderorder":"right-down", + "tiledversion":"1.0.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":81 +} \ No newline at end of file diff --git a/jellytruck/js/data/menu.json b/jellytruck/js/data/menu.json new file mode 100644 index 0000000000000000000000000000000000000000..6cea5b5c77cc6199565c26cd2d70c82d94524525 --- /dev/null +++ b/jellytruck/js/data/menu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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":38, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":93, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground", + "objects":[ + { + "height":0, + "id":4, + "name":"Ground", + "polyline":[ + { + "x":0, + "y":0 + }, + { + "x":545.5, + "y":16 + }, + { + "x":713.375, + "y":16.125 + }, + { + "x":747.375, + "y":-6.125 + }, + { + "x":781.875, + "y":-21.5 + }, + { + "x":820.25, + "y":-32 + }, + { + "x":861.125, + "y":-35 + }, + { + "x":901.375, + "y":-31 + }, + { + "x":940.125, + "y":-19.25 + }, + { + "x":973.375, + "y":-1.75 + }, + { + "x":999.625, + "y":15.875 + }, + { + "x":1016.25, + "y":38.75 + }, + { + "x":1048, + "y":66.75 + }, + { + "x":1090.75, + "y":84.75 + }, + { + "x":1149.38, + "y":85.25 + }, + { + "x":1201, + "y":69.625 + }, + { + "x":1241.75, + "y":49.375 + }, + { + "x":1260.63, + "y":36.5 + }, + { + "x":1324.75, + "y":48.25 + }, + { + "x":1385.75, + "y":60.375 + }, + { + "x":1450.88, + "y":68.5 + }, + { + "x":1503.38, + "y":74 + }, + { + "x":1554.88, + "y":81.375 + }, + { + "x":1589.75, + "y":85.625 + }, + { + "x":1626.63, + "y":85.375 + }, + { + "x":1653.25, + "y":89.125 + }, + { + "x":1651.38, + "y":120.375 + }, + { + "x":1724.63, + "y":119.5 + }, + { + "x":1812.88, + "y":109.125 + }, + { + "x":1880.63, + "y":84.75 + }, + { + "x":1925.25, + "y":62.5 + }, + { + "x":1959.38, + "y":32 + }, + { + "x":1995.38, + "y":10.875 + }, + { + "x":2033, + "y":-8.75 + }, + { + "x":2082.38, + "y":-28.25 + }, + { + "x":2131.88, + "y":-38.625 + }, + { + "x":2180.63, + "y":-36.625 + }, + { + "x":2228.13, + "y":-26.125 + }, + { + "x":2272.25, + "y":-9.625 + }, + { + "x":2306.25, + "y":10.75 + }, + { + "x":2337.63, + "y":32.5 + }, + { + "x":2380.63, + "y":55.375 + }, + { + "x":2419.25, + "y":71.875 + }, + { + "x":2465.75, + "y":81.75 + }, + { + "x":2519.63, + "y":80.75 + }, + { + "x":2564.13, + "y":68.625 + }, + { + "x":2599.25, + "y":53 + }, + { + "x":2641, + "y":21.25 + }, + { + "x":2669.88, + "y":49.625 + }, + { + "x":2701.5, + "y":70.25 + }, + { + "x":2742.88, + "y":92.75 + }, + { + "x":2789.88, + "y":105.625 + }, + { + "x":2840.38, + "y":103 + }, + { + "x":2886.13, + "y":90.875 + }, + { + "x":2926.38, + "y":68 + }, + { + "x":2958.5, + "y":42.75 + }, + { + "x":2979.88, + "y":22.375 + }, + { + "x":3010.5, + "y":15.25 + }, + { + "x":3049.75, + "y":10.375 + }, + { + "x":3080.63, + "y":9.125 + }, + { + "x":3123.63, + "y":10.25 + }, + { + "x":3178.25, + "y":15.75 + }, + { + "x":3223, + "y":21.375 + }, + { + "x":3266, + "y":30.875 + }, + { + "x":3292.38, + "y":36 + }, + { + "x":3324.5, + "y":47.125 + }, + { + "x":3278.5, + "y":606.75 + }, + { + "x":3840.63, + "y":603.75 + }, + { + "x":3769.75, + "y":92.375 + }, + { + "x":3791.5, + "y":93.875 + }, + { + "x":3823.25, + "y":100.75 + }, + { + "x":3869.75, + "y":107.125 + }, + { + "x":3912, + "y":106 + }, + { + "x":3954.13, + "y":104.375 + }, + { + "x":3987, + "y":102.125 + }, + { + "x":4016.5, + "y":96 + }, + { + "x":4050, + "y":89 + }, + { + "x":4075.88, + "y":83.25 + }, + { + "x":4109, + "y":74.125 + }, + { + "x":4153.75, + "y":60.875 + }, + { + "x":4185.5, + "y":50.375 + }, + { + "x":4231.5, + "y":35.25 + }, + { + "x":4281.5, + "y":18.5 + }, + { + "x":4324.38, + "y":10.875 + }, + { + "x":4364.25, + "y":10.875 + }, + { + "x":4398.63, + "y":23.625 + }, + { + "x":4430.38, + "y":27.625 + }, + { + "x":4466.25, + "y":31.875 + }, + { + "x":4499.38, + "y":35.875 + }, + { + "x":4538.13, + "y":39.625 + }, + { + "x":4575.13, + "y":42.25 + }, + { + "x":4609.75, + "y":41.625 + }, + { + "x":4641.25, + "y":34.875 + }, + { + "x":4666.88, + "y":16.375 + }, + { + "x":4699.38, + "y":-8 + }, + { + "x":4734.38, + "y":-28.25 + }, + { + "x":4769.5, + "y":-44.25 + }, + { + "x":4806.25, + "y":-54 + }, + { + "x":4839, + "y":-57.875 + }, + { + "x":4876.13, + "y":-53.125 + }, + { + "x":4913.38, + "y":-43.5 + }, + { + "x":4944.5, + "y":-22.875 + }, + { + "x":4971.63, + "y":-4.5 + }, + { + "x":4995.25, + "y":18.875 + }, + { + "x":5026.63, + "y":47.125 + }, + { + "x":5058.75, + "y":64.25 + }, + { + "x":5095.25, + "y":78 + }, + { + "x":5130.75, + "y":82.625 + }, + { + "x":5173.75, + "y":78.25 + }, + { + "x":5209.75, + "y":59.625 + }, + { + "x":5240.5, + "y":34.875 + }, + { + "x":5265.38, + "y":12 + }, + { + "x":5295.75, + "y":-6.75 + }, + { + "x":5342.25, + "y":-26 + }, + { + "x":5380.25, + "y":-33.875 + }, + { + "x":5428.75, + "y":-33.5 + }, + { + "x":5463.25, + "y":-30 + }, + { + "x":5507.38, + "y":-18.375 + }, + { + "x":5552.63, + "y":-0.375 + }, + { + "x":5610.63, + "y":25.625 + }, + { + "x":5642.63, + "y":9.5 + }, + { + "x":5676.5, + "y":-6.5 + }, + { + "x":5725.38, + "y":-19 + }, + { + "x":5768.38, + "y":-20.125 + }, + { + "x":5814.13, + "y":-12.625 + }, + { + "x":5858.25, + "y":2.25 + }, + { + "x":5898.75, + "y":26.5 + }, + { + "x":5924.25, + "y":51 + }, + { + "x":5950.25, + "y":71.25 + }, + { + "x":5983.63, + "y":92.25 + }, + { + "x":6032.25, + "y":108.25 + }, + { + "x":6070.75, + "y":109 + }, + { + "x":6108.75, + "y":98.5 + }, + { + "x":6148.38, + "y":79 + }, + { + "x":6184.5, + "y":49.125 + }, + { + "x":6206.38, + "y":27.75 + }, + { + "x":6271.25, + "y":27.375 + }, + { + "x":6339.88, + "y":26.75 + }, + { + "x":6432.75, + "y":27.625 + }, + { + "x":6543.63, + "y":27.625 + }], + "rotation":0, + "type":"ground", + "visible":true, + "width":0, + "x":35.125, + "y":1782 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Jelly_Obj", + "objects":[ + { + "height":16, + "id":27, + "name":"", + "properties": + { + "obj_name":"Menu_Cube2", + "texture":"gum_5", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":25.6667, + "x":1748.67, + "y":1831.67 + }, + { + "height":17.6667, + "id":28, + "name":"", + "properties": + { + "obj_name":"Menu_Cube1", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":18.6667, + "x":1860.33, + "y":1798.67 + }, + { + "height":18, + "id":29, + "name":"", + "properties": + { + "obj_name":"Menu_Cube1", + "texture":"gum_2", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":19.6667, + "x":1944.33, + "y":1689 + }, + { + "height":27, + "id":30, + "name":"", + "properties": + { + "obj_name":"MenuBall", + "texture":"gum_6", + "xoffset":0.6, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":28.6667, + "x":1140.33, + "y":1756 + }, + { + "height":48, + "id":31, + "name":"", + "properties": + { + "obj_name":"Shape5", + "texture":"gum_2", + "xoffset":0.8, + "yoffset":0.7 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":46, + "x":4055, + "y":1157 + }, + { + "height":22.6667, + "id":60, + "name":"", + "properties": + { + "obj_name":"Bottle", + "texture":"gum_1", + "xoffset":0.5, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":12, + "x":2965.33, + "y":1678 + }, + { + "height":20, + "id":61, + "name":"", + "properties": + { + "obj_name":"Menu_Rect", + "texture":"gum_3", + "xoffset":0.2, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":22.6667, + "x":3358.67, + "y":1864 + }, + { + "height":18.6667, + "id":62, + "name":"", + "properties": + { + "obj_name":"Menu_Rect2", + "texture":"gum_2", + "xoffset":0.8, + "yoffset":0.5 + }, + "propertytypes": + { + "obj_name":"string", + "texture":"string", + "xoffset":"float", + "yoffset":"float" + }, + "rotation":0, + "type":"jelly", + "visible":true, + "width":30.6667, + "x":3781.33, + "y":1885.33 + }, + { + "height":81.7273, + "id":67, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":166.667, + "x":918.697, + "y":1762.03 + }, + { + "height":604, + "id":71, + "name":"", + "rotation":0, + "type":"", + "visible":true, + "width":100, + "x":3364, + "y":404 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Start", + "objects":[ + { + "height":2696, + "id":63, + "name":"Start", + "rotation":0, + "type":"bound", + "visible":true, + "width":320, + "x":40, + "y":0 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"End", + "objects":[ + { + "height":2664, + "id":64, + "name":"End", + "rotation":0, + "type":"bound", + "visible":true, + "width":208, + "x":6360, + "y":24 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck", + "objects":[ + { + "height":16, + "id":66, + "name":"Truck", + "properties": + { + "type":1 + }, + "propertytypes": + { + "type":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":73.5, + "x":1139, + "y":1576 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Joints", + "objects":[ + { + "height":304, + "id":35, + "name":"", + "rotation":0, + "type":"ground", + "visible":true, + "width":1960, + "x":3328, + "y":32 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ground_Static", + "objects":[ + { + "height":0, + "id":36, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":160, + "y":8 + }, + { + "x":105.333, + "y":1154.67 + }, + { + "x":-58.6667, + "y":1148 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":764, + "y":1321.33 + }, + { + "height":0, + "id":37, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":161.333, + "y":9.33333 + }, + { + "x":104, + "y":1157.33 + }, + { + "x":-60, + "y":1152 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":576, + "y":1296 + }, + { + "height":0, + "id":38, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":166.667, + "y":6.66667 + }, + { + "x":110.667, + "y":1154.67 + }, + { + "x":-53.3333, + "y":1148 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":902.667, + "y":5.33333 + }, + { + "height":0, + "id":39, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":176, + "y":8 + }, + { + "x":172, + "y":54.6667 + }, + { + "x":0, + "y":46.6667 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1648, + "y":1896 + }, + { + "height":0, + "id":40, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":172, + "y":-30.6667 + }, + { + "x":181.333, + "y":13.3333 + }, + { + "x":8, + "y":41.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1744, + "y":1908 + }, + { + "height":0, + "id":41, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":162.667, + "y":-70.6667 + }, + { + "x":182.667, + "y":-28 + }, + { + "x":17.3333, + "y":41.3333 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":1834.67, + "y":1900 + }, + { + "height":0, + "id":42, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":89.3333, + "y":64 + }, + { + "x":-93.3333, + "y":305.333 + }, + { + "x":-181.333, + "y":234.667 + }], + "rotation":0, + "type":"", + "visible":true, + "width":0, + "x":3653.33, + "y":1152 + }, + { + "height":0, + "id":47, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":55, + "y":-1 + }, + { + "x":56, + "y":305 + }, + { + "x":3, + "y":305 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3533, + "y":990 + }, + { + "height":0, + "id":48, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":354, + "y":236 + }, + { + "x":327, + "y":279 + }, + { + "x":-25, + "y":41 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3587, + "y":990 + }, + { + "height":0, + "id":49, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":207, + "y":-39 + }, + { + "x":193, + "y":-97 + }, + { + "x":-9, + "y":-62 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3638, + "y":1361 + }, + { + "height":0, + "id":50, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":188, + "y":21 + }, + { + "x":202, + "y":-38 + }, + { + "x":12, + "y":-58 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3717, + "y":1350 + }, + { + "height":0, + "id":51, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":206, + "y":-24 + }, + { + "x":191, + "y":-84 + }, + { + "x":-6, + "y":-60 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3905, + "y":1370 + }, + { + "height":0, + "id":52, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":221, + "y":26 + }, + { + "x":231, + "y":-24 + }, + { + "x":-12, + "y":-58 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4109, + "y":1344 + }, + { + "height":0, + "id":53, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":160, + "y":-22 + }, + { + "x":146, + "y":-69 + }, + { + "x":7, + "y":-51 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4330, + "y":1370 + }, + { + "height":0, + "id":54, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":117, + "y":26 + }, + { + "x":119, + "y":-33 + }, + { + "x":-15, + "y":-45 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":4487, + "y":1344 + }, + { + "height":0, + "id":55, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":710, + "y":0 + }, + { + "x":698, + "y":129 + }, + { + "x":-11, + "y":120 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3941, + "y":857 + }, + { + "height":0, + "id":68, + "name":"", + "polygon":[ + { + "x":8, + "y":-4 + }, + { + "x":170, + "y":11 + }, + { + "x":147, + "y":370 + }, + { + "x":-16, + "y":362 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3928, + "y":857 + }, + { + "height":0, + "id":69, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":208, + "y":34 + }, + { + "x":214, + "y":117 + }, + { + "x":7, + "y":68 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3805, + "y":1869 + }, + { + "height":0, + "id":70, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":186, + "y":-10 + }, + { + "x":186, + "y":56 + }, + { + "x":1, + "y":61 + }], + "rotation":0, + "type":"static", + "visible":true, + "width":0, + "x":3914, + "y":1887 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Dummy", + "objects":[ + { + "height":0, + "id":57, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":44, + "y":0 + }, + { + "x":44, + "y":366.667 + }, + { + "x":-2.66667, + "y":368 + }], + "properties": + { + "dist":381 + }, + "propertytypes": + { + "dist":"int" + }, + "rotation":0, + "type":"dummy", + "visible":true, + "width":0, + "x":2869.33, + "y":1473.33 + }, + { + "height":0, + "id":58, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":45.3333, + "y":0 + }, + { + "x":45.3333, + "y":368 + }, + { + "x":2.66667, + "y":370.667 + }], + "properties": + { + "dist":381 + }, + "propertytypes": + { + "dist":"int" + }, + "rotation":0, + "type":"dummy", + "visible":true, + "width":0, + "x":3030.67, + "y":1417.33 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Crusher", + "objects":[ + { + "ellipse":true, + "height":130, + "id":12, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4740.5, + "y":1518 + }, + { + "ellipse":true, + "height":130, + "id":13, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4740.5, + "y":1380 + }, + { + "ellipse":true, + "height":130, + "id":14, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4740.5, + "y":1244 + }, + { + "ellipse":true, + "height":130, + "id":15, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4696.5, + "y":1100 + }, + { + "ellipse":true, + "height":130, + "id":16, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4687.5, + "y":959.5 + }, + { + "ellipse":true, + "height":130, + "id":17, + "name":"", + "properties": + { + "speed":360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4650.5, + "y":821.5 + }, + { + "ellipse":true, + "height":130, + "id":18, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4587.5, + "y":615 + }, + { + "ellipse":true, + "height":130, + "id":19, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4733, + "y":646.5 + }, + { + "ellipse":true, + "height":130, + "id":20, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4825, + "y":759 + }, + { + "ellipse":true, + "height":130, + "id":21, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4857.5, + "y":897 + }, + { + "ellipse":true, + "height":130, + "id":22, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4874.5, + "y":1038 + }, + { + "ellipse":true, + "height":130, + "id":23, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4911, + "y":1174 + }, + { + "ellipse":true, + "height":130, + "id":24, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4911, + "y":1314 + }, + { + "ellipse":true, + "height":130, + "id":25, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4911, + "y":1454.5 + }, + { + "ellipse":true, + "height":130, + "id":26, + "name":"", + "properties": + { + "speed":-360, + "texture":"crusher", + "torque":50000 + }, + "propertytypes": + { + "speed":"float", + "texture":"string", + "torque":"float" + }, + "rotation":0, + "type":"crusher", + "visible":true, + "width":130, + "x":4899, + "y":1596.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextobjectid":72, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.0.3", + "tileheight":72, + "tilesets":[], + "tilewidth":72, + "type":"map", + "version":1, + "width":93 +} \ No newline at end of file diff --git a/jellytruck/js/game.js b/jellytruck/js/game.js new file mode 100644 index 0000000000000000000000000000000000000000..477eda92d518fa88eed9a63a299bfe92de6f9f95 --- /dev/null +++ b/jellytruck/js/game.js @@ -0,0 +1,1129 @@ +var WHEEL_CATEGORYBITS = 2; +var TRUCK_CATEGORYBITS = 4; +var OTHER_CATEGORYBITS = 8; +var PLATFORM_CATEGORYBITS = 16; +var ALLTOUCH_CATEGORYBITS = 32; + +var WHEEL_MASKBITS = 58; +var TRUCK_MASKBITS = 60; +var OTHER_MASKBITS = 46; +var PLATFORM_MASKBITS = 54; +var ALLTOUCH_MASKBITS = 62; + +window.jt = { + phy_debug: false, // show or hide physics body debug + trace: false, // show or hide console + showFPS: false, + worldScale: 1, + cursors: null, + left: false, + right: false, + up: false, + down: false, + pause: false, + mobileup: false, + mobiledown: false, + mobileright: false, + mobileleft: false, + music: true, + sound: true, + menu_in_state: 0, + current_level: 0, + game_data: null, + game_menu: null, + game_bg: null, + game_fail: null, + well_done: null, + truck_speed: false, + truck_move: 0, + sfx: null, + balloonForce: { + min: 200, + max: 800, + currentHorizontal: 0, + currentVertical: 0, + speedHorozontal: 3.5, + speedVertical: 7 + }, + initInput: function (game) { + this.cursors = game.input.keyboard.createCursorKeys(); + }, + androidfpsSetup:function(game,ratio,fp,ve,po){ + game.time.physicsElapsed = 1 / fp; + game.physics.box2d.ptmRatio = ratio; + // this.game.physics.box2d.frameRate = 1/100; + game.physics.box2d.velocityIterations = ve; + game.physics.box2d.positionIterations = po; + game.physics.box2d.useElapsedTime = true; + }, + gameController: function (game) { + + buttonleft = game.add.button(50, 430, 'left_bt', null, this, 0, 1, 0, 1); + buttonleft.fixedToCamera = true; + buttonleft.anchor.set(0.5); + //go_img + + buttonleft.events.onInputDown.add(function () { + jt.mobileleft = true; + }); + buttonleft.events.onInputUp.add(function () { + jt.mobileleft = false; + }); + + buttonright = game.add.button(150, 430, 'right_bt', null, this, 0, 1, 0, 1); + buttonright.fixedToCamera = true; + buttonright.anchor.set(0.5); + + + buttonright.events.onInputDown.add(function () { + jt.mobileright = true; + }); + buttonright.events.onInputUp.add(function () { + jt.mobileright = false; + }); + + buttondown = game.add.button(game.width - 150, 430, 'stop_img', null, this, 0, 1, 0, 1); + buttondown.fixedToCamera = true; + buttondown.anchor.set(0.5); + + + buttondown.events.onInputDown.add(function () { + jt.mobiledown = true; + }); + buttondown.events.onInputUp.add(function () { + jt.mobiledown = false; + }); + + buttonup = game.add.button(game.width - 50, 430, 'go_img', null, this, 0, 1, 0, 1); + buttonup.fixedToCamera = true; + buttonup.anchor.set(0.5); + + buttonup.events.onInputDown.add(function () { + jt.mobileup = true; + }); + buttonup.events.onInputUp.add(function () { + jt.mobileup = false; + }); + + + }, + gameAction: function (game, body, front, back, type) { + var tractor_addition = 0; + var kart_moment = 0; + switch (type) { + case 1: + tractor_addition = 1; + kart_moment = 12; + break; + case 2: + if(jt.current_level === 8){ + tractor_addition = 1; + kart_moment = 12; + }else{ + tractor_addition = 3; + kart_moment = 18; + } + break; + case 3: + tractor_addition = 3; + kart_moment = 60; + break; + case 4: + tractor_addition = 3; + kart_moment = 70; + break; + case 5: + tractor_addition = 3; + kart_moment = 18; + break; + case 6: + tractor_addition = 3; + kart_moment = 15; + break; + case 7: + tractor_addition = 3; + if(jt.current_level === 14){ + kart_moment = 55; + }else{ + kart_moment = 12; + } + break; + case 8: + tractor_addition = 3; + kart_moment = 24; + break; + case 9: + tractor_addition = 2; + kart_moment = 15; + break; + } + //console.log("Type & Speed: " + type + "/" + kart_moment); + this.cart = game.physics.box2d.getBody(body); + this.koleso1 = game.physics.box2d.getBody(front); + this.koleso2 = game.physics.box2d.getBody(back); + + if ((jt.up && this.koleso1.GetAngularVelocity() < +(kart_moment + 100)) || jt.mobileup) { + this.koleso1.ApplyTorque(kart_moment * 6 * tractor_addition); + this.koleso2.ApplyTorque(kart_moment * 6); + this.truck_speed = true; + if (this.truck_move < 150) + this.truck_move += 5; + // truckbg.play(); + // front.applyForce(kart_moment * 0.7 * tractor_addition,0); + // back.applyForce(kart_moment *0.7); + + + //this.game.sound.stopAll(); + } + if ((jt.down && this.koleso1.GetAngularVelocity() > -(kart_moment + 100)) || jt.mobiledown) { + this.koleso1.ApplyTorque(-kart_moment * 6 * tractor_addition); + this.koleso2.ApplyTorque(-kart_moment * 6); + this.truck_speed = true; + if (this.truck_move < 150) + this.truck_move += 5; + // front.applyForce(-kart_moment * 0.7 * tractor_addition,0); + // back.applyForce(-kart_moment *0.7); + } + if (jt.left || jt.mobileleft) { + // body.applyForce(-18,0); + // body.velocity.x = -180 * 1.5; + if (type !== 3 && type !== 7) + this.cart.ApplyTorque(-180 * 1.75); + else + this.cart.ApplyTorque(-180 * 2.5); + } + if (jt.right || jt.mobileright) { + //body.applyForce(18,0); + //body.velocity.x = 180 * 1.5; + //body.moveRight(180 * 1.5); + if (type != 3 && type !== 7){ + this.cart.ApplyTorque(180 * 1.75); + console.log(this.cart.m_torque); + } + else{ + this.cart.ApplyTorque(180 * 2.5); + } + //front.moveRight(kart_moment * 14 * tractor_addition,0); + + } + }, + gameBalloonAction: function (game, body, type) { + if(type===undefined) + type=1; + if(type == 1)return this.gameBalloonActionType1(game,body); + if(type == 2)return this.gameBalloonActionType2(game,body); + }, + + //Round 9 Ballon Settings + gameBalloonActionType1: function (game, body) { + + if (jt.up || jt.mobileup) { + body.applyForce(0, -400); + } + if (!jt.up || !jt.mobileup) { + body.applyForce(0, -300); + } + if (jt.left || jt.mobileleft) { + body.applyForce(-220, 0); + } + if (jt.right || jt.mobileright) { + body.applyForce(220, 0); + } + }, + + //Round 18 Ballon Settings + gameBalloonActionType2: function (game, body) { + if(jt.up || jt.mobileup){ + this.balloonForce.currentVertical += this.balloonForce.speedVertical; + this.balloonForce.currentVertical = this.balloonForce.currentVertical>this.balloonForce.max?this.balloonForce.max:this.balloonForce.currentVertical; + }else{ + this.balloonForce.currentVertical = this.balloonForce.min+200; + } + if(jt.left||jt.mobileleft||jt.right||jt.mobileright){ + this.balloonForce.currentHorizontal += this.balloonForce.speedHorozontal; + this.balloonForce.currentHorizontal = this.balloonForce.currentHorizontal>this.balloonForce.max?this.balloonForce.max:this.balloonForce.currentHorizontal; + }else{ + this.balloonForce.currentHorizontal -= this.balloonForce.speedHorozontal*2; + this.balloonForce.currentHorizontal = this.balloonForce.currentHorizontal < this.balloonForce.min?this.balloonForce.min:this.balloonForce.currentHorizontal; + } + + if (jt.up || jt.mobileup) { + body.applyForce(0, -1*this.balloonForce.currentVertical); + } + if (!jt.up || !jt.mobileup) { + body.applyForce(0, -400); + } + if (jt.left || jt.mobileleft) { + body.applyForce(-1*this.balloonForce.currentHorizontal, 0); + } + if (jt.right || jt.mobileright) { + body.applyForce(this.balloonForce.currentHorizontal, 0); + } + }, + resetInput: function () { + jt.down = false; + jt.up = false; + jt.left = false; + jt.right = false; + jt.truck_speed = false; + if (jt.truck_move > 0) + jt.truck_move--; + else + jt.truck_move = 0; + //jt.truck_bg_wobble = false; + }, + updateinput: function () { + + if (this.cursors.down.isDown && !jt.down) { + jt.down = true; + jt.truck_bg = true; + //alert(jt.truck_bg); + } + if (this.cursors.up.isDown && !jt.up) { + + jt.up = true; + jt.truck_bg = true; + } + if (this.cursors.right.isDown && !jt.right) { + jt.right = true; + jt.truck_bg_wobble = true; + } + if (this.cursors.left.isDown && !jt.left) { + jt.left = true; + jt.truck_bg_wobble = true; + } + + }, + //Flag + createFlag: function (game, img, img1, img2, map) { + this._fx = map.objects["Flag"][0].x + map.objects["Flag"][0].width / 2; + this._fy = map.objects["Flag"][0].y + map.objects["Flag"][0].height / 2; + + this.base = null; + this.base = new Phaser.Physics.Box2D.Body(game, null, this._fx, this._fy); + this.base.setRectangle(60, 80, 0, 0); + this.base.static = true; + + this.flag_bot = game.add.sprite(this._fx, this._fy - 34, img2); + game.physics.box2d.enable(this.flag_bot); + this.flag_bot.body.setRectangle(9, 36, 0, 0); + this.flag_bot.body.setCollisionCategory(PLATFORM_CATEGORYBITS); + this.flag_bot.body.setCollisionMask(PLATFORM_MASKBITS); + game.physics.box2d.revoluteJoint(this.base, this.flag_bot.body, 0, -25, 0, 25, 0, 0, false, 0, 5, true); + + this.flag_mid = game.add.sprite(this._fx, this._fy - 76, img1); + game.physics.box2d.enable(this.flag_mid); + this.flag_mid.body.setRectangle(9, 36, 0, 0); + this.flag_mid.body.setCollisionCategory(PLATFORM_CATEGORYBITS); + this.flag_mid.body.setCollisionMask(PLATFORM_MASKBITS); + // this.flag_mid.body.static = true; + game.physics.box2d.revoluteJoint(this.flag_bot.body, this.flag_mid.body, 0, -15, 0, 15, 0, 0, false, 0, 6, true); + + this.flag_head = game.add.sprite(this._fx + 15, this._fy - 114, img); + game.physics.box2d.enable(this.flag_head); + this.flag_head.body.setRectangle(9, 36, -15, 0); + this.flag_head.body.setCollisionCategory(PLATFORM_CATEGORYBITS); + this.flag_head.body.setCollisionMask(PLATFORM_MASKBITS); + // this.flag_head.body.static=true; + game.physics.box2d.revoluteJoint(this.flag_mid.body, this.flag_head.body, 0, -15, -14, 15, 0, 0, false, 0, 6, true); + this._jot = game.physics.box2d.distanceJoint(this.base, this.flag_head.body, 75, -60, -100, 0, -10) + return { + head: this.flag_head, + middle: this.flag_mid, + bottom: this.flag_bot, + joint: this._jot, + xpos: this._fx, + ypos: this._fy + }; + + }, + //Game Data + InitData: function () { + + this._data = { + "lastPlayed": "1", + "music": "1", + "sound": "1", + "levels": [{ + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + }, + { + "score": "0", + "star": "0" + } + ] + }; + if (window.localStorage) window.localStorage.setItem("coolmath_jellytruck", JSON.stringify(this._data)); + }, + LoadData: function () { + if (window.localStorage) + return JSON.parse(window.localStorage.getItem("coolmath_jellytruck")); + else + return -1; + }, + SaveData: function () { + if (window.localStorage) { + window.localStorage.setItem("coolmath_jellytruck", JSON.stringify(this.game_data)); + } + }, + GetTotalScore: function () { + if (window.localStorage) { + var data = JSON.parse(window.localStorage.getItem("coolmath_jellytruck")); + this.total_score = 0; + for (var i = 0; i < data.levels.length; i++) { + this.total_score += parseInt(data.levels[i].score); + } + } + return this.total_score; + }, + getLevelPreScore: function (level) { + var _level_pre_score = [0, + 2371 - 100, //1 + 2557 - 100, //2 + 2453 - 100, //3 + 2486 - 50, //4 + 2570 - 50, //5 + 2836 - 50, //6 + 2385, //7 + 2272, //8 + 2356, //9 + 2181, //10 + 2066, //11 + 2428, //12 + 2279, //13 + 2810, //14 + 2129, //15 + 2213, //16 + 2440, //17 + 2534, //18 + 2161, //19 + 2813, //20 + 0 + ]; //21 + return _level_pre_score[level]; + }, + getStar: function (score, second) { + var scr = score + second; + var st = 0; + if (scr > (jt.getLevelPreScore(jt.current_level) * 0.8)) + st = 1; + if (scr > (jt.getLevelPreScore(jt.current_level) * 0.9)) + st = 2; + if (scr > (jt.getLevelPreScore(jt.current_level) * 1.0)) + st = 3; + return st; + }, + updateCamera: function (game, jc, px, py, lvec, win, restart, pause) { + this._cx = jc.cx; + this._cy = jc.cy; + this._focx = jc.focx; + this._focy = jc.focy; + this._focz = jc.focz; + this._mode = jc.mode; + this._zoom = jc.zoom; + this._width = jc.width; + this._height = jc.height; + this._levelZoom = jc.levelZoom; + this._scale = jc.scale; + + if (!win && !restart && !pause) { + + switch (jc.mode) { + case 0: + this._cx = (px - (this._width / 2)) * this._zoom; + this._cy = (py - (this._height / 2)) * this._zoom; + game.camera.x = this._cx; + game.camera.y = this._cy; + game.camera.scale.x = this._zoom; + game.camera.scale.y = this._zoom; + if (jt.up || jt.down || jt.right || jt.left) { + if (lvec > 10) { + if (this._zoom > this._scale) + this._zoom -= 0.005; + } else { + if (this._zoom < this._levelZoom) + this._zoom += 0.005; + } + } else { + if (this._zoom < this._levelZoom) + this._zoom += 0.005; + } + break; + case 1: + + if (this._focx != -1 && this._focy != -1 && this._focz != -1) { + if (this._zoom > this._focz) { + this._zoom -= 0.005; + } + this._cx = (px - (this._width / 2)) * this._zoom; + this._cy = (py - (this._height / 2)) * this._zoom; + game.camera.x = this._cx; + game.camera.y = this._cy; + game.camera.scale.x = this._zoom; + game.camera.scale.y = this._zoom; + // if(this._zoom 5) { + // this._cx += 2 * Math.cos(this._ang); + // this._cy += 2 * Math.sin(this._ang); + this._cx = ((this._focx - (this._width / 2)) * this._zoom) + (0.005 * Math.cos(this._ang)); + this._cy = ((this._focy - (this._height / 2)) * this._zoom) + (0.005 * Math.sin(this._ang)); + } else { + this._cx = (this._focx - (this._width / 2)) * this._zoom; + this._cy = (this._focy - (this._height / 2)) * this._zoom; + } + }*/ + + } else { + this._cx = (px - (this._width / 2)) * this._zoom; + this._cy = (py - (this._height / 2)) * this._zoom; + + } + + break; + } + + } else { + if (this._zoom < this._levelZoom) + this._zoom += 0.005; + if (win || pause) { + this._cx = (px - (this._width / 2)) * this._zoom; + this._cy = (py - (this._height / 2)) * this._zoom; + game.camera.x = this._cx; + game.camera.y = this._cy; + game.camera.scale.x = this._zoom; + game.camera.scale.y = this._zoom; + } else { + game.camera.scale.x = this._zoom; + game.camera.scale.y = this._zoom; + game.camera.x = this._cx * this._zoom; + game.camera.y = this._cy * this._zoom; + + } + + + } + return { + cx: this._cx, + cy: this._cy, + focx: this._focx, + focy: this._focy, + focz: this._focz, + mode: this._mode, + zoom: this._zoom, + width: this._width, + height: this._height, + levelZoom: this._levelZoom, + scale: this._scale + }; + }, + /***************************** Level Setup Method ********************************/ + setupMenuBg: function (game) { + this._bg = game.add.image(game.width / 2, game.height / 2, "menubg"); + this._bg.anchor.set(0.5); + this._bg.fixedToCamera = true; + //bg.autoCull=false; + this._light = game.add.image(689, 108, "bg_light"); + this._light.fixedToCamera = true; + //light.autoCull=false; + this._light.anchor.set(0.6, 0.3); + return { + background: this._bg, + light: this._light + } + }, + /*setupBg: function(game, bg, light) { + this._bg = game.add.sprite(game.width / 2, game.height / 2, "bg"); + this._bg.anchor.set(0.5); + this._bg.fixedToCamera = true; + //bg.autoCull=false; + this._light = game.add.sprite(689, 108, "bg_light"); + this._light.fixedToCamera = true; + //light.autoCull=false; + this._light.anchor.set(0.6, 0.3); + return { + background: this._bg, + light: this._light + } + },*/ + setupScene: function (game, map, name, x, y, cw, ch, fric) { + this._tx = map.objects["Truck"][0].x + map.objects["Truck"][0].width / 2; + this._ty = map.objects["Truck"][0].y + map.objects["Truck"][0].height / 2; + this._tt = map.objects["Truck"][0].properties.type; + this._sp = new Phaser.Physics.Box2D.Body(game, null, map.objects["Start"][0].x + map.objects["Start"][0].width / 2, map.objects["Start"][0].y + map.objects["Start"][0].height / 2, 0); + this._sp.setRectangle(map.objects["Start"][0].width, map.objects["Start"][0].height, 0, 0); + this._sp.setCollisionCategory(OTHER_CATEGORYBITS); + this._sp.setCollisionMask(OTHER_MASKBITS); + this._sp.static = true; + + this._ep = new Phaser.Physics.Box2D.Body(game, null, map.objects["End"][0].x + map.objects["End"][0].width / 2, map.objects["End"][0].y + map.objects["End"][0].height / 2, 0); + this._ep.setRectangle(map.objects["End"][0].width, map.objects["End"][0].height, 0, 0); + this._ep.static = true; + this._ep.setCollisionCategory(OTHER_CATEGORYBITS); + this._ep.setCollisionMask(OTHER_MASKBITS); + + game.camera.x = (this._sp.x + map.objects["Start"][0].width / 2); + game.camera.y = (game.height * 0.5); + // game.camera.width = cw; + // game.camera.height = ch; + // if(this.current_level!==17) + game.world.setBounds(this._sp.x + map.objects["Start"][0].width / 2, 0, this._ep.x - 200, 8000); + // else + // game.world.setBounds(0,0,this._ep.x,8000); + this._scene = game.add.image(x, y, name); + this._scene.autoCull = true; + this._scene.checkWorldBounds = true; + // this._art= game.add.sprite(x,y,name); + var _groundBody = []; + map.objects["Ground"].forEach(function (element) { + var _gb = new Phaser.Physics.Box2D.Body(game, null, element.x, element.y, 0); + + if (element.type === "ground") { + var _gv = []; + for (var k = 0; k < element.polyline.length; k++) { + _gv.push(element.polyline[k][0]); + _gv.push(element.polyline[k][1]); + } + _gb.setChain(_gv); + _gb.friction = fric; + _gb.setCollisionCategory(OTHER_CATEGORYBITS); + _gb.setCollisionMask(OTHER_MASKBITS); + _groundBody.push(_gb); + + } + }); + + return { + start_body: this._sp, + end_body: this._ep, + art: this._scene, + truck_x: this._tx, + truck_y: this._ty, + truck_type: this._tt, + grounds: _groundBody, + bound_x: this._sp.x + map.objects["Start"][0].width / 2, + bound_y: 0, + bound_w: this._ep.x - 200, + bound_h: 8000 + }; + }, + setupLegoScene: function (game, map, name, x, y) { + this._tx = map.objects["Truck"][0].x + map.objects["Truck"][0].width / 2; + this._ty = map.objects["Truck"][0].y + map.objects["Truck"][0].height / 2; + this._tt = map.objects["Truck"][0].properties.type; + this._sp = new Phaser.Physics.Box2D.Body(game, null, map.objects["Start"][0].x + map.objects["Start"][0].width / 2, map.objects["Start"][0].y + map.objects["Start"][0].height / 2, 0); + this._sp.setRectangle(map.objects["Start"][0].width, map.objects["Start"][0].height, 0, 0); + this._sp.setCollisionCategory(OTHER_CATEGORYBITS); + this._sp.setCollisionMask(OTHER_MASKBITS); + this._sp.static = true; + + this._ep = new Phaser.Physics.Box2D.Body(game, null, map.objects["End"][0].x + map.objects["End"][0].width / 2, map.objects["End"][0].y + map.objects["End"][0].height / 2, 0); + this._ep.setRectangle(map.objects["End"][0].width, map.objects["End"][0].height, 0, 0); + this._ep.static = true; + this._ep.setCollisionCategory(OTHER_CATEGORYBITS); + this._ep.setCollisionMask(OTHER_MASKBITS); + + game.camera.x = (this._sp.x + map.objects["Start"][0].width / 2); + game.camera.y = (game.height * 0.5); + game.camera.width = 400; + // if(this.current_level!==17) + game.world.setBounds(this._sp.x + map.objects["Start"][0].width / 2, 0, this._ep.x, 8000); + // else + // game.world.setBounds(0,0,this._ep.x,8000); + this._scene = game.add.image(x, y, name); + + return { + start_body: this._sp, + end_body: this._ep, + art: this._scene, + truck_x: this._tx, + truck_y: this._ty, + truck_type: this._tt + }; + }, + setupStaticObject: function (game, map, fric) { + var _statBody = []; + map.objects["Ground_Static"].forEach(function (element) { + if (element.type === "static") { + this._tx = element.x; + this._ty = element.y; + var poly = [element.polygon[0][0], element.polygon[0][1], + element.polygon[1][0], element.polygon[1][1], + element.polygon[2][0], element.polygon[2][1], + element.polygon[3][0], element.polygon[3][1] + ]; + var _gb = new Phaser.Physics.Box2D.Body(game, null, this._tx, this._ty, 0); + _gb.setPolygon(poly); + _gb.friction = fric; + _gb.setCollisionCategory(OTHER_CATEGORYBITS); + _gb.setCollisionMask(OTHER_MASKBITS); + _statBody.push(_gb); + } + }); + return _statBody; + }, + setupMenuStaticObject: function (game, map) { + var _statBody = []; + map.objects["Ground_Static"].forEach(function (element) { + if (element.type === "static") { + this._tx = element.x; + this._ty = element.y; + var poly = [element.polygon[0][0], element.polygon[0][1], + element.polygon[1][0], element.polygon[1][1], + element.polygon[2][0], element.polygon[2][1], + element.polygon[3][0], element.polygon[3][1] + ]; + var _gb = new Phaser.Physics.Box2D.Body(game, null, this._tx, this._ty, 0); + _gb.setPolygon(poly); + _gb.friction = 0.2; + _gb.setCollisionCategory(OTHER_CATEGORYBITS); + _gb.setCollisionMask(OTHER_MASKBITS); + _statBody.push(_gb); + } + }); + return _statBody; + }, + setupScoreObject: function (game, map) { + var _scoreBody = []; + map.objects["Score_Point"].forEach(function (element) { + if (element.type === "score") { + this._tx = element.x; + this._ty = element.y; + var _gb = new Phaser.Physics.Box2D.Body(game, null, this._tx, this._ty, 0); + _gb.setPolygon([element.polygon[0][0], element.polygon[0][1], + element.polygon[1][0], element.polygon[1][1], + element.polygon[2][0], element.polygon[2][1], + element.polygon[3][0], element.polygon[3][1] + ]); + _gb.setCollisionCategory(OTHER_CATEGORYBITS); + _gb.setCollisionMask(OTHER_MASKBITS); + _gb.sensor = true; + _scoreBody.push(_gb); + } + }); + return _scoreBody; + }, + setupFailObject: function (game, map) { + var _failBody = []; + map.objects["Fail"].forEach(function (element) { + if (element.type === "fail") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._fb = new Phaser.Physics.Box2D.Body(game, null, this._tx, this._ty, 0); + this._fb.setRectangle(element.width, element.height); + this._fb.setCollisionCategory(OTHER_CATEGORYBITS); + this._fb.setCollisionMask(OTHER_MASKBITS); + this._fb.static = true; + this._fb.sensor = true; + _failBody.push(this._fb); + } + if (element.type === "touch") { + this._tx = element.x; + this._ty = element.y; + var poly = [element.polygon[0][0], element.polygon[0][1], + element.polygon[1][0], element.polygon[1][1], + element.polygon[2][0], element.polygon[2][1], + element.polygon[3][0], element.polygon[3][1] + ]; + this._fb = new Phaser.Physics.Box2D.Body(game, null, this._tx, this._ty, 0); + this._fb.setPolygon(poly); + this._fb.setCollisionCategory(OTHER_CATEGORYBITS); + this._fb.setCollisionMask(OTHER_MASKBITS); + // this._fb.setCollisionCategory(TRUCK_CATEGORYBITS); + // this._fb.setCollisionMask(TRUCK_MASKBITS); + this._fb.static = true; + this._fb.sensor = true; + _failBody.push(this._fb); + } + }); + return _failBody; + }, + setupCameraObject: function (game, map) { + var _cameraBody = []; + map.objects["Camera"].forEach(function (element) { + if (element.type === "focus") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._cb = new Phaser.Physics.Box2D.Body(game, null, this._tx, this._ty, 0); + this._cb.setRectangle(element.width, element.height); + this._cb.setCollisionCategory(OTHER_CATEGORYBITS); + this._cb.setCollisionMask(OTHER_MASKBITS); + this._cb.static = true; + this._cb.sensor = true; + this._cb.m_userData = { + focusX: element.properties.focusX, + focusY: element.properties.focusY, + zoom: element.properties.zoom + }; + _cameraBody.push(this._cb); + } + + }); + return _cameraBody; + }, + setupJointGround: function (game, map) { + var _groundBody; + map.objects["Joints"].forEach(function (element) { + + if (element.type === "ground") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + _groundBody = new Phaser.Physics.Box2D.Body(game, null, this._tx, this._ty, 0); + _groundBody.setRectangle(element.width, element.height); + _groundBody.static = true; + + } + }); + return _groundBody; + }, + setupJellyObj: function (game, map, phy) { + var _jellyBody = []; + var count = -10; + map.objects["Jelly_Obj"].forEach(function (element) { + if (element.type === "jelly") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._img = element.properties.texture; + this._name = element.properties.obj_name; + this._ox = (element.properties.xoffset).toFixed(2); + this._oy = (element.properties.yoffset).toFixed(2); + var _gb = new Jelly(game, this._img, this._tx, this._ty, phy, _name, this._ox, this._oy, count); + count--; + _jellyBody.push(_gb); + } + }); + return _jellyBody; + }, + setupCrusher: function (game, map, ground) { + var _crushBody = []; + var count = -10; + map.objects["Crusher"].forEach(function (element) { + if (element.type === "crusher") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._img = element.properties.texture; + this._speed = (element.properties.speed).toFixed(2); + this._torque = (element.properties.torque).toFixed(2); + var _gb = game.add.sprite(this._tx, this._ty, this._img); + _gb.anchor.set(0.5, 0.5); + game.physics.box2d.enable(_gb); + _gb.body.setCircle(130 / 2, 0, 0) + _gb.body.friction = 20.0; + _gb.body.setCollisionCategory(PLATFORM_CATEGORYBITS); + _gb.body.setCollisionMask(PLATFORM_MASKBITS); + this.la = new box2d.b2Vec2(); + // this.lb = new box2d.b2Vec2(); + ground.toLocalPoint(this.la, new box2d.b2Vec2(this._tx, this._ty)); + // this._bodyB.toLocalPoint(this.lb, new box2d.b2Vec2(x,y)); + game.physics.box2d.revoluteJoint(ground, _gb.body, this.la.x, this.la.y, 0, 0, this._speed, this._torque, true); + // + _crushBody.push(_gb); + } + }); + + return _crushBody; + }, + setupLegoObj: function (game, map, ground) { + var _legoBody = []; + map.objects["Lego"].forEach(function (element) { + if (element.type == "bolt") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._img = element.properties.texture; + this._physics_key = element.properties.physics_key; + this._bolt = element.properties.bolt; + this._fr = (element.properties.friction).toFixed(2); + this._rs = (element.properties.bounce).toFixed(2); + this.den = (element.properties.mass).toFixed(2); + var _lego = new Lego(game, this._tx, this._ty, this._img, this._physics_key, this._fr, this._rs, this.den); + + if (this._bolt) { + this._bs = (element.properties.bolt_scale).toFixed(2); + _lego.setBolt(this._tx, this._ty, this._bs) + } + _legoBody.push(_lego); + } + + if (element.type == "balanceBox") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._img = element.properties.texture; + this._physics_key = element.properties.physics_key; + this._bolt = element.properties.bolt; + this._fr = (element.properties.friction).toFixed(2); + this._rs = (element.properties.bounce).toFixed(2); + this.den = (element.properties.mass).toFixed(2); + var _lego = new Lego(game, this._tx, this._ty, this._img, this._physics_key, this._fr, this._rs, this.den); + + if (this._bolt) { + this._bs = (element.properties.bolt_scale).toFixed(2); + _lego.setBolt(this._tx, this._ty, this._bs) + } + _legoBody.push(_lego); + } + + if (element.type === "mill") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._img = element.properties.texture; + this._physics_key = element.properties.physics_key; + this._speed = (element.properties.speed).toFixed(2); + this._torque = (element.properties.torque).toFixed(2); + this._motor = element.properties.motor; + this._limit = element.properties.limit; + this._low = (element.properties.low).toFixed(2); + this._up = (element.properties.up).toFixed(2); + this._bolt = element.properties.bolt; + this._fr = (element.properties.friction).toFixed(2); + this._rs = (element.properties.bounce).toFixed(2); + this.den = (element.properties.mass).toFixed(2); + var _lego = new Lego(game, this._tx, this._ty, this._img, this._physics_key, this._fr, this._rs, this.den); + _lego.enableRevolute(ground, this._speed, this._torque, this._motor, this._low, this._up, this._limit); + if (this._bolt) { + this._bs = (element.properties.bolt_scale).toFixed(2); + _lego.setBolt(this._tx, this._ty, this._bs) + + } + _legoBody.push(_lego); + } + + if (element.type == "solid") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._img = element.properties.texture; + this._physics_key = element.properties.physics_key; + this._fr = (element.properties.friction).toFixed(2); + this.den = (element.properties.mass).toFixed(2); + var _lego = new Lego(game, this._tx, this._ty, this._img, this._physics_key, this._fr, 0, this.den); + + _legoBody.push(_lego); + + } + if (element.type === "platform") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._img = element.properties.texture; + this._physics_key = element.properties.physics_key; + this._speed = (element.properties.speed).toFixed(2); + this._torque = (element.properties.torque).toFixed(2); + this._motor = element.properties.motor; + this._limit = element.properties.limit; + this._low = (element.properties.low).toFixed(2); + this._up = (element.properties.up).toFixed(2); + this._bolt = element.properties.bolt; + this._fr = (element.properties.friction).toFixed(2); + this._rs = (element.properties.bounce).toFixed(2); + this.den = (element.properties.mass).toFixed(2); + var _lego = new Lego(game, this._tx, this._ty, this._img, this._physics_key, this._fr, this._rs, this.den); + _lego.enableRevolute(ground, this._speed, this._torque, this._motor, this._low, this._up, this._limit); + if (this._bolt) { + this._bs = (element.properties.bolt_scale).toFixed(2); + _lego.setBolt(this._tx, this._ty, this._bs) + + } + _legoBody.push(_lego); + } + }); + return _legoBody; + }, + /* setupJoints: function (game, map, ground) { + var _jellyJoint = []; + map.objects["Joints"].forEach(function (element) { + if (element.type === "joint") { + this._tx = element.x + element.width / 2; + this._ty = element.y + element.height / 2; + this._st = element.properties.static; + this._ax = element.properties.ax; + this._ay = element.properties.ay; + this._limit = element.properties.limit; + this._mo = element.properties.motor; + this._speed = element.properties.speed; + this._torque = element.properties.motor; + this._up = element.properties.limit_up; + this._low = element.properties.limit_low; + switch (element.properties.joint_name) { + case "prismatic": + this.joint = jt.primaticJoint(game, ground, this._tx, this._ty, this._up, this._low, 101); + _jellyJoint.push({ + joint: this.joint, + speed: this._speed, + torque: this._torque, + time_trail: 0 + }); + break; + } + } + }); + return _jellyJoint; + }, + primaticJoint: function (game, ground, x, y, up, low, angle) { + this._bodyA = ground; + this._bodies = game.physics.box2d.getBodiesAtPoint(x, y); + this._bodyB = this._bodies[0]; + this.la = new box2d.b2Vec2(); + this.lb = new box2d.b2Vec2(); + this._bodyA.toLocalPoint(this.la, new box2d.b2Vec2(x, y)); + this._bodyB.toLocalPoint(this.lb, new box2d.b2Vec2(x, y)); + this.xs = Math.cos(angle * Math.PI / 180); + this.ys = Math.sin(angle * Math.PI / 180); + this.xs = (this.xs * 1000) / 1000; + this.ys = (this.ys * 1000) / 1000; + this.joint = game.physics.box2d.prismaticJoint(this._bodyA, this._bodyB, this.xs, this.ys, this.la.x, this.la.y, this.lb.x, this.lb.y, 0, 0, false, low, up, true); + this.joint.collideConnected = false; + return this.joint; + }, + revoluteJoint: function (game, bodyA, bodyB, x, y) { + this.la = new box2d.b2Vec2(); + this.lb = new box2d.b2Vec2(); + bodyA.toLocalPoint(this.la, new box2d.b2Vec2(x, y)); + bodyB.toLocalPoint(this.lb, new box2d.b2Vec2(x, y)); + this.joint = game.physics.box2d.revoluteJoint(bodyA, bodyB, this.la.x, this.la.y, this.lb.x, this.lb.y); + this.joint.collideConnected = false; + return this.joint; + },*/ + dist: function (_x1, _y1, _x2, _y2) { + //changed by Arun Vashist 11/30/2018 + //return Math.sqrt(Math.pow((_x1 - _x2), 2) + Math.pow((_y1 - _y2), 2)); + return Phaser.Math.distance(_x1, _y1, _x2, _y2); + + }, + createTruck: function (game, x, y, type, map) { + var tk = null; + var bk = null; + var ft = null; + var j1 = null; + var j2 = null; + switch (type) { + case 1: + bk = new Jelly(game, "Wheel", x - 30, y, map, "Wheel1", 0.5, 0.5, -1); + ft = new Jelly(game, "Wheel", x + 30, y, map, "Wheel1", 0.5, 0.5, -1); + tk = new Jelly(game, "Truck1", x, y, map, "Truck1", 0.5, 0.5, -1); + this.xs = Math.cos(90 * Math.PI / 180); + this.ys = Math.sin(90 * Math.PI / 180); + this.xs = (this.xs * 1000) / 1000; + this.ys = (this.ys * 1000) / 1000; + j1 = game.physics.box2d.revoluteJoint(tk.getBox(), ft.getBox(), 30, ft.getLocal().y, 0, 0); + j1.collideConnected = false; + j2 = game.physics.box2d.revoluteJoint(tk.getBox(), bk.getBox(), -30, bk.getLocal().y, 0, 0); + j2.collideConnected = false; + + break; + case 2: + case 4: + tk = new Jelly(game, "Truck2", x, y, map, "Truck2", 0.5, 0.72, -1); + bk = new Jelly(game, "Wheel", x - 30, y, map, "Wheel2", 0.5, 0.5, -1); + ft = new Jelly(game, "Wheel", x + 30, y, map, "Wheel1", 0.5, 0.5, -1); + this.xs = Math.cos(90 * Math.PI / 180); + this.ys = Math.sin(90 * Math.PI / 180); + this.xs = (this.xs * 1000) / 1000; + this.ys = (this.ys * 1000) / 1000; + j1 = game.physics.box2d.revoluteJoint(tk.getBox(), ft.getBox(), 28, ft.getLocal().y, 0, 0); + j1.collideConnected = false; + j2 = game.physics.box2d.revoluteJoint(tk.getBox(), bk.getBox(), -38, bk.getLocal().y - 2, 0, 0); + j2.collideConnected = false; + + break; + case 3: + case 5: + tk = new Jelly(game, "Truck3", x, y, map, "Truck3", 0.5, 0.6, -1); + bk = new Jelly(game, "Wheel", x - 45, y, map, "Wheel3", 0.5, 0.5, -1); + ft = new Jelly(game, "Wheel", x + 45, y, map, "Wheel3", 0.5, 0.5, -1); + this.xs = Math.cos(90 * Math.PI / 180); + this.ys = Math.sin(90 * Math.PI / 180); + this.xs = (this.xs * 1000) / 1000; + this.ys = (this.ys * 1000) / 1000; + j1 = game.physics.box2d.revoluteJoint(tk.getBox(), ft.getBox(), 45, ft.getLocal().y, 0, 0); + j1.collideConnected = false; + j2 = game.physics.box2d.revoluteJoint(tk.getBox(), bk.getBox(), -45, bk.getLocal().y, 0, 0); + j2.collideConnected = false; + + break; + + } + return { + truck: tk, + back: bk, + front: ft, + joint1: j1, + joint2: j2 + }; + }, + +}; \ No newline at end of file diff --git a/jellytruck/js/lego.json b/jellytruck/js/lego.json new file mode 100644 index 0000000000000000000000000000000000000000..cfc376c8d4d3866d1c207a532696ab267d9a6134 --- /dev/null +++ b/jellytruck/js/lego.json @@ -0,0 +1,173 @@ +{ + + "mill1": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 185, 385 , 185, 185 , 205, 5 , 205, 385 ] + } , + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 5, 185 , 185, 185 , 185, 205 , 5, 205 ] + } , + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 205, 5 , 185, 185 , 185, 5 ] + } , + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 387, 185 , 387, 205 , 205, 205 , 205, 185 ] + } + ], + + "mill3": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 387, 81 , 387, 101 , 10, 101 , 10, 81 ] + } , + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 208, 9 , 208, 173 , 188, 173 , 188, 9 ] + } + ], + + "bridge2": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 318, 26 , 318, 45 , 20, 45 , 20, 26 ] + } + ], + + "Box1": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 46, 0 , 46, 55 , 0, 55 , 0, 0 ] + } + ], + + "Box2": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 46, 0 , 46, 46 , 0, 46 , 0, 0 ] + } + ], + + "bridge12": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 143, 2 , 143, 24 , 7, 24 , 7, 2 ] + } + ], + + "bolt12": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 13, 1 , 13, 13 , 1, 13 , 1, 1 ] + } + ], + + "bridge17": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 161, -1 , 161, 24 , 5, 24 , 5, -1 ] + } + ], + + "box17_long": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 158, 0 , 158, 24 , 0, 24 , 0, 0 ] + } + ], + + "box17_small": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 22, -1 , 22, 22 , -1, 22 , -1, -1 ] + } + ], + + "bar17": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 114, 0 , 114, 22 , 5, 22 , 5, 0 ] + } + ], + + "mill18_2": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 165, 341 , 165, 184 , 166, 164 , 185, 164 , 185, 341 ] + } , + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 343, 184 , 185, 184 , 185, 164 , 343, 164 ] + } , + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 6, 164 , 166, 164 , 165, 184 , 6, 184 ] + } , + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 166, 6 , 185, 6 , 185, 164 , 166, 164 ] + } + ], + "ver_bar": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 17, 0 , 17, 53 , 0, 53 , 0, 0 ] + } + ], + + "hor_bar": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 56, 0 , 56, 13 , 0, 13 , 0, 0 ] + } + ], + + "small_ver_bar": [ + + { + "density": 2, "friction": 0, "bounce": 0, + "filter": { "categoryBits": 1, "maskBits": 65535 }, + "shape": [ 23, 0 , 23, 26 , 0, 26 , 0, 0 ] + } + ] + +} + diff --git a/jellytruck/js/levels/level01.js b/jellytruck/js/levels/level01.js new file mode 100644 index 0000000000000000000000000000000000000000..8a9b382c2609bc9a237836ada8ab125e6725e2fe --- /dev/null +++ b/jellytruck/js/levels/level01.js @@ -0,0 +1,360 @@ +window.JellyTruck.state.level01 = { + preload: function () { + this.game.world.removeAll(); + + //background + this.bg; + this.light; + this.scene; + this.ground_art; + this.map = this.game.add.tilemap("level_1_map"); + this.phyBody = this.game.add.tilemap("map"); + + //camera + this.jellyCamera = { + cx: 0, + cy: 0, + focx: -1, + focy: -1, + focz: -1, + mode: 0, + zoom: 1, + width: 640, + height: 640, + levelZoom: 1, + scale: 0.8 + }; + + //player and flag + this.player; + this.flag; + + //objects + this.statBody; + this.scorePoint; + this.failPoint; + this.jellyObj; + + //Level win and fail + this.win; + this.restart; + this.level_Fail = null; + //score + this.timeTrail; + this.second; + this.score; + this.bonus; + this.score_txt; + this.spotLight; + this.contact_count; + this.truck_status; + + //Level Specific Objects + + }, + create: function () { + + //score,bonus and win + this.win = false; + this.restart = false; + this.second = 1000; + this.score = 0; + this.bonus = 0; + this.timeTrail = 0; + this.contact_count = 0; + this.truck_status = 0; + + //level data + this.game.mobLevel = "Level 1"; + this.game.levelNumber = "level01"; + this.game.nextlevelNumber = "level02"; + jt.current_level = 1; + + //init Game music and sound + this.game.sound.stopAll(); + if (jt.sfx) + jt.sfx.playMusic("oddbg"); + + + //setup sky background + this.bg = new GameBg(this.game); + + //setup level scene + this.scene = jt.setupScene(this.game, this.map, "scene_1", this.map.objects["Ground"][0].x - 70, this.map.objects["Ground"][0].y - 342, this.jellyCamera.width, this.jellyCamera.height); + + + // setup static object + this.statBody = jt.setupStaticObject(this.game, this.map, 50); + + //setup Fail + this.setupFail(); + + //setup Score + this.setupScore(); + + //setup Flag + this.setupFlag(); + + //setup player + this.player = jt.createTruck(this.game, this.scene.truck_x, this.scene.truck_y, this.scene.truck_type, this.phyBody); + + // setup jelly object + this.jellyObj = jt.setupJellyObj(this.game, this.map, this.phyBody); + + //set ground mask + this.ground_art = this.game.add.image(this.map.objects["Ground"][0].x - 70, this.map.objects["Ground"][0].y - 68, "ground_1"); + this.ground_art.autoCull = true; + this.ground_art.checkWorldBounds = true; + + //setup game menu + if (jt.game_menu != null) + jt.game_menu.killMenu(); + jt.game_menu = new GameMenu(this.game); + jt.game_menu.enable(); + + //setup keyboard + jt.initInput(this.game); + // if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { + // jt.gameController(this.game); + //} + + if (jt.sfx) + jt.sfx.playTruckSound("truck_start"); + + this.game.camera.follow(this.player.truck.getSprite()); + }, + // Level Pause and Resume + onGamePause: function () { + + }, + onGameResume: function () { + + }, + //Level Update and Render + updateCamera: function () { + this._plx = this.player.truck.getSprite().x; + this._ply = this.player.truck.getSprite().y; + this._vlc = Math.abs(this.player.truck.getBox().data.m_linearVelocity.x); + this.jellyCamera = jt.updateCamera(this.game, this.jellyCamera, this._plx, this._ply, this._vlc, this.win, this.restart, jt.pause); + }, + update: function () { + + // this.updateCamera(); + if (jt.sfx) + jt.sfx.loopMusic("oddbg"); + + if (!this.win && !this.restart && !jt.pause) { + this.timeTrail++; + if (this.timeTrail % 10 == 0) { + this.second--; + } + this.keyEvent(); + this.truckSound(); + + } else if (this.win) { + if (this.flag.joint) + this.game.physics.box2d.world.DestroyJoint(this.flag.joint); + + } else if (this.restart) { + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + } + if (this.restart && this.level_Fail && this.level_Fail.space.isDown) + this.level_Fail.restartBtnClicked(); + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + + // var rect = new Phaser.Rectangle( this.game.camera.bounds.x, this.game.camera.bounds.y, this.game.camera.bounds.width, this.game.camera.bounds.height ) ; + // this.game.debug.geom( rect, 'rgba(0,0,0,0.5)' ) ; + // this.game.debug.cameraInfo(this.game.camera, 500, 32); + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 1, true); + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + // End Score and Bonus + + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.game.camera.unfollow(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1"); + } + }, + // End Fail + + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + //// End Flag + + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + this.count = 0; + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin && !this.restart && this.game.math.distance(this.player.truck.getBox().x, this.player.truck.getBox().y, this.player.front.getBox().x, this.player.front.getBox().y) > 3.9 || + this.game.math.distance(this.player.truck.getBox().x, this.player.truck.getBox().y, this.player.back.getBox().x, this.player.back.getBox().y) > 3.9 + ) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1"); + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 70 && this.lift_sprite.alpha == 1) { + this.liftdown = this.game.add.tween(this.lift_sprite).to({ + alpha: 0 + }, 200, "Linear", true); + this.liftdown.onComplete.add(this.liftMoveDown, this); + } + }, + liftMoveUp: function () { + this.lift.joint.m_motorSpeed = 3; + this.lift.joint.m_maxMotorForce = 900; + this.lift.joint.m_enableMotor = true; + }, + liftMoveDown: function () { + this.lift.joint.m_motorSpeed = -5; + this.lift.joint.m_maxMotorForce = 900; + this.lift.joint.m_enableMotor = true; + }, + updateCrusher1: function () { + this.crusher1.time_trail++; + if (this.crusher1.time_trail == 1) { + + this.crusher1.joint.SetMotorSpeed(-50); + this.crusher1.joint.SetMaxMotorForce(1100); + this.crusher1.joint.EnableMotor(true); + } + if (this.crusher1.time_trail == 100) { + this.crusher1.joint.SetMotorSpeed (50); + this.crusher1.joint.SetMaxMotorForce(1100); + this.crusher1.joint.EnableMotor(true); + } + if (this.crusher1.time_trail == 200) + this.crusher1.time_trail = 0; + }, + updateCrusher2: function () { + this.crusher2.time_trail++; + if (this.crusher2.time_trail == 1) { + this.crusher2.joint.SetMotorSpeed (50); + this.crusher2.joint.SetMaxMotorForce (1100); + this.crusher2.joint.EnableMotor (true); + } + if (this.crusher2.time_trail == 100) { + this.crusher2.joint.SetMotorSpeed (-50); + this.crusher2.joint.SetMaxMotorForce (1100); + this.crusher2.joint.EnableMotor (true); + } + if (this.crusher2.time_trail == 200) + this.crusher2.time_trail = 0; + }, + setupExtras: function () { + this.downArrow = this.game.add.sprite(1500, 1296, "downArrow"); + this.anim = this.downArrow.animations.add('down'); + this.downArrow.animations.play('down', 30, true); + this._Arrowbody = new Phaser.Physics.Box2D.Body(this.game, null, 1506, 1194, 0); + this._Arrowbody.setRectangle(200, 300, 0, 0); + this._Arrowbody.setBodyContactCallback(this.lift.getBox(), this.arrowCollision, this); + }, + arrowCollision: function (body1, body2, fixture1, fixture2, begin) { + if (this.downArrow.alpha != 0) + this.downArrow.alpha -= 0.5; + }, + liftRender: function () { + this.lift_sprite.x = this.lift.getBox().x; + this.lift_sprite.y = this.lift.getBox().y; + this.lift_mask.clear(); + this.lift_mask.beginFill(0xffffff); + for (var j = 0; j < this.lift.getBodies().length; j++) { + if (j == 0) + this.lift_mask.moveTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + else + this.lift_mask.lineTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + this.lift_sprite.angle = this.lift.getBodies()[j].getBody().angle; + } + this.lift_sprite.mask = this.lift_mask; + } + +}; \ No newline at end of file diff --git a/jellytruck/js/levels/level03.js b/jellytruck/js/levels/level03.js new file mode 100644 index 0000000000000000000000000000000000000000..cfac7932d36ad59f847ff38e4599f4a948fa4427 --- /dev/null +++ b/jellytruck/js/levels/level03.js @@ -0,0 +1,565 @@ +window.JellyTruck.state.level03 = { + preload: function () { + this.game.world.removeAll(); + //background + this.bg; + this.light; + this.scene; + this.ground_art; + this.map = this.game.add.tilemap("level_3_map"); + this.phyBody = this.game.add.tilemap("map"); + + //camera + this.jellyCamera = { + cx: 0, + cy: 0, + focx: -1, + focy: -1, + focz: -1, + mode: 0, + zoom: 1, + width: 640, + height: 640, + levelZoom: 1, + scale: 0.8 + }; + + //player and flag + this.player; + this.player1; + this.flag; + + //objects + this.statBody; + this.scorePoint; + this.failPoint; + this.jellyObj; + this.camerFocus; + + //Level win + this.win; + this.restart; + this.level_Fail = null; + + //score + this.timeTrail; + this.second; + this.score; + this.bonus; + this.score_txt; + this.spotLight; + this.contact_count; + + //Level Specific Objects + this.mill; + this.mill_bolt; + this.switch; + this.switch_sprite; + this.switch_mask = this.game.add.graphics(0, 0); + this.bridge; + this.lock_body1; + this.lock_body2; + this.on = 0; + this.truck02_icon; + this.change = 1; + this.downArrow; + }, + create: function () { + //score,bonus and win + this.win = false; + this.restart = false; + this.second = 1000; + this.score = 0; + this.bonus = 0; + this.timeTrail = 0; + this.contact_count = 0; + + //level data + this.game.mobLevel = "Level 3"; + this.game.levelNumber = "level03"; + this.game.nextlevelNumber = "level04"; + jt.current_level = 3; + + //init Game music and sound + this.game.sound.stopAll(); + if (jt.sfx) + jt.sfx.playMusic("oddbg"); + if (jt.sfx) + jt.sfx.playMusic("truckidle"); + + //setup sky background + this.bg = new GameBg(this.game); + this.bg.setScale(1.5,1); + //setup level scene + this.scene = jt.setupScene(this.game, this.map, "scene_3", this.map.objects["Ground"][0].x - 148, this.map.objects["Ground"][0].y - 792, this.jellyCamera.width, this.jellyCamera.height); + + //setup joint ground + this.joint_ground = jt.setupJointGround(this.game, this.map); + + //setup Fail + this.setupFail(); + + // setup static object + this.statBody = jt.setupStaticObject(this.game, this.map, 50); + + //setup Score + this.setupScore(); + + //setup Flag + this.setupFlag(); + + //setup truck icon + this.truck02_icon = this.game.add.sprite(4778, 1482, 'truck2_icon'); + this.game.physics.box2d.enable(this.truck02_icon); + this.truck02_icon.body.addRectangle(40, 40, 0, 40); + this.truck02_icon.body.setCollisionCategory(OTHER_CATEGORYBITS); + this.truck02_icon.body.setCollisionMask(OTHER_MASKBITS); + this.truck02_icon.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.transformCollision, this); + // this.truck02_icon.body.setCategoryContactCallback(WHEEL_CATEGORYBITS,this.transformCollision,this); + this.truck02_icon.body.static = true; + // setup other level images + this.setupExtras(); + + //setup player + this.player = jt.createTruck(this.game, this.scene.truck_x, this.scene.truck_y, this.scene.truck_type, this.phyBody); + this.player1 = jt.createTruck(this.game, 4700, 1500, 2, this.phyBody); + this.player1.truck.disable(); + this.player1.back.disable(); + this.player1.front.disable(); + + // setup jelly object + this.jellyObj = jt.setupJellyObj(this.game, this.map, this.phyBody); + + //setup Camer Object + this.setupCamera(); + + //set ground mask + this.ground_art = this.game.add.image(this.map.objects["Ground"][0].x - 148, this.map.objects["Ground"][0].y - 792, 'ground_3'); + this.ground_art.autoCull = true; + this.ground_art.checkWorldBounds = true; + + //setup game menu + if (jt.game_menu != null) + jt.game_menu.killMenu(); + jt.game_menu = new GameMenu(this.game); + jt.game_menu.enable(); + + //setup keyboard + jt.initInput(this.game); + // if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)){ + // jt.gameController(this.game); + // } + + //Level Specific object + this.mill = this.jellyObj[4]; + this.mill.enableRevolute(this.joint_ground, 150, 5000, true, -0, 90, false); + this.mill_bolt = this.game.add.sprite(this.mill.getBox().x, this.mill.getBox().y, 'mill_bolt'); + this.mill_bolt.anchor.set(0.5); + this.mill_bolt.scale.set(0.28); + + this.jellyObj[5].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + this.jellyObj[6].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + this.jellyObj[7].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + this.jellyObj[8].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + this.jellyObj[9].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + this.jellyObj[12].getBox().static = true; + + /*this.obj2 = this.jellyObj[11]; + this.obj3 = this.jellyObj[12];*/ + + this.switch = this.jellyObj[13]; + this.switch_sprite = this.game.add.sprite(this.switch.getBox().x, this.switch.getBox().y, "lift_mask"); + this.switch_sprite.anchor.set(0.5, 0.5); + this.switch_sprite.alpha = 0; + this.switch.getBox().setBodyContactCallback(this.player.truck.getBox(), this.bridgeCollision, this); + + this.bridge = this.jellyObj[14]; + this.bridge.getSprite().scale.set(1.5, 1.5); + this.bridge.enableRevolute(this.joint_ground, 0, 0, false, 0, 0, true); //+(Math.PI / 2) - .06,true); + + this.lock_body1 = new Phaser.Physics.Box2D.Body(this.game, null, 3949, 1633); + this.lock_body1.setRectangle(192, 128, 0, 0); + this.lock_body1.static = true; + this.lock_body1.setCollisionCategory(WHEEL_CATEGORYBITS); + this.lock_body1.setCollisionMask(WHEEL_MASKBITS); + this.lock_body1.setCategoryContactCallback(PLATFORM_CATEGORYBITS, this.unlockCollision, this); + + this.lock_body2 = new Phaser.Physics.Box2D.Body(this.game, null, 4471, 1173); + this.lock_body2.setRectangle(118, 368, 0, 0); + this.lock_body2.static = true; + this.lock_body2.setCollisionCategory(WHEEL_CATEGORYBITS); + this.lock_body2.setCollisionMask(WHEEL_MASKBITS); + this.lock_body2.setCategoryContactCallback(PLATFORM_CATEGORYBITS, this.lockCollision, this); + if (jt.sfx) + jt.sfx.playTruckSound("truck_start"); + + this.game.camera.follow(this.player.truck.getSprite()); + + }, + // Level Pause and Resume + onGamePause: function () { + + }, + onGameResume: function () { + + }, + //Level Update and Render + updateCamera: function () { + this._plx = this.player.truck.getSprite().x; + this._ply = this.player.truck.getSprite().y; + this._vlc = Math.abs(this.player.truck.getBox().data.m_linearVelocity.x); + this.jellyCamera = jt.updateCamera(this.game, this.jellyCamera, this._plx, this._ply, this._vlc, this.win, this.restart, jt.pause); + }, + update: function () { + // this.updateCamera(); + if (jt.sfx) + jt.sfx.loopMusic("oddbg"); + if (!this.win && !this.restart && !jt.pause) { + this.timeTrail++; + if (this.timeTrail % 12 == 0) { + this.second--; + } + if (jt.dist(this.player.truck.getBox().x, this.player.truck.getBox().y, this.jellyObj[12].getBox().x, this.jellyObj[12].getBox().y) < 500) + this.jellyObj[12].getBox().static = false; + + this.keyEvent(); + this.truckSound(); + } else if (this.win) { + if (this.flag.joint) + this.game.physics.box2d.world.DestroyJoint(this.flag.joint); + + } else if (this.restart) { + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + } + if (this.restart && this.level_Fail && this.level_Fail.space.isDown) + this.level_Fail.restartBtnClicked(); + + if(this.change == 2){ + + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + this.player.back.disable(); + this.player.front.disable(); + this.player.truck.disable(); + // this.player.back.kill(); + //this.player.front.kill(); + //this.player.truck.kill(); + jt.sfx.playTruckSound("truck_change"); + this.player1.truck.enable(); + this.player1.back.enable(); + this.player1.front.enable(); + this.game.camera.follow(this.player1.truck.getSprite()); + this.change = 3; + } + + + this.updateBridge(); + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.switchRender(); + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + }, + renderPlayer: function () { + if(this.change === 1){ + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + } + else { + this.player1.truck.renderJelly(); + this.player1.front.renderJelly(); + this.player1.back.renderJelly(); + } + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + + if(this.change === 1){ + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 1, true); + } + else{ + jt.gameAction(this.game, this.player1.truck.getBox(), this.player1.front.getBox(), this.player1.back.getBox(), 5, true); + } + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Camera Object + setupCamera: function () { + this.camerFocus = jt.setupCameraObject(this.game, this.map); + for (var i = 0; i < this.camerFocus.length; i++) { + this.camerFocus[i].setBodyContactCallback(this.player.truck.getBox(), this.camerafocusCollision, this); + } + }, + camerafocusCollision: function (body1, body2, fixture1, fixture2, begin, end) { + if (begin) { + + this.jellyCamera.mode = 1; + this.jellyCamera.focx = body1.m_userData.focusX - 200; + this.jellyCamera.focy = body1.m_userData.focusY + this.jellyCamera.focz = body1.m_userData.zoom; + } else if (end) { + + this.jellyCamera.mode = 0; + this.jellyCamera.focx = -1; + this.jellyCamera.focy = -1; + this.jellyCamera.focz = -1; + } + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + //alert(this.second); + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 50) { + this.bridge.joint.m_lowerAngle = 90; + this.liftoff = this.game.add.tween(this.switch_sprite).to({ + alpha: 0 + }, 200, "Linear", true); + this.liftoff.onComplete.add(this.bridgeMoveDown, this); + + } + + }, + bridgeMoveUp: function () { + this.bridge.joint.m_lowerAngle = -90; + this.bridge.joint.m_motorSpeed = -0.3; + this.bridge.joint.m_maxMotorTorque = 1000; + this.bridge.joint.m_enableMotor = true; + }, + bridgeMoveDown: function () { + this.bridge.joint.m_lowerAngle = 90; + this.bridge.joint.m_motorSpeed = 0.3; + this.bridge.joint.m_maxMotorTorque = 1000; + this.bridge.joint.m_enableMotor = true; + + }, + switchRender: function () { + this.switch_sprite.x = this.switch.getBox().x; + this.switch_sprite.y = this.switch.getBox().y; + this.switch_mask.clear(); + this.switch_mask.beginFill(0xffffff); + for (var j = 0; j < this.switch.getBodies().length; j++) { + if (j == 0) + this.switch_mask.moveTo(this.switch.getBodies()[j].getBody().x, this.switch.getBodies()[j].getBody().y); + else + this.switch_mask.lineTo(this.switch.getBodies()[j].getBody().x, this.switch.getBodies()[j].getBody().y); + this.switch_sprite.angle = this.switch.getBodies()[j].getBody().angle; + } + this.switch_sprite.mask = this.switch_mask; + + }, + setupExtras: function () { + this.downArrow = this.game.add.sprite(3918, 1467, "downArrow"); + this.anim = this.downArrow.animations.add('down'); + this.downArrow.animations.play('down', 30, true); + }, + transformCollision: function (body1, body2, fixture1, fixture2, begin) { + + this.truck02_icon.destroy(); + body1.destroy(); + this.change = 2; + + }, + bridgeCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) + this.on = 1; + }, + lockCollision: function (body1, body2, fixture1, fixture2, begin) { + // if(begin) + this.bridge.joint.m_enableMotor = false; + }, + unlockCollision: function (body1, body2, fixture1, fixture2, begin) { + if (jt.dist(this.player.truck.getBox().x, this.player.truck.getBox().y, this.switch.getBox().x, this.switch.getBox().y) < 40) + this.bridge.joint.m_enableMotor = false; + else + this.bridge.joint.m_enableMotor = true; + } + +}; \ No newline at end of file diff --git a/jellytruck/js/levels/level04.js b/jellytruck/js/levels/level04.js new file mode 100644 index 0000000000000000000000000000000000000000..87a59bcca702d7497bb8b9af5cf697c70a1c37bf --- /dev/null +++ b/jellytruck/js/levels/level04.js @@ -0,0 +1,442 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +window.JellyTruck.state.level04 = { + preload: function () { + this.game.world.removeAll(); + //background + this.bg; + this.light; + this.scene; + this.ground_art; + this.map = this.game.add.tilemap("level_4_map"); + this.phyBody = this.game.add.tilemap("map"); + + //camera + this.jellyCamera = { + cx: 0, + cy: 0, + focx: -1, + focy: -1, + focz: -1, + mode: 0, + zoom: 1, + width: 640, + height: 640, + levelZoom: 1, + scale: 0.8 + }; + + //player and flag + this.player; + this.flag; + + //objects + this.statBody; + this.scorePoint; + this.failPoint; + this.jellyObj; + this.camerFocus; + + //Level win + this.win; + this.restart; + this.level_Fail = null; + + //score + this.timeTrail; + this.second; + this.score; + this.bonus; + this.score_txt; + this.spotLight; + this.contact_count; + + //Level Specific Objects + this.crusher1; + this.crusher2; + this.crusher3; + this.crusher; + this.mill1; + this.mill2; + + }, + create: function () { + //score,bonus and win + this.win = false; + this.restart = false; + this.second = 1000; + this.score = 0; + this.bonus = 0; + this.timeTrail = 0; + this.contact_count = 0; + + //level data + this.game.mobLevel = "Level 4"; + this.game.levelNumber = "level04"; + this.game.nextlevelNumber = "level05"; + jt.current_level = 4; + //this.game.forceSingleUpdate = false; + + //init Game music and sound + this.game.sound.stopAll(); + if (jt.sfx) + jt.sfx.playMusic("evenbg"); + + //setup sky background + this.bg = new GameBg(this.game); + + //setup level scene + this.scene = jt.setupScene(this.game, this.map, "scene_4", this.map.objects["Ground"][0].x - 10, this.map.objects["Ground"][0].y - 1118, this.jellyCamera.width, this.jellyCamera.height); + + //setup joint ground + this.joint_ground = jt.setupJointGround(this.game, this.map); + + //setup Fail + this.setupFail(); + + // setup static object + this.statBody = jt.setupStaticObject(this.game, this.map, 50); + + //setup Score + this.setupScore(); + + //setup Flag + this.setupFlag(); + + //setup player + this.player = jt.createTruck(this.game, this.scene.truck_x, this.scene.truck_y, this.scene.truck_type, this.phyBody); + + // setup jelly object + this.jellyObj = jt.setupJellyObj(this.game, this.map, this.phyBody); + + //setup Camer Object + this.setupCamera(); + + //setup Crusher + this.crusher = jt.setupCrusher(this.game, this.map, this.joint_ground); + + //set ground art + this.ground_art = this.game.add.image(this.map.objects["Ground"][0].x - 5, this.map.objects["Ground"][0].y - 1110, 'ground_4'); + this.ground_art.autoCull = true; + this.ground_art.checkWorldBounds = true; + + //setup game menu + if (jt.game_menu != null) + jt.game_menu.killMenu(); + jt.game_menu = new GameMenu(this.game); + jt.game_menu.enable(); + + //setup keyboard + jt.initInput(this.game); + // if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { + // jt.gameController(this.game); + // } + //Level Specfic Object + this.bridge1 = this.jellyObj[0]; + this.bridge1.getSprite().scale.set(1.5, 1.5); + this.bridge1.getBody(0).static = true; + this.bridge1.getBody(1).static = true; + this.bridge1.getBody(29).static = true; + this.bridge1.getBody(30).static = true; + this.bridge1.getBody(14).static = true; + this.bridge1.getBody(15).static = true; + this.bridge1.getBody(16).static = true; + + this.bridge2 = this.jellyObj[1]; + this.bridge2.getSprite().scale.set(1.5, 1.5); + this.bridge2.getBody(0).static = true; + this.bridge2.getBody(1).static = true; + this.bridge2.getBody(8).static = true; + this.bridge2.getBody(9).static = true; + this.bridge2.getBody(10).static = true; + this.bridge2.getBody(17).static = true; + this.bridge2.getBody(18).static = true; + this.bridge2.getBody(19).static = true; + + + this.bridge3 = this.jellyObj[2]; + this.bridge3.getSprite().scale.set(1.8, 1.8); + this.bridge3.getBody(0).static = true; + this.bridge3.getBody(1).static = true; + this.bridge3.getBody(29).static = true; + this.bridge3.getBody(30).static = true; + this.bridge3.getBody(14).static = true; + this.bridge3.getBody(15).static = true; + this.bridge3.getBody(16).static = true; + + this.jellyObj[3].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + this.jellyObj[4].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + this.jellyObj[5].enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1, true); + + this.jellyObj[6].getBox().static = true; + if (jt.sfx) + jt.sfx.playTruckSound("truck_start"); + + this.game.camera.follow(this.player.truck.getSprite()); + }, + // Level Pause and Resume + onGamePause: function () { + + }, + onGameResume: function () { + + }, + //Level Update and Render + updateCamera: function () { + this._plx = this.player.truck.getSprite().x; + this._ply = this.player.truck.getSprite().y; + this._vlc = Math.abs(this.player.truck.getBox().data.m_linearVelocity.x); + this.jellyCamera = jt.updateCamera(this.game, this.jellyCamera, this._plx, this._ply, this._vlc, this.win, this.restart, jt.pause); + }, + update: function () { + //this.updateCamera(); + if (jt.sfx) + jt.sfx.loopMusic("evenbg"); + if (!this.win && !this.restart && !jt.pause) { + this.timeTrail++; + if (this.timeTrail % 12 == 0) { + this.second--; + } + if (jt.dist(this.player.truck.getBox().x, this.player.truck.getBox().y, this.jellyObj[6].getBox().x, this.jellyObj[6].getBox().y) < 200) + this.jellyObj[6].getBox().static = false; + + this.keyEvent(); + this.truckSound(); + } else if (this.win) { + if (this.flag.joint) + this.game.physics.box2d.world.DestroyJoint(this.flag.joint); + + } else if (this.restart) { + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + } + if (this.restart && this.level_Fail && this.level_Fail.space.isDown) + this.level_Fail.restartBtnClicked(); + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause) { + jt.updateinput(); + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 1, true); + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Camera Object + setupCamera: function () { + this.camerFocus = jt.setupCameraObject(this.game, this.map); + for (var i = 0; i < this.camerFocus.length; i++) { + this.camerFocus[i].setBodyContactCallback(this.player.truck.getBox(), this.camerafocusCollision, this); + } + }, + camerafocusCollision: function (body1, body2, fixture1, fixture2, begin, end) { + if (begin) { + this.jellyCamera.mode = 1; + this.jellyCamera.focx = body1.m_userData.focusX - 200; + this.jellyCamera.focy = body1.m_userData.focusY + this.jellyCamera.focz= body1.m_userData.zoom; + } else if (end) { + this.jellyCamera.mode = 0; + this.jellyCamera.focx = -1; + this.jellyCamera.focy = -1; + this.jellyCamera.focz = -1; + } + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + //alert(this.second); + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + //this.game.forceSingleUpdate = true; + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + + //Camera Object + setupCamera: function () { + this.camerFocus = jt.setupCameraObject(this.game, this.map); + for (var i = 0; i < this.camerFocus.length; i++) { + this.camerFocus[i].setBodyContactCallback(this.player.truck.getBox(), this.camerafocusCollision, this); + } + }, + camerafocusCollision: function (body1, body2, fixture1, fixture2, begin, end) { + if (begin) { + this.jellyCamera.mode = 1; + this.jellyCamera.focx = body1.m_userData.focusX; + this.jellyCamera.focy = body1.m_userData.focusY + this.jellyCamera.focz = body1.m_userData.zoom; + } else if (end) { + this.jellyCamera.mode = 0; + this.jellyCamera.focx = -1; + this.jellyCamera.focy = -1; + this.jellyCamera.focz =-1; + } + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.game.camera.unfollow(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i= left && angle <= right; + } +}; \ No newline at end of file diff --git a/jellytruck/js/levels/level06.js b/jellytruck/js/levels/level06.js new file mode 100644 index 0000000000000000000000000000000000000000..bd7c55f1d9c4247a091d62f501c31faf9db226b1 --- /dev/null +++ b/jellytruck/js/levels/level06.js @@ -0,0 +1,417 @@ +window.JellyTruck.state.level06 = { + preload: function () { + this.game.world.removeAll(); + //background + this.bg; + this.light; + this.scene; + this.ground_art; + this.map = this.game.add.tilemap("level_6_map"); + this.phyBody = this.game.add.tilemap("map"); + + //camera + this.jellyCamera = { + cx: 0, + cy: 0, + focx: -1, + focy: -1, + focz: -1, + mode: 0, + zoom: 1, + width: 640, + height: 640, + levelZoom: 1, + scale: 0.8 + }; + + //player and flag + this.player; + this.flag; + + //objects + this.statBody; + this.scorePoint; + this.jellyObj; + + //Level win and fail + this.win; + this.restart; + + + //score + this.timeTrail; + this.second; + this.score; + this.bonus; + this.score_txt; + this.spotLight; + this.contact_count; + + //Level Specific Objects + this.cart; + this.rope; + this.cart_front; + this.cart_back; + this.graphics; + + + }, + create: function () { + //score,bonus and win + this.win = false; + this.restart = false; + this.second = 1000; + this.score = 0; + this.bonus = 0; + this.timeTrail = 0; + this.contact_count = 0; + + //level data + this.game.mobLevel = "Level 6"; + this.game.levelNumber = "level06"; + this.game.nextlevelNumber = "level07"; + jt.current_level = 6; + + //init Game music and sound + this.game.sound.stopAll(); + if (jt.sfx) + jt.sfx.playMusic("evenbg"); + + //setup sky background + this.bg = new GameBg(this.game); + + //setup level scene + this.scene = jt.setupScene(this.game, this.map, "scene_6", this.map.objects["Ground"][0].x - 12, this.map.objects["Ground"][0].y - 1158, this.jellyCamera.width, this.jellyCamera.height, 1000); + + // The ground 'scene.grounds' by default is implemented as a single body with chain fixture. + // With this the truck and the cart is sometimes sinking through the ground. + // So the ground has to be implemented using static bodies. + // The maskbit for the ground 'scene.grounds' is changed here from 46 to 40 to avoid stucking of truck with it. + // But 'scene.grounds' is not removed as it can be used to see if the jelly in the cart has fallen or not. + for (var i = 0; i < this.scene.grounds.length; i++) { + var _gb = this.scene.grounds[0]; + _gb.setCollisionMask(40); + } + this.createGroundBodies(this.game, this.map); + + //setup Score + this.setupScore(); + + //setup Flag + this.setupFlag(); + + this.graphics = this.game.add.graphics(0,0); + //setup player + this.rope = this.game.add.sprite(680, 2180, 'rope1'); + this.player = jt.createTruck(this.game, this.scene.truck_x, this.scene.truck_y, this.scene.truck_type, this.phyBody); + this.game.physics.box2d.enable(this.rope); + this.rope.body.setCollisionMask(0); + this.rope.visible = false; + + //setup level objects + this.cart_front = new Jelly(this.game, "Wheel", 615 + 30, 2216, this.phyBody, "CartWheel", 0.5, 0.5, -10); + this.cart_back = new Jelly(this.game, "Wheel", 615 - 30, 2216, this.phyBody, "CartWheel", 0.5, 0.5, -10); + + //setup Jelly object + this.jellyObj = jt.setupJellyObj(this.game, this.map, this.phyBody); + this.jellyObj[0].collisionFilter(OTHER_CATEGORYBITS, OTHER_MASKBITS); + this.jellyObj[0].collisionJelly(OTHER_CATEGORYBITS, this.cubeComeOutCallback, this); + + //set ground art + this.ground_art = this.game.add.image(this.map.objects["Ground"][0].x - 12, this.map.objects["Ground"][0].y - 1017.5, "ground_6"); + this.ground_art.autoCull = true; + this.ground_art.checkWorldBounds = true; + + //setup game menu + if (jt.game_menu != null) + jt.game_menu.killMenu(); + jt.game_menu = new GameMenu(this.game); + jt.game_menu.enable(); + + //setup keyboard + jt.initInput(this.game); + // if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { + // jt.gameController(this.game); + // } + + // Level Specfic object + this.cart = this.jellyObj[1]; + this.cj1 = this.game.physics.box2d.revoluteJoint(this.cart.getBox(), this.cart_front.getBox(), 30, this.cart_front.getLocal().y, 0, 0); + this.cj1.collideConnected = false; + this.cj2 = this.game.physics.box2d.revoluteJoint(this.cart.getBox(), this.cart_back.getBox(), -30, this.cart_back.getLocal().y, 0, 0); + this.cj2.collideConnected = false; + + this.jBodyA = this.cart.getBody(6); + this.la = new box2d.b2Vec2(); + + this.rope.body.toLocalPoint(this.la, new box2d.b2Vec2()); + this.game.physics.box2d.revoluteJoint(this.jBodyA, this.rope.body, -15, 10, -this.rope.width / 2); + + this.jBodyB = this.player.truck.getBody(7); + this.game.physics.box2d.revoluteJoint(this.jBodyB, this.rope.body, 5, 10, this.rope.width / 2); + this.game.physics.box2d.distanceJoint(this.player.truck.getBody(7), this.cart.getBody(5), 20, 0, 35); + this.game.physics.box2d.ropeJoint(this.player.truck.getBody(7), this.cart.getBody(7), 60, 5, 10, -15, 10); + + this.game.camera.follow(this.player.truck.getSprite()); + + }, + cubeComeOutCallback: function (body1, body2, fixture1, fixture2, begin) { + if (begin && !this.win && !this.restart) { + this.scene.grounds.forEach((function (element) { + if (element == body2) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + return; + } + }).bind(this)); + } + }, + // Level Pause and Resume + onGamePause: function () { + + }, + onGameResume: function () { + + }, + //Level Update and Render + updateCamera: function () { + this._plx = this.player.truck.getSprite().x; + this._ply = this.player.truck.getSprite().y; + this._vlc = Math.abs(this.player.truck.getBox().data.m_linearVelocity.x); + this.jellyCamera = jt.updateCamera(this.game, this.jellyCamera, this._plx, this._ply, this._vlc, this.win, this.restart, jt.pause); + }, + update: function () { + // this.updateCamera(); + if (jt.sfx) + jt.sfx.loopMusic("evenbg"); + if (!this.win && !this.restart && !jt.pause) { + this.timeTrail++; + if (this.timeTrail % 10 == 0) { + this.second--; + } + this.keyEvent(); + this.truckSound(); + } else if (this.win) { + if (this.flag.joint) + this.game.physics.box2d.world.DestroyJoint(this.flag.joint); + + } else if (this.restart) { + //this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + //this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + } + + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.cart_front.renderJelly(); + this.cart_back.renderJelly(); + + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + + // Rendering rope + this.graphics.clear(); + this.graphics.lineStyle(4, 0x333333, 2); + this.graphics.moveTo(this.jellyObj[1].getBody(6).x-5, this.jellyObj[1].getBody(6).y); + this.graphics.lineTo(this.player.truck.getBody(7).x+10, this.player.truck.getBody(7).y+15); + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 2, true); + + if((jt.up && !jt.right && !jt.left)||(jt.mobileup && !jt.mobileright && !jt.mobileleft)){ + this.game.physics.box2d.getBody(this.player.truck.getBox()).ApplyTorque(180 * 2); + } + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Camera Object + setupCamera: function () { + this.camerFocus = jt.setupCameraObject(this.game, this.map); + for (var i = 0; i < this.camerFocus.length; i++) { + this.camerFocus[i].setBodyContactCallback(this.player.truck.getBox(), this.camerafocusCollision, this); + } + }, + camerafocusCollision: function (body1, body2, fixture1, fixture2, begin, end) { + if (begin) { + this.jellyCamera.mode = 1; + this.jellyCamera.focx = body1.m_userData.focusX - 200; + this.jellyCamera.focy = body1.m_userData.focusY + this.jellyCamera.focz = body1.m_userData.zoom; + } else if (end) { + this.jellyCamera.mode = 0; + this.jellyCamera.focx = -1; + this.jellyCamera.focy = -1; + this.jellyCamera.focz = -1; + } + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + //alert(this.second); + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin, end) { + var isBladeClossing = this.bladeup.joint.m_motorSpeed > 0; + if (begin && isBladeClossing) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1"); + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 70 && this.pusher_sprite.alpha == 1) { + this.pushdown = this.game.add.tween(this.pusher_sprite).to({ + alpha: 0 + }, 500, "Linear", true); + this.pushdown.onComplete.add(this.pusherMoveDown, this); + } + }, + pusherMoveUp: function () { + this.pusher.joint.m_motorSpeed = 600; + this.pusher.joint.m_maxMotorForce = 5000; + this.pusher.joint.m_enableMotor = true; + }, + pusherMoveDown: function () { + this.pusher.joint.m_motorSpeed = 10; + this.pusher.joint.m_maxMotorForce = 100; + this.pusher.joint.m_enableMotor = true; + }, + pusherRender: function () { + this.pusher_sprite.x = this.pusher.getBox().x; + this.pusher_sprite.y = this.pusher.getBox().y; + this.pusher_mask.clear(); + this.pusher_mask.beginFill(0xffffff); + for (var j = 0; j < this.pusher.getBodies().length; j++) { + if (j == 0) + this.pusher_mask.moveTo(this.pusher.getBodies()[j].getBody().x, this.pusher.getBodies()[j].getBody().y); + else + this.pusher_mask.lineTo(this.pusher.getBodies()[j].getBody().x, this.pusher.getBodies()[j].getBody().y); + this.pusher_sprite.angle = this.pusher.getBodies()[j].getBody().angle; + } + this.pusher_sprite.mask = this.pusher_mask; + } +}; \ No newline at end of file diff --git a/jellytruck/js/levels/level08.js b/jellytruck/js/levels/level08.js new file mode 100644 index 0000000000000000000000000000000000000000..dccb638522543f5b0695e86089221ee2abbf1031 --- /dev/null +++ b/jellytruck/js/levels/level08.js @@ -0,0 +1,612 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +window.JellyTruck.state.level08 = { + preload: function () { + //background + this.bg; + this.light; + this.scene; + this.ground_art; + this.map = this.game.add.tilemap("level_8_map"); + this.phyBody = this.game.add.tilemap("map"); + + //camera + this.jellyCamera = { + cx: 0, + cy: 0, + focx: -1, + focy: -1, + focz: -1, + mode: 0, + zoom: 1, + width: 640, + height: 640, + levelZoom: 1, + scale: 0.5 + }; + //player and flag + this.player; + this.flag; + + //objects + this.statBody; + this.scorePoint; + this.failPoint; + this.jellyObj; + this.camerFocus; + + //Level win + this.win; + this.restart; + this.space; + this.level_Fail + + //score + this.timeTrail; + this.second; + this.score; + this.bonus; + this.score_txt; + this.spotLight; + this.contact_count; + + // Level specific + this.lift; + this.lift_sprite; + this.lift_mask = this.game.add.graphics(0, 0); + + this.player2; + this.player3; + + this.door3; + this.door2; + + this.truckIcon2; + this.truckIcon2Tween; + this.truckIcon3; + this.truckIcon3Tween; + + this.hitBodyPlayer2; + this.hitBodyPlayer3; + }, + create: function () { + //score,bonus and win + this.win = false; + this.restart = false; + this.second = 1000; + this.score = 0; + this.bonus = 0; + this.timeTrail = 0; + this.contact_count = 0; + + //level data + this.game.mobLevel = "Level 8"; + this.game.levelNumber = "level08"; + this.game.nextlevelNumber = "level09"; + jt.current_level = 8; + + //init Game music and sound + this.game.sound.stopAll(); + + if (jt.sfx) + jt.sfx.playMusic("evenbg"); + + //setup sky background + this.bg = new GameBg(this.game); + this.bg.setScale(2,1); + + //setup level scene + this.scene = jt.setupScene(this.game, this.map, "scene_8", this.map.objects["Ground"][0].x, this.map.objects["Ground"][0].y, this.jellyCamera.width, this.jellyCamera.height, 15000); + + //setup joint ground + this.joint_ground = jt.setupJointGround(this.game, this.map); + + //setup Fail + this.setupFail(); + + // setup static object + this.statBody = jt.setupStaticObject(this.game, this.map, 1000); + + //setup Score + this.setupScore(); + + //setup Flag + this.setupFlag(); + + //setup player + this.player = this.player1 = jt.createTruck(this.game, this.scene.truck_x, this.scene.truck_y, this.scene.truck_type, this.phyBody); + + this.player2 = jt.createTruck(this.game, 2786, 1162, 2, this.phyBody); + this.player2.truck.disable(); + this.player2.back.disable(); + this.player2.front.disable(); + + this.player3 = jt.createTruck(this.game, 2426, 1162, 3, this.phyBody); // make 2 to 3 + this.player3.truck.disable(); + this.player3.back.disable(); + this.player3.front.disable(); + + //setup Camera Object + this.setupCamera(); + + // setup jelly object + this.jellyObj = jt.setupJellyObj(this.game, this.map, this.phyBody); + this.linkAllBall4(); + + //setup game menu + if (jt.game_menu != null) + jt.game_menu.killMenu(); + jt.game_menu = new GameMenu(this.game); + jt.game_menu.enable(); + + //setup keyboard + jt.initInput(this.game); + // if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { + // jt.gameController(this.game); + // } + + // Adding Lift + this.lift = this.jellyObj[6]; + this.lift_sprite = this.game.add.sprite(this.lift.getBox().x, this.lift.getBox().y, "lift_mask"); + this.lift_sprite.anchor.set(0.5, 0.5); + this.lift_sprite.alpha = 0; + this.lift.enablePrimatic(this.joint_ground, 0, this.game.physics.box2d.mpx(18.5), -0.07, -1); + + this.door3 = this.game.add.sprite(3202.67, 1491.25, "level_8_door_1"); + this.door3.scale.setTo(0.5, 0.5); + this.game.physics.box2d.enable(this.door3); + this.door3.body.setRectangle(this.door3.width / 2, this.door3.height, -this.door3.width / 4, 0, 0); + this.door3.body.static = true; + this.door3.body.setCollisionCategory(TRUCK_CATEGORYBITS); + + this.door2 = this.game.add.sprite(3260.17, 1491.25, "level_8_door_2"); + this.door2.scale.setTo(0.5, 0.5); + this.game.physics.box2d.enable(this.door2); + this.door2.body.setRectangle(this.door2.width / 2, this.door2.height, -this.door2.width / 4, 0, 0); + this.door2.body.static = true; + this.door2.body.setCollisionCategory(TRUCK_CATEGORYBITS); + + this.door3.body.y += this.door3.height / 2; + this.door2.body.y += this.door2.height / 2; + + this.truckIcon2 = this.game.add.image(2806.00, 1179.33, "truck2_icon"); + this.truckIcon2.anchor.setTo(0.5, 0.5); + this.truckIcon3 = this.game.add.image(2445.33, 1179.33, "truck3_icon"); + this.truckIcon3.anchor.setTo(0.5, 0.5); + this.truckIcon2Tween = this.game.add.tween(this.truckIcon2).to({ + scaleX: 1.3, + scaleY: 1.3 + }, 1200, "Linear", true, 0, -1); + this.truckIcon2Tween.yoyo(true, 0); + + this.truckIcon3Tween = this.game.add.tween(this.truckIcon3).to({ + scaleX: 1.3, + scaleY: 1.3 + }, 1200, "Linear", true, 0, -1); + this.truckIcon3Tween.yoyo(true, 0); + + this.hitBodyPlayer2 = this.scorePoint[1]; + this.hitBodyPlayer3 = this.scorePoint[0]; + + if (jt.sfx) + jt.sfx.playMusic("truck_start"); + }, + // Level Pause and Resume + onGamePause: function () { + + }, + onGameResume: function () { + + }, + //Level Update and Render + update: function () { + this.updateCamera(); + if (jt.sfx) + jt.sfx.loopMusic("evenbg"); + if (!this.win && !this.restart && !jt.pause) { + this.timeTrail++; + if (this.timeTrail % 12 == 0) { + this.second--; + } + this.keyEvent(); + this.truckSound(); + } else if (this.win) { + if (this.flag.joint) + this.game.physics.box2d.world.DestroyJoint(this.flag.joint); + } else if (this.restart) { + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + } + if (this.restart && this.level_Fail && this.level_Fail.space.isDown) + this.level_Fail.restartBtnClicked(); + this.updateLift(); + }, + linkAllBall4: function () { + // var groundBodies = this.joint_ground; + /* this.jellyObj.forEach((function (element) { + if (element.getSprite().key === "gum_5") { // Ball4 has texture 'gum_5' + // element.enableRevolute(this.joint_ground, 0, 0, false, -0.1, 0.1,false); + this.game.physics.box2d.distanceJoint(this.joint_ground, element.getBox()); + + } + }.bind(this)));*/ + var groundBodies = []; + var joints = []; + this.jellyObj.forEach((function (element) { + if (element.getSprite().key === "gum_5") { // Ball4 has texture 'gum_5' + var _groundBody = new Phaser.Physics.Box2D.Body(this.game, null, element.getBox().x, element.getBox().y, 0); + _groundBody.setRectangle(10, 10); + _groundBody.static = true; + groundBodies.push(_groundBody); + + var joint = this.game.physics.box2d.distanceJoint(_groundBody, element.getBox(), 0, 0, 0, 0, 0.0001, 5, 2); + joints.push(joint); + } + }.bind(this))); + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.liftRender(); + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + liftRender: function () { + this.lift_sprite.x = this.lift.getBox().x; + this.lift_sprite.y = this.lift.getBox().y; + this.lift_mask.clear(); + this.lift_mask.beginFill(0xffffff); + for (var j = 0; j < this.lift.getBodies().length; j++) { + if (j == 0) + this.lift_mask.moveTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + else + this.lift_mask.lineTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + this.lift_sprite.angle = this.lift.getBodies()[j].getBody().angle; + } + this.lift_sprite.mask = this.lift_mask; + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + switch (this.player) { + case this.player1: + jt.gameAction(this.game, this.player1.truck.getBox(), this.player1.front.getBox(), this.player1.back.getBox(), 1, true); + break; + case this.player2: + jt.gameAction(this.game, this.player2.truck.getBox(), this.player2.front.getBox(), this.player2.back.getBox(), 2, true); + break; + case this.player3: + var boxRotation = Math.abs(Phaser.Math.radToDeg(this.player.truck.getBox().rotation)) % 360; + // If the truck is tilted then do not move forward and backward + if (boxRotation > 170 && boxRotation < 210) + jt.up = jt.mobileup = jt.down = jt.mobiledown = false; + jt.gameAction(this.game, this.player3.truck.getBox(), this.player3.front.getBox(), this.player3.back.getBox(), 7, true); + break; + } + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + updateCamera: function () { + this._plx = this.player.truck.getSprite().x; + this._ply = this.player.truck.getSprite().y; + this._vlc = Math.abs(this.player.truck.getBox().data.m_linearVelocity.x); + this.jellyCamera = jt.updateCamera(this.game, this.jellyCamera, this._plx, this._ply, this._vlc, this.win, this.restart, jt.pause); + }, + setupCamera: function () { + this.camerFocus = jt.setupCameraObject(this.game, this.map); + for (var i = 0; i < this.camerFocus.length; i++) { + this.camerFocus[i].setBodyContactCallback(this.player1.truck.getBox(), this.camerafocusCollision, this); + this.camerFocus[i].setBodyContactCallback(this.player2.truck.getBox(), this.camerafocusCollision, this); + this.camerFocus[i].setBodyContactCallback(this.player3.truck.getBox(), this.camerafocusCollision, this); + } + }, + camerafocusCollision: function (body1, body2, fixture1, fixture2, begin, end) { + if (begin) { + this.jellyCamera.mode = 1; + this.jellyCamera.focx = body1.m_userData.focusX - 200; + this.jellyCamera.focy = body1.m_userData.focusY + this.jellyCamera.focz = body1.m_userData.zoom; + } else if (end) { + this.jellyCamera.mode = 0; + this.jellyCamera.focx = -1; + this.jellyCamera.focy = -1; + this.jellyCamera.focz = -1; + } + }, + updateLift: function () { + if (jt.dist(this.lift.getBox().x, this.lift.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) < 75 && this.lift_sprite.alpha == 0) { + this.liftup = this.game.add.tween(this.lift_sprite).to({ + alpha: 1 + }, 1500, "Linear", true); + this.liftup.onComplete.add(this.liftMoveUp, this); + } else if (jt.dist(this.lift.getBox().x, this.lift.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) > 90 && this.lift_sprite.alpha == 1) { + this.liftdown = this.game.add.tween(this.lift_sprite).to({ + alpha: 0 + }, 500, "Linear", true); + this.liftdown.onComplete.add(this.liftMoveDown, this); + } + }, + liftMoveUp: function () { + this.lift.joint.m_motorSpeed = 3.5; + this.lift.joint.m_maxMotorForce = 1500; + this.lift.joint.m_enableMotor = true; + }, + liftMoveDown: function () { + this.lift.joint.m_motorSpeed = -5; + this.lift.joint.m_maxMotorForce = 1100; + this.lift.joint.m_enableMotor = true; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + this.contact_count++; + if (this.player != this.player3 && body1 == this.hitBodyPlayer3) { // Sports car + this.hitBodyPlayer3 = null; // Makes sure that it happens only once. + this.contact_count = 1; // As the player willbe switched, there wont be a call with 'begin' = false hence overriding the value + this.game.time.events.add(Phaser.Timer.SECOND * this.game.physics.box2d.frameRate, function () { + this.truckIcon3Tween.stop(); + this.truckIcon3.visible = false; + this.switchToPlayer3(); + this.openDoor3(); + }, this); + } else if (this.player != this.player2 && body1 == this.hitBodyPlayer2) { // Big Truck + this.hitBodyPlayer2 = null; // Makes sure that it happens only once. + this.contact_count = 1; // As the player willbe switched, there wont be a call with 'begin' = false hence overriding the value + this.game.time.events.add(Phaser.Timer.SECOND * this.game.physics.box2d.frameRate, function () { + this.truckIcon2Tween.stop(); + this.truckIcon2.visible = false; + this.switchToPlayer2(); + this.openDoor2(); + }, this); + } + body1.destroy(); + } else { + this.contact_count = 0; + } + + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + switchToPlayer2: function () { + console.log("To 2"); + + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + + this.player.truck.getBox().setCollisionCategory(0); + this.player.front.getBox().setCollisionCategory(0); + this.player.back.getBox().setCollisionCategory(0); + this.player.back.disable(); + this.player.front.disable(); + this.player.truck.disable(); + + this.player.back.kill(); + this.player.front.kill(); + this.player.truck.kill(); + + this.player = this.player2; + + this.player.truck.enable(); + this.player.back.enable(); + this.player.front.enable(); + + if (jt.sfx) + jt.sfx.playTruckSound("truck_change"); + }, + switchToPlayer3: function () { + console.log("To 3"); + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + + this.player.truck.getBox().setCollisionCategory(0); + this.player.front.getBox().setCollisionCategory(0); + this.player.back.getBox().setCollisionCategory(0); + this.player.back.disable(); + this.player.front.disable(); + this.player.truck.disable(); + + this.player.back.kill(); + this.player.front.kill(); + this.player.truck.kill(); + + this.player = this.player3; + + this.player.truck.enable(); + this.player.back.enable(); + this.player.front.enable(); + + if (jt.sfx) + jt.sfx.playTruckSound("truck_change"); + }, + openDoor3: function () { + this.door3.body.destroy(); + this.door3.x = 3125.67; + this.door3.y = 1523.25; + this.door3.angle = 80; + }, + openDoor2: function () { + this.door2.body.destroy(); + this.door2.x = 3315.17; + this.door2.y = 1501.25; + this.door2.angle = -80; + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + //this.ground_art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + /*setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + },*/ + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 85 && this.lift_sprite.alpha == 1) { + this.liftdown = this.game.add.tween(this.lift_sprite).to({ + alpha: 0 + }, 200, "Linear", true); + this.liftdown.onComplete.add(this.liftMoveDown, this); + } + }, + liftMoveUp: function () { + this.lift.joint.m_motorSpeed = 5; + this.lift.joint.m_maxMotorForce = 900; + this.lift.joint.m_enableMotor = true; + }, + liftMoveDown: function () { + this.lift.joint.m_motorSpeed = -5; + this.lift.joint.m_maxMotorForce = 900; + this.lift.joint.m_enableMotor = true; + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.renderPlayer(); + this.renderLift(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + }, + renderLift: function () { + this.lift_sprite.x = this.lift.getBox().x; + this.lift_sprite.y = this.lift.getBox().y; + this.lift_mask.clear(); + this.lift_mask.beginFill(0xffffff); + for (var j = 0; j < this.lift.getBodies().length; j++) { + if (j == 0) + this.lift_mask.moveTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + else + this.lift_mask.lineTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + this.lift_sprite.angle = this.lift.getBodies()[j].getBody().angle; + } + this.lift_sprite.mask = this.lift_mask; + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 1, true); + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + + // Disable the roof after the first hammer hit. + if (body1 == this.scorePoint[0]) { + this.statBody[6].sensor = true; + } + + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.game.camera.unfollow(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + }, + // ShutDown + shutdown: function () { + this.game.physics.box2d.velocityIterations = 8.5; + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + //this.ground_art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + /*setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + },*/ + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(32, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(32, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(32, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.game.camera.unfollow(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + //alert(this.second); + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.game.camera.unfollow(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1") + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 85 && this.lift_sprite.alpha == 1) { + this.liftdown = this.game.add.tween(this.lift_sprite).to({ + alpha: 0 + }, 200, "Linear", true); + this.liftdown.onComplete.add(this.liftMoveDown, this); + } + + if (jt.dist(this.liftL.getBox().x, this.liftL.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) < 120 && this.liftL_sprite.alpha == 0) { + this.liftLup = this.game.add.tween(this.liftL_sprite).to({ + alpha: 1 + }, 750, "Linear", true); + this.liftLup.onComplete.add(this.liftLMoveUp, this); + } else if (jt.dist(this.liftL.getBox().x, this.liftL.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) > 136 && this.liftL_sprite.alpha == 1) { + this.liftLdown = this.game.add.tween(this.liftL_sprite).to({ + alpha: 0 + }, 250, "Linear", true); + this.liftLdown.onComplete.add(this.liftLMoveDown, this); + } + + if (jt.dist(this.liftR.getBox().x, this.liftR.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) < 120 && this.liftR_sprite.alpha == 0) { + this.liftRup = this.game.add.tween(this.liftR_sprite).to({ + alpha: 1 + }, 750, "Linear", true); + this.liftRup.onComplete.add(this.liftRMoveUp, this); + } else if (jt.dist(this.liftR.getBox().x, this.liftR.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) > 136 && this.liftR_sprite.alpha == 1) { + this.liftRdown = this.game.add.tween(this.liftR_sprite).to({ + alpha: 0 + }, 250, "Linear", true); + this.liftRdown.onComplete.add(this.liftRMoveDown, this); + } + }, + updateBladeUp: function () { + this.bladeup.time_trail++; + if (this.bladeup.time_trail == 1) { // Close + this.bladeup.joint.m_motorSpeed = 20; + this.bladeup.joint.m_maxMotorForce = 750; + this.bladeup.joint.EnableMotor(true); + } + if (this.bladeup.time_trail >= 100 && this.bladeup.joint.m_motorSpeed > 0) { // Open + this.bladeup.joint.m_motorSpeed = -20; + this.bladeup.joint.m_maxMotorForce = 1000; + this.bladeup.joint.EnableMotor(true); + } + if (this.bladeup.time_trail >= 600) + this.bladeup.time_trail = 0; + }, + updateBladeDown: function () { + this.bladedown.time_trail++; + if (this.bladedown.time_trail == 1) { // Close + this.bladedown.joint.m_motorSpeed = 25; + this.bladedown.joint.m_maxMotorForce = 1500; + this.bladedown.joint.EnableMotor(true); + } + if (this.bladedown.time_trail >= 100 && this.bladedown.joint.m_motorSpeed > 0) { // Open + this.bladedown.joint.m_motorSpeed = -20; + this.bladedown.joint.m_maxMotorForce = 750; + this.bladedown.joint.EnableMotor(true); + } + if (this.bladedown.time_trail >= 600) + this.bladedown.time_trail = 0; + }, + updatePusher: function () { + if (jt.dist(this.pusher.getBox().x, this.pusher.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) < 70 && this.pusher_sprite.alpha == 0) { + var pusherUpTween = this.game.add.tween(this.pusher_sprite).to({ + alpha: 1 + }, 1000, "Linear", true); + pusherUpTween.onComplete.add(this.pusherMoveUp, this); + } else if (jt.dist(this.pusher.getBox().x, this.pusher.getBox().y, this.player.truck.getBox().x, this.player.truck.getBox().y) > 90 && this.pusher_sprite.alpha == 1) { + var pusherDownTween = this.game.add.tween(this.pusher_sprite).to({ + alpha: 0 + }, 1000, "Linear", true); + pusherDownTween.onComplete.add(this.pusherMoveDown, this); + } + }, + liftMoveUp: function () { + this.lift.joint.m_motorSpeed = 5; + this.lift.joint.m_maxMotorForce = 950; + this.lift.joint.m_enableMotor = true; + }, + liftMoveDown: function () { + this.lift.joint.m_motorSpeed = -5; + this.lift.joint.m_maxMotorForce = 950; + this.lift.joint.m_enableMotor = true; + }, + liftLMoveUp: function () { + this.liftL.joint.m_motorSpeed = 3.5; + this.liftL.joint.m_maxMotorForce = 950; + this.liftL.joint.m_enableMotor = true; + }, + liftLMoveDown: function () { + this.liftL.joint.m_motorSpeed = -5; + this.liftL.joint.m_maxMotorForce = 950; + this.liftL.joint.m_enableMotor = true; + }, + liftRMoveUp: function () { + this.liftR.joint.m_motorSpeed = 3.5; + this.liftR.joint.m_maxMotorForce = 950; + this.liftR.joint.EnableMotor(true); + }, + liftRMoveDown: function () { + this.liftR.joint.m_motorSpeed = -5; + this.liftR.joint.m_maxMotorForce = 950; + this.liftR.joint.m_enableMotor = true; + }, + pusherMoveUp: function () { + this.pusher.joint.SetMotorSpeed(50); + this.pusher.joint.SetMaxMotorForce(5750); + this.pusher.joint.EnableMotor(true); + }, + pusherMoveDown: function () { + this.pusher.joint.SetMotorSpeed(-25); + this.pusher.joint.SetMaxMotorForce(2500); + this.pusher.joint.EnableMotor(true); + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.renderPlayer(); + this.renderLift(); + this.renderLiftL(); + this.renderLiftR(); + this.renderPusher(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + }, + renderLift: function () { + this.lift_sprite.x = this.lift.getBox().x; + this.lift_sprite.y = this.lift.getBox().y; + this.lift_mask.clear(); + this.lift_mask.beginFill(0xffffff); + for (var j = 0; j < this.lift.getBodies().length; j++) { + if (j == 0) + this.lift_mask.moveTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + else + this.lift_mask.lineTo(this.lift.getBodies()[j].getBody().x, this.lift.getBodies()[j].getBody().y); + this.lift_sprite.angle = this.lift.getBodies()[j].getBody().angle; + } + this.lift_sprite.mask = this.lift_mask; + }, + renderLiftL: function () { + this.liftL_sprite.x = this.liftL.getBox().x; + this.liftL_sprite.y = this.liftL.getBox().y; + this.liftL_mask.clear(); + this.liftL_mask.beginFill(0xffffff); + for (var j = 0; j < this.liftL.getBodies().length; j++) { + if (j == 0) + this.liftL_mask.moveTo(this.liftL.getBodies()[j].getBody().x, this.liftL.getBodies()[j].getBody().y); + else + this.liftL_mask.lineTo(this.liftL.getBodies()[j].getBody().x, this.liftL.getBodies()[j].getBody().y); + this.liftL_sprite.angle = this.liftL.getBodies()[j].getBody().angle; + } + this.liftL_sprite.mask = this.liftL_mask; + }, + renderLiftR: function () { + this.liftR_sprite.x = this.liftR.getBox().x; + this.liftR_sprite.y = this.liftR.getBox().y; + this.liftR_mask.clear(); + this.liftR_mask.beginFill(0xffffff); + for (var j = 0; j < this.liftR.getBodies().length; j++) { + if (j == 0) + this.liftR_mask.moveTo(this.liftR.getBodies()[j].getBody().x, this.liftR.getBodies()[j].getBody().y); + else + this.liftR_mask.lineTo(this.liftR.getBodies()[j].getBody().x, this.liftR.getBodies()[j].getBody().y); + this.liftR_sprite.angle = this.liftR.getBodies()[j].getBody().angle; + } + this.liftR_sprite.mask = this.liftR_mask; + }, + renderPusher: function () { + this.pusher_sprite.x = this.pusher.getBox().x; + this.pusher_sprite.y = this.pusher.getBox().y; + this.pusher_mask.clear(); + this.pusher_mask.beginFill(0xffffff); + for (var j = 0; j < this.pusher.getBodies().length; j++) { + if (j == 0) + this.pusher_mask.moveTo(this.pusher.getBodies()[j].getBody().x, this.pusher.getBodies()[j].getBody().y); + else + this.pusher_mask.lineTo(this.pusher.getBodies()[j].getBody().x, this.pusher.getBodies()[j].getBody().y); + this.pusher_sprite.angle = this.pusher.getBodies()[j].getBody().angle; + } + this.pusher_sprite.mask = this.pusher_mask; + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + if ((jt.up || jt.down || jt.left || jt.right||jt.mobileleft||jt.mobileright||jt.mobileup||jt.mobiledown) && this.tempJoint) { + // Destroying the rope joint that holds the truck from moving automatically when the game starts. + this.game.physics.box2d.world.DestroyJoint(this.tempJoint); + this.tempJoint = null; + } + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 1, true); + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + var isBladeClossing = this.bladeup.joint.m_motorSpeed > 0; + var isFailedByBlade = this.failPoint.indexOf(body1) == 2; + if (begin) { + if (!isFailedByBlade || isBladeClossing) { // If hitted to the fail object at the blade then the blade must be clossing. + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (this.level_Fail == null) { + this.level_Fail = new LevelFail(this.game); + this.level_Fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1"); + } + } + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + }, + getStar: function () { + var scr = this.score + this.second; + var st = 0; + if (scr > (jt.getLevelPreScore(jt.current_level) * 0.8)) + st = 1; + if (scr > (jt.getLevelPreScore(jt.current_level) * 0.9)) + st = 2; + if (scr > (jt.getLevelPreScore(jt.current_level) * 1.0)) + st = 3; + return st; + }, + + //Restart + restartBtnClicked: function (button) { + + }, + + createRestart: function () { + + }, + + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + //this.ground_art.destroy(); + + for(var i=0;i10) + { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } + else + { + jt.sfx.stopSound("truck_speed"); + if(jt.truck_move>30) + jt.sfx.playTruckSound("truck_slow"); + if(jt.truck_move==0) + { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if((this._y2-this._y1)<-20 && !jt.pause && !this.restart && !this.win) + if(jt.sfx) + { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore:function() { + this.scorePoint = jt.setupScoreObject(this.game,this.map); + for(var i=0;i 10){ + this.enemy_truck.back.velocity.x /= 1.12; + this.enemy_truck.front.velocity.x /= 1.12; + } + } + + var truckLevel = this.findCurrentLevel(this.player); + var enemyLevel = this.findCurrentLevel(this.enemy_truck); + var target = truckLevel == enemyLevel ? this.player.truck.getBox().x:this.levelEnds[enemyLevel-1]; + + if(this.enemy_truck.truck.getBox().x < target)// Level 1, or 3 + { + this.enemy_truck.jointback.SetMotorSpeed(speed); + this.enemy_truck.jointback.SetMaxMotorTorque(360); + this.enemy_truck.jointback.EnableMotor(true); + + this.enemy_truck.jointfront.SetMotorSpeed(speed); + this.enemy_truck.jointfront.SetMaxMotorTorque(120); + this.enemy_truck.jointfront.EnableMotor(true); + } + else // Level 2 + { + this.enemy_truck.jointback.SetMotorSpeed(-1*speed); + this.enemy_truck.jointback.SetMaxMotorTorque(360); + this.enemy_truck.jointback.EnableMotor(true); + + this.enemy_truck.jointfront.SetMotorSpeed(-1*speed); + this.enemy_truck.jointfront.SetMaxMotorTorque(120); + this.enemy_truck.jointfront.EnableMotor(true); + } + + var angle = this.enemy_truck.truck.getBox().angle; + + if ((angle > 50 && angle < 180) || (angle < -50 && angle > -180)){ + this.game.physics.box2d.getBody(this.enemy_truck.truck.getBox()).ApplyTorque(-180 * angle); + } + + if(enemyLevel == 1 && this.enemy_truck.truck.getBox().x > 4950){ + this.enemy_truck.back.velocity.x = 0; + this.enemy_truck.front.velocity.x = 0; + } + else if(enemyLevel == 2 && this.enemy_truck.truck.getBox().x < 1200){ + this.enemy_truck.back.velocity.x = 0; + this.enemy_truck.front.velocity.x = 0; + } + } + }, + + findCurrentLevel: function (obj) { + var y = obj.truck.getBox().y; + if (y < 1005) return 1; + if (y < 1650) return 2; + return 3; + }, + moveBy: function (x, y) { + var pieces = this.enemy_truck.truck.getBodies(); + for (var i = 0; i < pieces.length; i++) { + pieces[i].getBody().x += x; + pieces[i].getBody().y += y; + } + this.enemy_truck.front.x += x; + this.enemy_truck.front.y += y; + this.enemy_truck.back.x += x; + this.enemy_truck.back.y += y; + }, + moveTo: function(x, y) { + var dx = x - this.enemy_truck.truck.getBox().x; + var dy = y - this.enemy_truck.truck.getBox().y; + this.moveBy(dx, dy); + }, + }; \ No newline at end of file diff --git a/jellytruck/js/levels/level17.js b/jellytruck/js/levels/level17.js new file mode 100644 index 0000000000000000000000000000000000000000..5216d50ee2c9f4b1062a4326305f7ccb68eee41d --- /dev/null +++ b/jellytruck/js/levels/level17.js @@ -0,0 +1,443 @@ +window.JellyTruck.state.level17 = { + preload: function () { + this.game.world.removeAll(); + + //background + this.bg; + this.light; + this.scene; + this.ground_art; + this.map = this.game.add.tilemap("level_17_map"); + this.phyBody = this.game.add.tilemap("map"); + + //camera + this.jellyCamera = { + cx: 0, + cy: 0, + focx: -1, + focy: -1, + focz: -1, + mode: 0, + zoom: 1, + width: 640, + height: 640, + levelZoom: 1, + scale: 0.8 + }; + + //player and flag + this.player; + this.flag; + + //objects + this.statBody; + this.scorePoint; + this.failPoint; + this.jellyObj; + + //Level win and fail + this.win; + this.restart; + this.level_Fail = null; + + //score + this.timeTrail; + this.second; + this.score; + this.bonus; + this.score_txt; + this.spotLight; + this.contact_count; + this.truck_status; + + //Level Specific Objects + this.bar; + this.bar_front_wheel; + this.bar_back_wheel; + this.bar_stopper; + + }, + create: function () { + + //score,bonus and win + this.win = false; + this.restart = false; + this.second = 1000; + this.score = 0; + this.bonus = 0; + this.timeTrail = 0; + this.contact_count = 0; + this.truck_status = 0; + + //level data + this.game.mobLevel = "Level 17"; + this.game.levelNumber = "level17"; + this.game.nextlevelNumber = "level18"; + jt.current_level = 17; + + //init Game music and sound + this.game.sound.stopAll(); + if (jt.sfx) + jt.sfx.playMusic("oddbg"); + + + //setup sky background + this.bg = new GameBg(this.game); + + // setup jelly object + this.jellyObj = jt.setupJellyObj(this.game, this.map, this.phyBody); + + //setup level scene + this.scene = jt.setupScene(this.game, this.map, "scene_17", this.map.objects["Ground"][0].x - 1, this.map.objects["Ground"][0].y - 1274, this.cameraWidth, this.cameraHeight); + + // setup static object + this.statBody = jt.setupStaticObject(this.game, this.map, 50); + + //setup joint ground + this.joint_ground = jt.setupJointGround(this.game, this.map); + + //setup lego object + this.legoObj = jt.setupLegoObj(this.game, this.map, this.joint_ground); + + //setup static object + // this.statBody = jt.setupStaticObject(this.game,this.map); + this.statBody[0].friction = 3.5; + this.statBody[0].restitution = 0.5; + this.statBody[5].friction = 2; + this.statBody[5].restitution = 0.3; + + //setup Fail + this.setupFail(); + + //setup Score + this.setupScore(); + + //setup Flag + this.setupFlag(); + + //setup player + this.player = jt.createTruck(this.game, this.scene.truck_x, this.scene.truck_y, this.scene.truck_type, this.phyBody); + + //set ground art + this.ground_art = this.game.add.image(this.map.objects["Ground"][0].x - 1, this.map.objects["Ground"][0].y - 970, 'ground_17'); + this.ground_art.autoCull = true; + this.ground_art.checkWorldBounds = true; + + //setup game menu + if (jt.game_menu != null) + jt.game_menu.killMenu(); + jt.game_menu = new GameMenu(this.game); + jt.game_menu.enable(); + + //setup keyboard + jt.initInput(this.game); + // if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { + // jt.gameController(this.game); + //} + + if (jt.sfx) + jt.sfx.playTruckSound("truck_start"); + + //level specific + this.jellyObj[3].enableRevolute(this.joint_ground, 500, 1000, true, 0, 0, false); + + this.bar = this.game.add.sprite(2926, 1468, "bar17"); + this.bar.anchor.set(0.5); + this.game.physics.box2d.enable(this.bar); + this.bar.body.clearFixtures(); + this.bar.body.loadPolygon("legoData", "bar17", this.bar); + this.bar.body.restitution = 0; + this.bar.body.friction = 5; + this.bar.body.mass = 13; + this.bar.body.setCollisionCategory(OTHER_CATEGORYBITS); + this.bar.body.setCollisionMask(OTHER_MASKBITS); + + + this.bar_front_wheel = this.game.add.sprite(this.bar.x + 50, 1468, "barWheel17"); + this.bar_front_wheel.anchor.set(0.5); + this.game.physics.box2d.enable(this.bar_front_wheel); + this.bar_front_wheel.body.setCircle(32, 0, 0); + this.bar_front_wheel.body.restitution = 0; + this.bar_front_wheel.body.friction = 5; + this.bar_front_wheel.body.mass = 13; + this.bar_front_wheel.body.setCollisionCategory(OTHER_CATEGORYBITS); + this.bar_front_wheel.body.setCollisionMask(OTHER_MASKBITS); + + this.bar_back_wheel = this.game.add.sprite(this.bar.x - 50, 1468, "barWheel17"); + this.bar_back_wheel.anchor.set(0.5); + this.game.physics.box2d.enable(this.bar_back_wheel); + this.bar_back_wheel.body.setCircle(32, 0, 0); + this.bar_back_wheel.body.restitution = 0; + this.bar_back_wheel.body.friction = 5; + this.bar_back_wheel.body.mass = 13; + this.bar_back_wheel.body.setCollisionCategory(OTHER_CATEGORYBITS); + this.bar_back_wheel.body.setCollisionMask(OTHER_MASKBITS); + + + this.front_joint = this.game.physics.box2d.revoluteJoint(this.bar, this.bar_front_wheel, 50, 0, 0, 0, 635, 1010, true); + this.back_joint = this.game.physics.box2d.revoluteJoint(this.bar, this.bar_back_wheel, -50, 0, 0, 0, 635, 1010, true); + + this.bar_stopper = new Phaser.Physics.Box2D.Body(this.game, null, 2754, 1024); + this.bar_stopper.setRectangle(94, 1050, 0, 0); + this.bar_stopper.setCollisionCategory(OTHER_CATEGORYBITS); + this.bar_stopper.setCollisionMask(OTHER_MASKBITS); + this.bar_stopper.static = true; + + this.game.camera.follow(this.player.truck.getSprite()); + }, + // Level Pause and Resume + onGamePause: function () { + + }, + onGameResume: function () { + + }, + //Level Update and Render + updateCamera: function () { + this._plx = this.player.truck.getSprite().x; + this._ply = this.player.truck.getSprite().y; + this._vlc = Math.abs(this.player.truck.getBox().data.m_linearVelocity.x); + this.jellyCamera = jt.updateCamera(this.game, this.jellyCamera, this._plx, this._ply, this._vlc, this.win, this.restart, jt.pause); + }, + update: function () { + + // this.updateCamera(); + if (jt.sfx) + jt.sfx.loopMusic("oddbg"); + + if (!this.win && !this.restart && !jt.pause) { + this.timeTrail++; + if (this.timeTrail % 15 == 0) { + this.second--; + } + this.keyEvent(); + this.truckSound(); + + } else if (this.win) { + if (this.flag.joint) + this.game.physics.box2d.world.DestroyJoint(this.flag.joint); + + } else if (this.restart) { + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + } + if (this.restart && this.level_Fail && this.level_Fail.space.isDown) + this.level_Fail.restartBtnClicked(); + + if (jt.dist(this.bar_stopper.x, this.bar_stopper.y, this.player.truck.getBox().x, this.player.truck.getBox().y) < 800) { + this.bar_stopper.destroy(); + } + + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + + // var rect = new Phaser.Rectangle( this.game.camera.bounds.x, this.game.camera.bounds.y, this.game.camera.bounds.width, this.game.camera.bounds.height ) ; + // this.game.debug.geom( rect, 'rgba(0,0,0,0.5)' ) ; + // this.game.debug.cameraInfo(this.game.camera, 500, 32); + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 8, true); + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + // if(!jt.sfx.wob1.isPlaying&& !jt.sfx.wob2.isPlaying&&!jt.sfx.wob3.isPlaying) + // jt.sfx.playTruckSound("truck_speed"); + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + //alert(this.second); + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //// End Score and Bonus + + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.game.camera.unfollow(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + // if(this.level_Fail==null) + // { + + // } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1"); + } + }, + //// End Fail + + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + //// End Flag + + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i 900 && this.balloon.getBox().y < 4096) { + this.statBody[14].sensor = this.statBody[15].sensor = this.statBody[16].sensor = true; + this.fallingBalls.forEach((function (ball) { + ball.body.static = false; + ball.body.applyForce(Phaser.Math.between(-75, 75), 1000); + }).bind(this)); + } + } + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.renderPlayer(); + this.renderString(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + }, + renderString: function () { + if (!this.restart) { + this.ropeGraphics.clear(); + this.ropeGraphics.lineStyle(4, 0x000000, 3); + this.ropeGraphics.moveTo(this.balloon.getBox().x, this.balloon.getBox().y); + this.ropeGraphics.lineTo(this.player.truck.getCenter().x, this.player.truck.getCenter().y); + } + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + jt.gameBalloonAction(this.game, this.balloon.getCenter(), 2); + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } + else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } + else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].sensor = false; + this.failPoint[i].setCategoryContactCallback(32, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin && !this.restart) { + this.showBalloonBurstAnimation(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang2"); + } + }, + showBalloonBurstAnimation: function () { + var balloonburstAnim = this.game.add.sprite(this.balloon.getBox().x, this.balloon.getBox().y - 85, "balloonBurst"); + balloonburstAnim.anchor.set(0.5); + balloonburstAnim.animations.add("anim"); + + balloonburstAnim.events.onAnimationComplete.add(function () { + balloonburstAnim.destroy(); + }, this); + + balloonburstAnim.animations.play("anim", 30); + this.balloon.disable(); + this.ropeGraphics.destroy(); + }, + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + + // The flag is disconnected from the base and connected to lego bridge + this.game.physics.box2d.world.DestroyJoint(this.flag.bottom.body.data.m_jointList.next.joint); + this.game.physics.box2d.revoluteJoint(this.flag.bottom.body, this.bridge2.body, 0, 15, 75, 0, 0, 0, false, 0, 5, true); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + }, + getStar: function () { + var scr = this.score + this.second; + var st = 0; + if (scr > (jt.getLevelPreScore(jt.current_level) * 0.8)) + st = 1; + if (scr > (jt.getLevelPreScore(jt.current_level) * 0.9)) + st = 2; + if (scr > (jt.getLevelPreScore(jt.current_level) * 1.0)) + st = 3; + return st; + }, + //Camera + //Restart + restartBtnClicked: function (button) { + + }, + + createRestart: function () { + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + // this.ground_art.destroy(); + + for(var i=0;i 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(ALLTOUCH_CATEGORYBITS, this.failCollision, this); + + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + if (!this.banim) { + this.showBalloonBurstAnimation(); + jt.sfx.playTruckSound("truck_bang1") + this.banim = true; + + + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + } + } + }, + + showBalloonBurstAnimation: function () { + var balloonburstAnim = this.abcd = this.game.add.sprite(this.balloon.getBox().x, this.balloon.getBox().y - 85, "balloonBurst"); + balloonburstAnim.anchor.set(0.5); + balloonburstAnim.animations.add("anim"); + + balloonburstAnim.events.onAnimationComplete.add(function () { + balloonburstAnim.destroy(); + }, this); + + balloonburstAnim.animations.play("anim", 30); + this.balloon.disable(); + this.rope.destroy(); + this.graphic.destroy(); + }, + + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.height / 2)); + this.cameraY = (this.player.truck.getSprite().y - (this.cameraHeight / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i -50) { + this.player.truck.getBox().applyForce(dx, 300); + } + + if (jt.down || jt.mobiledown) { + if (this.player.truck.getBox().x > (this.jellyObj[0].getBox().x - 15)) { + this.jellyObj[0].SetAngularVelocity(0.5, 45); + this.jellyObj[0].SetAngularDamp(0); + this.jellyObj[0].setGravity(10); + this.player.truck.SetAngularDamp(0); + this.player.front.SetAngularDamp(0); + this.player.back.SetAngularDamp(0); + } + if (this.jellyObj[0].getBox().x < 4530 && dx < -75 && dx > -150) { + this.player.truck.getBox().applyForce(-750, 0); + } + } else if (jt.up || jt.mobileup) { + this.jellyObj[0].SetAngularDamp(10); + this.jellyObj[0].getBox().static = true; + } else { + this.jellyObj[0].getBox().static = false; + } + } else if (this.win) { + if (this.flag.joint) + this.game.physics.box2d.world.DestroyJoint(this.flag.joint); + + } else if (this.restart) { + this.game.physics.box2d.world.DestroyJoint(this.player.joint1); + this.game.physics.box2d.world.DestroyJoint(this.player.joint2); + } + if (this.restart && this.level_Fail && this.level_Fail.space.isDown) + this.level_Fail.restartBtnClicked(); + }, + render: function () { + if (this.jellyObj) { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + } + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + //Keyboard Event + keyEvent: function () { + jt.resetInput(); + if (!jt.pause && !this.restart && !this.win) { + jt.updateinput(); + jt.gameAction(this.game, this.player.truck.getBox(), this.player.front.getBox(), this.player.back.getBox(), 1, true); + } + }, + truckSound: function () { + if (jt.truck_speed && jt.truck_move > 10) { + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_speed"); + } else { + jt.sfx.stopSound("truck_speed"); + if (jt.truck_move > 30) + jt.sfx.playTruckSound("truck_slow"); + if (jt.truck_move == 0) { + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_idle"); + } + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20 && !jt.pause && !this.restart && !this.win) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + }, + //Score and Bonus + setupScore: function () { + this.scorePoint = jt.setupScoreObject(this.game, this.map); + for (var i = 0; i < this.scorePoint.length; i++) + this.scorePoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.scoreCollision, this); + this.spotLight = this.scorePoint.length; + }, + scoreCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.contact_count++; + } else { + this.contact_count = 0; + } + if (this.contact_count === 1) { + var value = this.second / this.spotLight; + this.score += value; + if (jt.game_menu != null) + jt.game_menu.setScore(this.score); + this.spotLight--; + } + }, + // End Score and Bonus + + //Fail + setupFail: function () { + this.failPoint = jt.setupFailObject(this.game, this.map); + for (var i = 0; i < this.failPoint.length; i++) { + this.failPoint[i].setCategoryContactCallback(TRUCK_CATEGORYBITS, this.failCollision, this); + this.failPoint[i].setCategoryContactCallback(WHEEL_CATEGORYBITS, this.failCollision, this); + } + }, + failCollision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) { + body1.destroy(); + this.restart = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + if (jt.game_menu != null) + jt.game_menu.score_txt.visible = false; + if (jt.game_fail == null) { + jt.game_fail = new LevelFail(this.game); + jt.game_fail.updateFail(); + } + + jt.sfx.stopSound("truck_idle"); + jt.sfx.stopSound("truck_speed"); + jt.sfx.stopSound("truck_slow"); + jt.sfx.playTruckSound("truck_bang1"); + } + }, + // End Fail + + // Flag + setupFlag: function () { + this.flag = jt.createFlag(this.game, "flag_head", "flag_mid", "flag_bot", this.map); + this.flag.head.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.middle.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + this.flag.bottom.body.setCategoryContactCallback(TRUCK_CATEGORYBITS, this.flagCollision, this); + }, + flagCollision: function (body1, body2, fixture1, fixture2, begin) { + + if (!this.win) { + this.win = true; + this.jellyCamera.cx = (this.player.truck.getSprite().x - (this.jellyCamera.width / 2)); + this.jellyCamera.cy = (this.player.truck.getSprite().y - (this.jellyCamera.height / 2)); + this.str = jt.getStar(this.score, this.second); + this.flag.head.body.applyForce(150, 0); + this.flag.middle.body.applyForce(150, 0); + this.flag.bottom.body.applyForce(150, 0); + this.flag.head.body.sensor = true; + this.flag.middle.body.sensor = true; + this.flag.bottom.body.sensor = true; + this.player.truck.getBox().linearDamping = 20; + this.player.truck.getBox().angularDampiong = 20; + this.player.front.getBox().linearDamping = 20; + this.player.front.getBox().angularDampiong = 20; + this.player.back.getBox().linearDamping = 20; + this.player.back.getBox().angularDampiong = 20; + if (jt.game_menu != null) + jt.game_menu.disable(); + if (jt.well_done == null) + jt.well_done = new WellDone(this.game, this.score, this.second, this.str); + } + + }, + // End Flag + + // ShutDown + shutdown: function () { + this.map.destroy(); + this.phyBody.destroy(); + + this.game.physics.box2d.clear(); + this.game.world.removeAll(); + + this.bg.destroy(); + this.scene.art.destroy(); + this.ground_art.destroy(); + + for(var i=0;i=0;--c){var d=b[c].src,e=d.lastIndexOf("?"),f=-1==e?d.length:e;if("base.js"==d.substr(f-7,7))return void(goog.basePath=d.substr(0,f-7))}},goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[a]=!0)},goog.writeScriptTag_=function(a){if(goog.inHtmlDocument_()){var b=goog.global.document;if("complete"==b.readyState){var c=/\bdeps.js$/.test(a);if(c)return!1;throw Error('Cannot write "'+a+'" after document load')}return b.write(''),!0}return!1},goog.writeScripts_=function(){function a(e){if(!(e in d.written)){if(e in d.visited)return void(e in c||(c[e]=!0,b.push(e)));if(d.visited[e]=!0,e in d.requires)for(var f in d.requires[e])if(!goog.isProvided_(f)){if(!(f in d.nameToPath))throw Error("Undefined nameToPath for "+f);a(d.nameToPath[f])}e in c||(c[e]=!0,b.push(e))}}var b=[],c={},d=goog.dependencies_;for(var e in goog.included_)d.written[e]||a(e);for(var f=0;f>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var c="array"==b?[]:{};for(var d in a)c[d]=goog.cloneObject(a[d]);return c}return a},goog.bindNative_=function(a){return a.call.apply(a.bind,arguments)},goog.bindJs_=function(a,b){if(!a)throw new Error;if(arguments.length>2){var c=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(d,c),a.apply(b,d)}}return function(){return a.apply(b,arguments)}},goog.bind=function(){return goog.bind=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bindNative_:goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(a){var b=Array.prototype.slice.call(arguments,1);return function(){var c=b.slice();return c.push.apply(c,arguments),a.apply(this,c)}},goog.mixin=function(a,b){for(var c in b)a[c]=b[c]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(a){if(goog.global.execScript)goog.global.execScript(a,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(null==goog.evalWorksForGlobals_&&(goog.global.eval("var _et_ = 1;"),"undefined"!=typeof goog.global._et_?(delete goog.global._et_,goog.evalWorksForGlobals_=!0):goog.evalWorksForGlobals_=!1),goog.evalWorksForGlobals_)goog.global.eval(a);else{var b=goog.global.document,c=b.createElement("script");c.type="text/javascript",c.defer=!1,c.appendChild(b.createTextNode(a)),b.body.appendChild(c),b.body.removeChild(c)}}},goog.evalWorksForGlobals_=null,goog.cssNameMapping_,goog.cssNameMappingStyle_,goog.getCssName=function(a,b){var c,d=function(a){return goog.cssNameMapping_[a]||a},e=function(a){for(var b=a.split("-"),c=[],e=0;ed;++d)c[d]=b(d);return c},box2d.b2MakeNumberArray=function(a){return box2d.b2MakeArray(a,function(){return 0})},goog.provide("box2d.b2Math"),goog.require("box2d.b2Settings"),box2d.b2_pi_over_180=box2d.b2_pi/180,box2d.b2_180_over_pi=180/box2d.b2_pi,box2d.b2_two_pi=2*box2d.b2_pi,box2d.b2Abs=function(a){return 0>a?-a:a},box2d.b2Min=function(a,b){return b>a?a:b},box2d.b2Max=function(a,b){return a>b?a:b},box2d.b2Clamp=function(a,b,c){return b>a?b:a>c?c:a},box2d.b2Swap=function(a,b){box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1);var c=a[0];a[0]=b[0],b[0]=c},box2d.b2IsValid=function(a){return isFinite(a)},box2d.b2Sq=function(a){return a*a},box2d.b2InvSqrt=function(a){return 1/Math.sqrt(a)},box2d.b2Sqrt=function(a){return Math.sqrt(a)},box2d.b2Pow=function(a,b){return Math.pow(a,b)},box2d.b2DegToRad=function(a){return a*box2d.b2_pi_over_180},box2d.b2RadToDeg=function(a){return a*box2d.b2_180_over_pi},box2d.b2Cos=function(a){return Math.cos(a)},box2d.b2Sin=function(a){return Math.sin(a)},box2d.b2Acos=function(a){return Math.acos(a)},box2d.b2Asin=function(a){return Math.asin(a)},box2d.b2Atan2=function(a,b){return Math.atan2(a,b)},box2d.b2NextPowerOfTwo=function(a){return a|=a>>1&2147483647,a|=a>>2&1073741823,a|=a>>4&268435455,a|=a>>8&16777215,a|=a>>16&65535,a+1},box2d.b2IsPowerOfTwo=function(a){return a>0&&0===(a&a-1)},box2d.b2Random=function(){return 2*Math.random()-1},box2d.b2RandomRange=function(a,b){return(b-a)*Math.random()+a},box2d.b2Vec2=function(a,b){this.x=a||0,this.y=b||0},box2d.b2Vec2.prototype.x=0,box2d.b2Vec2.prototype.y=0,box2d.b2Vec2_zero=new box2d.b2Vec2,box2d.b2Vec2.ZERO=new box2d.b2Vec2,box2d.b2Vec2.UNITX=new box2d.b2Vec2(1,0),box2d.b2Vec2.UNITY=new box2d.b2Vec2(0,1),box2d.b2Vec2.s_t0=new box2d.b2Vec2,box2d.b2Vec2.s_t1=new box2d.b2Vec2,box2d.b2Vec2.s_t2=new box2d.b2Vec2,box2d.b2Vec2.s_t3=new box2d.b2Vec2,box2d.b2Vec2.MakeArray=function(a){return box2d.b2MakeArray(a,function(){return new box2d.b2Vec2})},box2d.b2Vec2.prototype.Clone=function(){return new box2d.b2Vec2(this.x,this.y)},box2d.b2Vec2.prototype.SetZero=function(){return this.x=0,this.y=0,this},box2d.b2Vec2.prototype.SetXY=function(a,b){return this.x=a,this.y=b,this},box2d.b2Vec2.prototype.Copy=function(a){return this.x=a.x,this.y=a.y,this},box2d.b2Vec2.prototype.SelfAdd=function(a){return this.x+=a.x,this.y+=a.y,this},box2d.b2Vec2.prototype.SelfAddXY=function(a,b){return this.x+=a,this.y+=b,this},box2d.b2Vec2.prototype.SelfSub=function(a){return this.x-=a.x,this.y-=a.y,this},box2d.b2Vec2.prototype.SelfSubXY=function(a,b){return this.x-=a,this.y-=b,this},box2d.b2Vec2.prototype.SelfMul=function(a){return this.x*=a,this.y*=a,this},box2d.b2Vec2.prototype.SelfMulAdd=function(a,b){return this.x+=a*b.x,this.y+=a*b.y,this},box2d.b2Vec2.prototype.SelfMulSub=function(a,b){return this.x-=a*b.x,this.y-=a*b.y,this},box2d.b2Vec2.prototype.Dot=function(a){return this.x*a.x+this.y*a.y},box2d.b2Vec2.prototype.Cross=function(a){return this.x*a.y-this.y*a.x},box2d.b2Vec2.prototype.Length=function(){var a=this.x,b=this.y;return Math.sqrt(a*a+b*b)},box2d.b2Vec2.prototype.GetLength=box2d.b2Vec2.prototype.Length,box2d.b2Vec2.prototype.LengthSquared=function(){var a=this.x,b=this.y;return a*a+b*b},box2d.b2Vec2.prototype.GetLengthSquared=box2d.b2Vec2.prototype.LengthSquared,box2d.b2Vec2.prototype.Normalize=function(){var a=this.GetLength();if(a>=box2d.b2_epsilon){var b=1/a;this.x*=b,this.y*=b}return a},box2d.b2Vec2.prototype.SelfNormalize=function(){var a=this.GetLength();if(a>=box2d.b2_epsilon){var b=1/a;this.x*=b,this.y*=b}return this},box2d.b2Vec2.prototype.SelfRotate=function(a,b){var c=this.x,d=this.y;return this.x=a*c-b*d,this.y=b*c+a*d,this},box2d.b2Vec2.prototype.SelfRotateRadians=function(a){return this.SelfRotate(Math.cos(a),Math.sin(a))},box2d.b2Vec2.prototype.SelfRotateDegrees=function(a){return this.SelfRotateRadians(box2d.b2DegToRad(a))},box2d.b2Vec2.prototype.IsValid=function(){return isFinite(this.x)&&isFinite(this.y)},box2d.b2Vec2.prototype.SelfCrossVS=function(a){var b=this.x;return this.x=a*this.y,this.y=-a*b,this},box2d.b2Vec2.prototype.SelfCrossSV=function(a){var b=this.x;return this.x=-a*this.y,this.y=a*b,this},box2d.b2Vec2.prototype.SelfMinV=function(a){return this.x=box2d.b2Min(this.x,a.x),this.y=box2d.b2Min(this.y,a.y),this},box2d.b2Vec2.prototype.SelfMaxV=function(a){return this.x=box2d.b2Max(this.x,a.x),this.y=box2d.b2Max(this.y,a.y),this},box2d.b2Vec2.prototype.SelfAbs=function(){return this.x=box2d.b2Abs(this.x),this.y=box2d.b2Abs(this.y),this},box2d.b2Vec2.prototype.SelfNeg=function(){return this.x=-this.x,this.y=-this.y,this},box2d.b2Vec2.prototype.SelfSkew=function(){var a=this.x;return this.x=-this.y,this.y=a,this},box2d.b2AbsV=function(a,b){return b.x=box2d.b2Abs(a.x),b.y=box2d.b2Abs(a.y),b},box2d.b2MinV=function(a,b,c){return c.x=box2d.b2Min(a.x,b.x),c.y=box2d.b2Min(a.y,b.y),c},box2d.b2MaxV=function(a,b,c){return c.x=box2d.b2Max(a.x,b.x),c.y=box2d.b2Max(a.y,b.y),c},box2d.b2ClampV=function(a,b,c,d){return d.x=box2d.b2Clamp(a.x,b.x,c.x),d.y=box2d.b2Clamp(a.y,b.y,c.y),d},box2d.b2RotateV=function(a,b,c,d){var e=a.x,f=a.y;return d.x=b*e-c*f,d.y=c*e+b*f,d},box2d.b2RotateRadiansV=function(a,b,c){return box2d.b2RotateV(a,Math.cos(b),Math.sin(b),c)},box2d.b2RotateDegreesV=function(a,b,c){return box2d.b2RotateRadiansV(a,box2d.b2DegToRad(b),c)},box2d.b2DotVV=function(a,b){return a.x*b.x+a.y*b.y},box2d.b2CrossVV=function(a,b){return a.x*b.y-a.y*b.x},box2d.b2CrossVS=function(a,b,c){var d=a.x;return c.x=b*a.y,c.y=-b*d,c},box2d.b2CrossVOne=function(a,b){var c=a.x;return b.x=a.y,b.y=-c,b},box2d.b2CrossSV=function(a,b,c){var d=b.x;return c.x=-a*b.y,c.y=a*d,c},box2d.b2CrossOneV=function(a,b){var c=a.x;return b.x=-a.y,b.y=c,b},box2d.b2AddVV=function(a,b,c){return c.x=a.x+b.x,c.y=a.y+b.y,c},box2d.b2SubVV=function(a,b,c){return c.x=a.x-b.x,c.y=a.y-b.y,c},box2d.b2MulSV=function(a,b,c){return c.x=b.x*a,c.y=b.y*a,c},box2d.b2AddVMulSV=function(a,b,c,d){return d.x=a.x+b*c.x,d.y=a.y+b*c.y,d},box2d.b2SubVMulSV=function(a,b,c,d){return d.x=a.x-b*c.x,d.y=a.y-b*c.y,d},box2d.b2AddVCrossSV=function(a,b,c,d){var e=c.x;return d.x=a.x-b*c.y,d.y=a.y+b*e,d},box2d.b2MidVV=function(a,b,c){return c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y),c},box2d.b2ExtVV=function(a,b,c){return c.x=.5*(b.x-a.x),c.y=.5*(b.y-a.y),c},box2d.b2IsEqualToV=function(a,b){return a.x===b.x&&a.y===b.y},box2d.b2DistanceVV=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)},box2d.b2DistanceSquaredVV=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d},box2d.b2NegV=function(a,b){return b.x=-a.x,b.y=-a.y,b},box2d.b2Vec3=function(a,b,c){this.x=a||0,this.y=b||0,this.z=c||0},box2d.b2Vec3.prototype.x=0,box2d.b2Vec3.prototype.y=0,box2d.b2Vec3.prototype.z=0,box2d.b2Vec3.ZERO=new box2d.b2Vec3,box2d.b2Vec3.s_t0=new box2d.b2Vec3,box2d.b2Vec3.prototype.Clone=function(){return new box2d.b2Vec3(this.x,this.y,this.z)},box2d.b2Vec3.prototype.SetZero=function(){return this.x=0,this.y=0,this.z=0,this},box2d.b2Vec3.prototype.SetXYZ=function(a,b,c){return this.x=a,this.y=b,this.z=c,this},box2d.b2Vec3.prototype.Copy=function(a){return this.x=a.x,this.y=a.y,this.z=a.z,this},box2d.b2Vec3.prototype.SelfNeg=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},box2d.b2Vec3.prototype.SelfAdd=function(a){return this.x+=a.x,this.y+=a.y,this.z+=a.z,this},box2d.b2Vec3.prototype.SelfAddXYZ=function(a,b,c){return this.x+=a,this.y+=b,this.z+=c,this},box2d.b2Vec3.prototype.SelfSub=function(a){return this.x-=a.x,this.y-=a.y,this.z-=a.z,this},box2d.b2Vec3.prototype.SelfSubXYZ=function(a,b,c){return this.x-=a,this.y-=b,this.z-=c,this},box2d.b2Vec3.prototype.SelfMul=function(a){return this.x*=a,this.y*=a,this.z*=a,this},box2d.b2DotV3V3=function(a,b){return a.x*b.x+a.y*b.y+a.z*b.z},box2d.b2CrossV3V3=function(a,b,c){var d=a.x,e=a.y,f=a.z,g=b.x,h=b.y,i=b.z;return c.x=e*i-f*h,c.y=f*g-d*i,c.z=d*h-e*g,c},box2d.b2Mat22=function(){this.ex=new box2d.b2Vec2(1,0),this.ey=new box2d.b2Vec2(0,1)},box2d.b2Mat22.prototype.ex=null,box2d.b2Mat22.prototype.ey=null,box2d.b2Mat22.IDENTITY=new box2d.b2Mat22,box2d.b2Mat22.prototype.Clone=function(){return(new box2d.b2Mat22).Copy(this)},box2d.b2Mat22.FromVV=function(a,b){return(new box2d.b2Mat22).SetVV(a,b)},box2d.b2Mat22.FromSSSS=function(a,b,c,d){return(new box2d.b2Mat22).SetSSSS(a,b,c,d)},box2d.b2Mat22.FromAngleRadians=function(a){return(new box2d.b2Mat22).SetAngleRadians(a)},box2d.b2Mat22.prototype.SetSSSS=function(a,b,c,d){return this.ex.SetXY(a,c),this.ey.SetXY(b,d),this},box2d.b2Mat22.prototype.SetVV=function(a,b){return this.ex.Copy(a),this.ey.Copy(b),this},box2d.b2Mat22.prototype.SetAngle=function(a){var b=Math.cos(a),c=Math.sin(a);return this.ex.SetXY(b,c),this.ey.SetXY(-c,b),this},box2d.b2Mat22.prototype.SetAngleRadians=box2d.b2Mat22.prototype.SetAngle,box2d.b2Mat22.prototype.SetAngleDegrees=function(a){return this.SetAngle(box2d.b2DegToRad(a))},box2d.b2Mat22.prototype.Copy=function(a){return this.ex.Copy(a.ex),this.ey.Copy(a.ey),this},box2d.b2Mat22.prototype.SetIdentity=function(){return this.ex.SetXY(1,0),this.ey.SetXY(0,1),this},box2d.b2Mat22.prototype.SetZero=function(){return this.ex.SetZero(),this.ey.SetZero(),this},box2d.b2Mat22.prototype.GetAngle=function(){return Math.atan2(this.ex.y,this.ex.x)},box2d.b2Mat22.prototype.GetAngleRadians=box2d.b2Mat22.prototype.GetAngle,box2d.b2Mat22.prototype.GetInverse=function(a){var b=this.ex.x,c=this.ey.x,d=this.ex.y,e=this.ey.y,f=b*e-c*d;return 0!==f&&(f=1/f),a.ex.x=f*e,a.ey.x=-f*c,a.ex.y=-f*d,a.ey.y=f*b,a},box2d.b2Mat22.prototype.Solve=function(a,b,c){var d=this.ex.x,e=this.ey.x,f=this.ex.y,g=this.ey.y,h=d*g-e*f;return 0!==h&&(h=1/h),c.x=h*(g*a-e*b),c.y=h*(d*b-f*a),c},box2d.b2Mat22.prototype.SelfAbs=function(){return this.ex.SelfAbs(),this.ey.SelfAbs(),this},box2d.b2Mat22.prototype.SelfInv=function(){return this.GetInverse(this)},box2d.b2Mat22.prototype.SelfAddM=function(a){return this.ex.SelfAdd(a.ex),this.ey.SelfAdd(a.ey),this},box2d.b2Mat22.prototype.SelfSubM=function(a){return this.ex.SelfSub(a.ex),this.ey.SelfSub(a.ey),this},box2d.b2AbsM=function(a,b){var c=a.ex,d=a.ey;return b.ex.x=box2d.b2Abs(c.x),b.ex.y=box2d.b2Abs(c.y),b.ey.x=box2d.b2Abs(d.x),b.ey.y=box2d.b2Abs(d.y),b},box2d.b2MulMV=function(a,b,c){var d=a.ex,e=a.ey,f=b.x,g=b.y;return c.x=d.x*f+e.x*g,c.y=d.y*f+e.y*g,c},box2d.b2MulTMV=function(a,b,c){var d=a.ex,e=a.ey,f=b.x,g=b.y;return c.x=d.x*f+d.y*g,c.y=e.x*f+e.y*g,c},box2d.b2AddMM=function(a,b,c){var d=a.ex,e=a.ey,f=b.ex,g=b.ey;return c.ex.x=d.x+f.x,c.ex.y=d.y+f.y,c.ey.x=e.x+g.x,c.ey.y=e.y+g.y,c},box2d.b2MulMM=function(a,b,c){var d=a.ex.x,e=a.ex.y,f=a.ey.x,g=a.ey.y,h=b.ex.x,i=b.ex.y,j=b.ey.x,k=b.ey.y;return c.ex.x=d*h+f*i,c.ex.y=e*h+g*i,c.ey.x=d*j+f*k,c.ey.y=e*j+g*k,c},box2d.b2MulTMM=function(a,b,c){var d=a.ex.x,e=a.ex.y,f=a.ey.x,g=a.ey.y,h=b.ex.x,i=b.ex.y,j=b.ey.x,k=b.ey.y;return c.ex.x=d*h+e*i,c.ex.y=f*h+g*i,c.ey.x=d*j+e*k,c.ey.y=f*j+g*k,c},box2d.b2Mat33=function(){this.ex=new box2d.b2Vec3(1,0,0),this.ey=new box2d.b2Vec3(0,1,0),this.ez=new box2d.b2Vec3(0,0,1)},box2d.b2Mat33.prototype.ex=null,box2d.b2Mat33.prototype.ey=null,box2d.b2Mat33.prototype.ez=null,box2d.b2Mat33.IDENTITY=new box2d.b2Mat33,box2d.b2Mat33.prototype.Clone=function(){return(new box2d.b2Mat33).Copy(this)},box2d.b2Mat33.prototype.SetVVV=function(a,b,c){return this.ex.Copy(a),this.ey.Copy(b),this.ez.Copy(c),this},box2d.b2Mat33.prototype.Copy=function(a){return this.ex.Copy(a.ex),this.ey.Copy(a.ey),this.ez.Copy(a.ez),this},box2d.b2Mat33.prototype.SetIdentity=function(){return this.ex.SetXYZ(1,0,0),this.ey.SetXYZ(0,1,0),this.ez.SetXYZ(0,0,1),this},box2d.b2Mat33.prototype.SetZero=function(){return this.ex.SetZero(),this.ey.SetZero(),this.ez.SetZero(),this},box2d.b2Mat33.prototype.SelfAddM=function(a){return this.ex.SelfAdd(a.ex),this.ey.SelfAdd(a.ey),this.ez.SelfAdd(a.ez),this},box2d.b2Mat33.prototype.Solve33=function(a,b,c,d){var e=this.ex.x,f=this.ex.y,g=this.ex.z,h=this.ey.x,i=this.ey.y,j=this.ey.z,k=this.ez.x,l=this.ez.y,m=this.ez.z,n=e*(i*m-j*l)+f*(j*k-h*m)+g*(h*l-i*k);return 0!==n&&(n=1/n),d.x=n*(a*(i*m-j*l)+b*(j*k-h*m)+c*(h*l-i*k)),d.y=n*(e*(b*m-c*l)+f*(c*k-a*m)+g*(a*l-b*k)),d.z=n*(e*(i*c-j*b)+f*(j*a-h*c)+g*(h*b-i*a)),d},box2d.b2Mat33.prototype.Solve22=function(a,b,c){var d=this.ex.x,e=this.ey.x,f=this.ex.y,g=this.ey.y,h=d*g-e*f;return 0!==h&&(h=1/h),c.x=h*(g*a-e*b),c.y=h*(d*b-f*a),c},box2d.b2Mat33.prototype.GetInverse22=function(a){var b=this.ex.x,c=this.ey.x,d=this.ex.y,e=this.ey.y,f=b*e-c*d;0!==f&&(f=1/f),a.ex.x=f*e,a.ey.x=-f*c,a.ex.z=0,a.ex.y=-f*d,a.ey.y=f*b,a.ey.z=0,a.ez.x=0,a.ez.y=0,a.ez.z=0},box2d.b2Mat33.prototype.GetSymInverse33=function(a){var b=box2d.b2DotV3V3(this.ex,box2d.b2CrossV3V3(this.ey,this.ez,box2d.b2Vec3.s_t0));0!==b&&(b=1/b);var c=this.ex.x,d=this.ey.x,e=this.ez.x,f=this.ey.y,g=this.ez.y,h=this.ez.z;a.ex.x=b*(f*h-g*g),a.ex.y=b*(e*g-d*h),a.ex.z=b*(d*g-e*f),a.ey.x=a.ex.y,a.ey.y=b*(c*h-e*e),a.ey.z=b*(e*d-c*g),a.ez.x=a.ex.z,a.ez.y=a.ey.z,a.ez.z=b*(c*f-d*d)},box2d.b2MulM33V3=function(a,b,c){var d=b.x,e=b.y,f=b.z;return c.x=a.ex.x*d+a.ey.x*e+a.ez.x*f,c.y=a.ex.y*d+a.ey.y*e+a.ez.y*f,c.z=a.ex.z*d+a.ey.z*e+a.ez.z*f,c},box2d.b2MulM33XYZ=function(a,b,c,d,e){return e.x=a.ex.x*b+a.ey.x*c+a.ez.x*d,e.y=a.ex.y*b+a.ey.y*c+a.ez.y*d,e.z=a.ex.z*b+a.ey.z*c+a.ez.z*d,e},box2d.b2MulM33V2=function(a,b,c){var d=b.x,e=b.y;return c.x=a.ex.x*d+a.ey.x*e,c.y=a.ex.y*d+a.ey.y*e,c},box2d.b2MulM33XY=function(a,b,c,d){return d.x=a.ex.x*b+a.ey.x*c,d.y=a.ex.y*b+a.ey.y*c,d},box2d.b2Rot=function(a){a&&(this.angle=a,this.s=Math.sin(a),this.c=Math.cos(a))},box2d.b2Rot.prototype.angle=0,box2d.b2Rot.prototype.s=0,box2d.b2Rot.prototype.c=1,box2d.b2Rot.IDENTITY=new box2d.b2Rot,box2d.b2Rot.prototype.Clone=function(){return(new box2d.b2Rot).Copy(this)},box2d.b2Rot.prototype.Copy=function(a){return this.angle=a.angle,this.s=a.s,this.c=a.c,this},box2d.b2Rot.prototype.SetAngle=function(a){return this.angle!==a&&(this.angle=a,this.s=Math.sin(a),this.c=Math.cos(a)),this},box2d.b2Rot.prototype.SetAngleRadians=box2d.b2Rot.prototype.SetAngle,box2d.b2Rot.prototype.SetAngleDegrees=function(a){return this.SetAngle(box2d.b2DegToRad(a))},box2d.b2Rot.prototype.SetIdentity=function(){return this.angle=0,this.s=0,this.c=1,this},box2d.b2Rot.prototype.GetAngle=function(){return this.angle},box2d.b2Rot.prototype.GetAngleRadians=box2d.b2Rot.prototype.GetAngle,box2d.b2Rot.prototype.GetAngleDegrees=function(){return box2d.b2RadToDeg(this.GetAngle())},box2d.b2Rot.prototype.GetXAxis=function(a){return a.x=this.c,a.y=this.s,a},box2d.b2Rot.prototype.GetYAxis=function(a){return a.x=-this.s,a.y=this.c,a},box2d.b2MulRR=function(a,b,c){var d=a.c,e=a.s,f=b.c,g=b.s;for(c.s=e*f+d*g,c.c=d*f-e*g,c.angle=a.angle+b.angle;c.angle<-box2d.b2_pi;)c.angle+=box2d.b2_two_pi;for(;c.angle>=box2d.b2_pi;)c.angle-=box2d.b2_two_pi;return c},box2d.b2MulTRR=function(a,b,c){var d=a.c,e=a.s,f=b.c,g=b.s;for(c.s=d*g-e*f,c.c=d*f+e*g,c.angle=a.angle-b.angle;c.angle<-box2d.b2_pi;)c.angle+=box2d.b2_two_pi;for(;c.angle>=box2d.b2_pi;)c.angle-=box2d.b2_two_pi;return c},box2d.b2MulRV=function(a,b,c){var d=a.c,e=a.s,f=b.x,g=b.y;return c.x=d*f-e*g,c.y=e*f+d*g,c},box2d.b2MulTRV=function(a,b,c){var d=a.c,e=a.s,f=b.x,g=b.y;return c.x=d*f+e*g,c.y=-e*f+d*g,c},box2d.b2Transform=function(){this.p=new box2d.b2Vec2,this.q=new box2d.b2Rot},box2d.b2Transform.prototype.p=null,box2d.b2Transform.prototype.q=null,box2d.b2Transform.IDENTITY=new box2d.b2Transform,box2d.b2Transform.prototype.Clone=function(){return(new box2d.b2Transform).Copy(this)},box2d.b2Transform.prototype.Copy=function(a){return this.p.Copy(a.p),this.q.Copy(a.q),this},box2d.b2Transform.prototype.SetIdentity=function(){return this.p.SetZero(),this.q.SetIdentity(),this},box2d.b2Transform.prototype.SetPositionRotation=function(a,b){return this.p.Copy(a),this.q.Copy(b),this},box2d.b2Transform.prototype.SetPositionAngleRadians=function(a,b){return this.p.Copy(a),this.q.SetAngleRadians(b),this},box2d.b2Transform.prototype.SetPosition=function(a){return this.p.Copy(a),this},box2d.b2Transform.prototype.SetPositionXY=function(a,b){return this.p.SetXY(a,b),this},box2d.b2Transform.prototype.SetRotation=function(a){return this.q.Copy(a),this},box2d.b2Transform.prototype.SetRotationAngleRadians=function(a){return this.q.SetAngleRadians(a),this},box2d.b2Transform.prototype.GetPosition=function(){return this.p},box2d.b2Transform.prototype.GetRotation=function(){return this.q},box2d.b2Transform.prototype.GetRotationAngle=function(){return this.q.GetAngle()},box2d.b2Transform.prototype.GetRotationAngleRadians=box2d.b2Transform.prototype.GetRotationAngle,box2d.b2Transform.prototype.GetAngle=function(){return this.q.GetAngle()},box2d.b2Transform.prototype.GetAngleRadians=box2d.b2Transform.prototype.GetAngle,box2d.b2MulXV=function(a,b,c){var d=a.q.c,e=a.q.s,f=b.x,g=b.y;return c.x=d*f-e*g+a.p.x,c.y=e*f+d*g+a.p.y,c},box2d.b2MulTXV=function(a,b,c){var d=a.q.c,e=a.q.s,f=b.x-a.p.x,g=b.y-a.p.y;return c.x=d*f+e*g,c.y=-e*f+d*g,c},box2d.b2MulXX=function(a,b,c){return box2d.b2MulRR(a.q,b.q,c.q),box2d.b2AddVV(box2d.b2MulRV(a.q,b.p,c.p),a.p,c.p),c},box2d.b2MulTXX=function(a,b,c){return box2d.b2MulTRR(a.q,b.q,c.q),box2d.b2MulTRV(a.q,box2d.b2SubVV(b.p,a.p,c.p),c.p),c},box2d.b2Sweep=function(){this.localCenter=new box2d.b2Vec2,this.c0=new box2d.b2Vec2,this.c=new box2d.b2Vec2},box2d.b2Sweep.prototype.localCenter=null,box2d.b2Sweep.prototype.c0=null,box2d.b2Sweep.prototype.c=null,box2d.b2Sweep.prototype.a0=0,box2d.b2Sweep.prototype.a=0,box2d.b2Sweep.prototype.alpha0=0,box2d.b2Sweep.prototype.Clone=function(){return(new box2d.b2Sweep).Copy(this)},box2d.b2Sweep.prototype.Copy=function(a){return this.localCenter.Copy(a.localCenter),this.c0.Copy(a.c0),this.c.Copy(a.c),this.a0=a.a0,this.a=a.a,this.alpha0=a.alpha0,this},box2d.b2Sweep.prototype.GetTransform=function(a,b){var c=1-b;a.p.x=c*this.c0.x+b*this.c.x,a.p.y=c*this.c0.y+b*this.c.y;var d=c*this.a0+b*this.a;return a.q.SetAngleRadians(d),a.p.SelfSub(box2d.b2MulRV(a.q,this.localCenter,box2d.b2Vec2.s_t0)),a},box2d.b2Sweep.prototype.Advance=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.alpha0<1);var b=(a-this.alpha0)/(1-this.alpha0);this.c0.x+=b*(this.c.x-this.c0.x),this.c0.y+=b*(this.c.y-this.c0.y),this.a0+=b*(this.a-this.a0),this.alpha0=a},box2d.b2Sweep.prototype.Normalize=function(){var a=box2d.b2_two_pi*Math.floor(this.a0/box2d.b2_two_pi);this.a0-=a,this.a-=a},goog.provide("box2d.b2Controller"),goog.require("box2d.b2Settings"),box2d.b2ControllerEdge=function(){},box2d.b2ControllerEdge.prototype.controller=null,box2d.b2ControllerEdge.prototype.body=null,box2d.b2ControllerEdge.prototype.prevBody=null,box2d.b2ControllerEdge.prototype.nextBody=null,box2d.b2ControllerEdge.prototype.prevController=null,box2d.b2ControllerEdge.prototype.nextController=null,box2d.b2Controller=function(){},box2d.b2Controller.prototype.m_world=null,box2d.b2Controller.prototype.m_bodyList=null,box2d.b2Controller.prototype.m_bodyCount=0,box2d.b2Controller.prototype.m_prev=null,box2d.b2Controller.prototype.m_next=null,box2d.b2Controller.prototype.Step=function(){},box2d.b2Controller.prototype.Draw=function(){},box2d.b2Controller.prototype.GetNext=function(){return this.m_next +},box2d.b2Controller.prototype.GetPrev=function(){return this.m_prev},box2d.b2Controller.prototype.GetWorld=function(){return this.m_world},box2d.b2Controller.prototype.GetBodyList=function(){return this.m_bodyList},box2d.b2Controller.prototype.AddBody=function(a){var b=new box2d.b2ControllerEdge;b.body=a,b.controller=this,b.nextBody=this.m_bodyList,b.prevBody=null,this.m_bodyList&&(this.m_bodyList.prevBody=b),this.m_bodyList=b,++this.m_bodyCount,b.nextController=a.m_controllerList,b.prevController=null,a.m_controllerList&&(a.m_controllerList.prevController=b),a.m_controllerList=b,++a.m_controllerCount},box2d.b2Controller.prototype.RemoveBody=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_bodyCount>0);for(var b=this.m_bodyList;b&&b.body!==a;)b=b.nextBody;box2d.ENABLE_ASSERTS&&box2d.b2Assert(null!==b),b.prevBody&&(b.prevBody.nextBody=b.nextBody),b.nextBody&&(b.nextBody.prevBody=b.prevBody),this.m_bodyList===b&&(this.m_bodyList=b.nextBody),--this.m_bodyCount,b.nextController&&(b.nextController.prevController=b.prevController),b.prevController&&(b.prevController.nextController=b.nextController),a.m_controllerList===b&&(a.m_controllerList=b.nextController),--a.m_controllerCount},box2d.b2Controller.prototype.Clear=function(){for(;this.m_bodyList;)this.RemoveBody(this.m_bodyList.body);this.m_bodyCount=0},goog.provide("box2d.b2ConstantAccelController"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Controller"),goog.require("box2d.b2Math"),box2d.b2ConstantAccelController=function(){goog.base(this),this.A=new box2d.b2Vec2(0,0)},goog.inherits(box2d.b2ConstantAccelController,box2d.b2Controller),box2d.b2ConstantAccelController.prototype.A=null,box2d.b2ConstantAccelController.prototype.Step=function(a){for(var b=box2d.b2MulSV(a.dt,this.A,box2d.b2ConstantAccelController.prototype.Step.s_dtA),c=this.m_bodyList;c;c=c.nextBody){var d=c.body;d.IsAwake()&&d.SetLinearVelocity(box2d.b2AddVV(d.GetLinearVelocity(),b,box2d.b2Vec2.s_t0))}},box2d.b2ConstantAccelController.prototype.Step.s_dtA=new box2d.b2Vec2,goog.provide("box2d.b2Joint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Math"),box2d.b2JointType={e_unknownJoint:0,e_revoluteJoint:1,e_prismaticJoint:2,e_distanceJoint:3,e_pulleyJoint:4,e_mouseJoint:5,e_gearJoint:6,e_wheelJoint:7,e_weldJoint:8,e_frictionJoint:9,e_ropeJoint:10,e_motorJoint:11,e_areaJoint:12},goog.exportProperty(box2d.b2JointType,"e_unknownJoint",box2d.b2JointType.e_unknownJoint),goog.exportProperty(box2d.b2JointType,"e_revoluteJoint",box2d.b2JointType.e_revoluteJoint),goog.exportProperty(box2d.b2JointType,"e_prismaticJoint",box2d.b2JointType.e_prismaticJoint),goog.exportProperty(box2d.b2JointType,"e_distanceJoint",box2d.b2JointType.e_distanceJoint),goog.exportProperty(box2d.b2JointType,"e_pulleyJoint",box2d.b2JointType.e_pulleyJoint),goog.exportProperty(box2d.b2JointType,"e_mouseJoint",box2d.b2JointType.e_mouseJoint),goog.exportProperty(box2d.b2JointType,"e_gearJoint",box2d.b2JointType.e_gearJoint),goog.exportProperty(box2d.b2JointType,"e_wheelJoint",box2d.b2JointType.e_wheelJoint),goog.exportProperty(box2d.b2JointType,"e_weldJoint",box2d.b2JointType.e_weldJoint),goog.exportProperty(box2d.b2JointType,"e_frictionJoint",box2d.b2JointType.e_frictionJoint),goog.exportProperty(box2d.b2JointType,"e_ropeJoint",box2d.b2JointType.e_ropeJoint),goog.exportProperty(box2d.b2JointType,"e_motorJoint",box2d.b2JointType.e_motorJoint),goog.exportProperty(box2d.b2JointType,"e_areaJoint",box2d.b2JointType.e_areaJoint),box2d.b2LimitState={e_inactiveLimit:0,e_atLowerLimit:1,e_atUpperLimit:2,e_equalLimits:3},goog.exportProperty(box2d.b2LimitState,"e_inactiveLimit",box2d.b2LimitState.e_inactiveLimit),goog.exportProperty(box2d.b2LimitState,"e_atLowerLimit",box2d.b2LimitState.e_atLowerLimit),goog.exportProperty(box2d.b2LimitState,"e_atUpperLimit",box2d.b2LimitState.e_atUpperLimit),goog.exportProperty(box2d.b2LimitState,"e_equalLimits",box2d.b2LimitState.e_equalLimits),box2d.b2Jacobian=function(){this.linear=new box2d.b2Vec2},box2d.b2Jacobian.prototype.linear=null,box2d.b2Jacobian.prototype.angularA=0,box2d.b2Jacobian.prototype.angularB=0,box2d.b2Jacobian.prototype.SetZero=function(){return this.linear.SetZero(),this.angularA=0,this.angularB=0,this},box2d.b2Jacobian.prototype.Set=function(a,b,c){return this.linear.Copy(a),this.angularA=b,this.angularB=c,this},box2d.b2JointEdge=function(){},box2d.b2JointEdge.prototype.other=null,box2d.b2JointEdge.prototype.joint=null,box2d.b2JointEdge.prototype.prev=null,box2d.b2JointEdge.prototype.next=null,box2d.b2JointDef=function(a){this.type=a},box2d.b2JointDef.prototype.type=box2d.b2JointType.e_unknownJoint,box2d.b2JointDef.prototype.userData=null,box2d.b2JointDef.prototype.bodyA=null,box2d.b2JointDef.prototype.bodyB=null,box2d.b2JointDef.prototype.collideConnected=!1,box2d.b2Joint=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.bodyA!==a.bodyB),this.m_type=a.type,this.m_edgeA=new box2d.b2JointEdge,this.m_edgeB=new box2d.b2JointEdge,this.m_bodyA=a.bodyA,this.m_bodyB=a.bodyB,this.m_collideConnected=a.collideConnected,this.m_userData=a.userData},box2d.b2Joint.prototype.m_type=box2d.b2JointType.e_unknownJoint,box2d.b2Joint.prototype.m_prev=null,box2d.b2Joint.prototype.m_next=null,box2d.b2Joint.prototype.m_edgeA=null,box2d.b2Joint.prototype.m_edgeB=null,box2d.b2Joint.prototype.m_bodyA=null,box2d.b2Joint.prototype.m_bodyB=null,box2d.b2Joint.prototype.m_index=0,box2d.b2Joint.prototype.m_islandFlag=!1,box2d.b2Joint.prototype.m_collideConnected=!1,box2d.b2Joint.prototype.m_userData=null,box2d.b2Joint.prototype.GetAnchorA=function(a){return a.SetZero()},box2d.b2Joint.prototype.GetAnchorB=function(a){return a.SetZero()},box2d.b2Joint.prototype.GetReactionForce=function(a,b){return b.SetZero()},box2d.b2Joint.prototype.GetReactionTorque=function(){return 0},box2d.b2Joint.prototype.InitVelocityConstraints=function(){},box2d.b2Joint.prototype.SolveVelocityConstraints=function(){},box2d.b2Joint.prototype.SolvePositionConstraints=function(){return!1},box2d.b2Joint.prototype.GetType=function(){return this.m_type},box2d.b2Joint.prototype.GetBodyA=function(){return this.m_bodyA},box2d.b2Joint.prototype.GetBodyB=function(){return this.m_bodyB},box2d.b2Joint.prototype.GetNext=function(){return this.m_next},box2d.b2Joint.prototype.GetUserData=function(){return this.m_userData},box2d.b2Joint.prototype.SetUserData=function(a){this.m_userData=a},box2d.b2Joint.prototype.GetCollideConnected=function(){return this.m_collideConnected},box2d.b2Joint.prototype.Dump=function(){box2d.DEBUG&&box2d.b2Log("// Dump is not supported for this joint type.\n")},box2d.b2Joint.prototype.IsActive=function(){return this.m_bodyA.IsActive()&&this.m_bodyB.IsActive()},box2d.b2Joint.prototype.ShiftOrigin=function(){},goog.provide("box2d.b2RevoluteJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2RevoluteJointDef=function(){goog.base(this,box2d.b2JointType.e_revoluteJoint),this.localAnchorA=new box2d.b2Vec2(0,0),this.localAnchorB=new box2d.b2Vec2(0,0)},goog.inherits(box2d.b2RevoluteJointDef,box2d.b2JointDef),box2d.b2RevoluteJointDef.prototype.localAnchorA=null,box2d.b2RevoluteJointDef.prototype.localAnchorB=null,box2d.b2RevoluteJointDef.prototype.referenceAngle=0,box2d.b2RevoluteJointDef.prototype.enableLimit=!1,box2d.b2RevoluteJointDef.prototype.lowerAngle=0,box2d.b2RevoluteJointDef.prototype.upperAngle=0,box2d.b2RevoluteJointDef.prototype.enableMotor=!1,box2d.b2RevoluteJointDef.prototype.motorSpeed=0,box2d.b2RevoluteJointDef.prototype.maxMotorTorque=0,box2d.b2RevoluteJointDef.prototype.Initialize=function(a,b,c){this.bodyA=a,this.bodyB=b,this.bodyA.GetLocalPoint(c,this.localAnchorA),this.bodyB.GetLocalPoint(c,this.localAnchorB),this.referenceAngle=this.bodyB.GetAngleRadians()-this.bodyA.GetAngleRadians()},box2d.b2RevoluteJoint=function(a){goog.base(this,a),this.m_localAnchorA=new box2d.b2Vec2,this.m_localAnchorB=new box2d.b2Vec2,this.m_impulse=new box2d.b2Vec3,this.m_rA=new box2d.b2Vec2,this.m_rB=new box2d.b2Vec2,this.m_localCenterA=new box2d.b2Vec2,this.m_localCenterB=new box2d.b2Vec2,this.m_mass=new box2d.b2Mat33,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_lalcA=new box2d.b2Vec2,this.m_lalcB=new box2d.b2Vec2,this.m_K=new box2d.b2Mat22,this.m_localAnchorA.Copy(a.localAnchorA),this.m_localAnchorB.Copy(a.localAnchorB),this.m_referenceAngle=a.referenceAngle,this.m_impulse.SetZero(),this.m_motorImpulse=0,this.m_lowerAngle=a.lowerAngle,this.m_upperAngle=a.upperAngle,this.m_maxMotorTorque=a.maxMotorTorque,this.m_motorSpeed=a.motorSpeed,this.m_enableLimit=a.enableLimit,this.m_enableMotor=a.enableMotor,this.m_limitState=box2d.b2LimitState.e_inactiveLimit},goog.inherits(box2d.b2RevoluteJoint,box2d.b2Joint),box2d.b2RevoluteJoint.prototype.m_localAnchorA=null,box2d.b2RevoluteJoint.prototype.m_localAnchorB=null,box2d.b2RevoluteJoint.prototype.m_impulse=null,box2d.b2RevoluteJoint.prototype.m_motorImpulse=0,box2d.b2RevoluteJoint.prototype.m_enableMotor=!1,box2d.b2RevoluteJoint.prototype.m_maxMotorTorque=0,box2d.b2RevoluteJoint.prototype.m_motorSpeed=0,box2d.b2RevoluteJoint.prototype.m_enableLimit=!1,box2d.b2RevoluteJoint.prototype.m_referenceAngle=0,box2d.b2RevoluteJoint.prototype.m_lowerAngle=0,box2d.b2RevoluteJoint.prototype.m_upperAngle=0,box2d.b2RevoluteJoint.prototype.m_indexA=0,box2d.b2RevoluteJoint.prototype.m_indexB=0,box2d.b2RevoluteJoint.prototype.m_rA=null,box2d.b2RevoluteJoint.prototype.m_rB=null,box2d.b2RevoluteJoint.prototype.m_localCenterA=null,box2d.b2RevoluteJoint.prototype.m_localCenterB=null,box2d.b2RevoluteJoint.prototype.m_invMassA=0,box2d.b2RevoluteJoint.prototype.m_invMassB=0,box2d.b2RevoluteJoint.prototype.m_invIA=0,box2d.b2RevoluteJoint.prototype.m_invIB=0,box2d.b2RevoluteJoint.prototype.m_mass=null,box2d.b2RevoluteJoint.prototype.m_motorMass=0,box2d.b2RevoluteJoint.prototype.m_limitState=box2d.b2LimitState.e_inactiveLimit,box2d.b2RevoluteJoint.prototype.m_qA=null,box2d.b2RevoluteJoint.prototype.m_qB=null,box2d.b2RevoluteJoint.prototype.m_lalcA=null,box2d.b2RevoluteJoint.prototype.m_lalcB=null,box2d.b2RevoluteJoint.prototype.m_K=null,box2d.b2RevoluteJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexA].a,c=a.velocities[this.m_indexA].v,d=a.velocities[this.m_indexA].w,e=a.positions[this.m_indexB].a,f=a.velocities[this.m_indexB].v,g=a.velocities[this.m_indexB].w,h=this.m_qA.SetAngleRadians(b),i=this.m_qB.SetAngleRadians(e);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),box2d.b2MulRV(h,this.m_lalcA,this.m_rA),box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),box2d.b2MulRV(i,this.m_lalcB,this.m_rB);var j=this.m_invMassA,k=this.m_invMassB,l=this.m_invIA,m=this.m_invIB,n=l+m===0;if(this.m_mass.ex.x=j+k+this.m_rA.y*this.m_rA.y*l+this.m_rB.y*this.m_rB.y*m,this.m_mass.ey.x=-this.m_rA.y*this.m_rA.x*l-this.m_rB.y*this.m_rB.x*m,this.m_mass.ez.x=-this.m_rA.y*l-this.m_rB.y*m,this.m_mass.ex.y=this.m_mass.ey.x,this.m_mass.ey.y=j+k+this.m_rA.x*this.m_rA.x*l+this.m_rB.x*this.m_rB.x*m,this.m_mass.ez.y=this.m_rA.x*l+this.m_rB.x*m,this.m_mass.ex.z=this.m_mass.ez.x,this.m_mass.ey.z=this.m_mass.ez.y,this.m_mass.ez.z=l+m,this.m_motorMass=l+m,this.m_motorMass>0&&(this.m_motorMass=1/this.m_motorMass),(this.m_enableMotor===!1||n)&&(this.m_motorImpulse=0),this.m_enableLimit&&n===!1){var o=e-b-this.m_referenceAngle;box2d.b2Abs(this.m_upperAngle-this.m_lowerAngle)<2*box2d.b2_angularSlop?this.m_limitState=box2d.b2LimitState.e_equalLimits:o<=this.m_lowerAngle?(this.m_limitState!==box2d.b2LimitState.e_atLowerLimit&&(this.m_impulse.z=0),this.m_limitState=box2d.b2LimitState.e_atLowerLimit):o>=this.m_upperAngle?(this.m_limitState!==box2d.b2LimitState.e_atUpperLimit&&(this.m_impulse.z=0),this.m_limitState=box2d.b2LimitState.e_atUpperLimit):(this.m_limitState=box2d.b2LimitState.e_inactiveLimit,this.m_impulse.z=0)}else this.m_limitState=box2d.b2LimitState.e_inactiveLimit;if(a.step.warmStarting){this.m_impulse.SelfMul(a.step.dtRatio),this.m_motorImpulse*=a.step.dtRatio;var p=box2d.b2RevoluteJoint.prototype.InitVelocityConstraints.s_P.SetXY(this.m_impulse.x,this.m_impulse.y);c.SelfMulSub(j,p),d-=l*(box2d.b2CrossVV(this.m_rA,p)+this.m_motorImpulse+this.m_impulse.z),f.SelfMulAdd(k,p),g+=m*(box2d.b2CrossVV(this.m_rB,p)+this.m_motorImpulse+this.m_impulse.z)}else this.m_impulse.SetZero(),this.m_motorImpulse=0;a.velocities[this.m_indexA].w=d,a.velocities[this.m_indexB].w=g},box2d.b2RevoluteJoint.prototype.InitVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=this.m_invMassA,g=this.m_invMassB,h=this.m_invIA,i=this.m_invIB,j=h+i===0;if(this.m_enableMotor&&this.m_limitState!==box2d.b2LimitState.e_equalLimits&&j===!1){var k=e-c-this.m_motorSpeed,l=-this.m_motorMass*k,m=this.m_motorImpulse,n=a.step.dt*this.m_maxMotorTorque;this.m_motorImpulse=box2d.b2Clamp(this.m_motorImpulse+l,-n,n),l=this.m_motorImpulse-m,c-=h*l,e+=i*l}if(this.m_enableLimit&&this.m_limitState!==box2d.b2LimitState.e_inactiveLimit&&j===!1){var o=box2d.b2SubVV(box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2Vec2.s_t1),box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_Cdot1),p=e-c,l=this.m_mass.Solve33(o.x,o.y,p,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_impulse3).SelfNeg();if(this.m_limitState===box2d.b2LimitState.e_equalLimits)this.m_impulse.SelfAdd(l);else if(this.m_limitState===box2d.b2LimitState.e_atLowerLimit){var q=this.m_impulse.z+l.z;if(0>q){var r=-o.x+this.m_impulse.z*this.m_mass.ez.x,s=-o.y+this.m_impulse.z*this.m_mass.ez.y,t=this.m_mass.Solve22(r,s,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_reduced);l.x=t.x,l.y=t.y,l.z=-this.m_impulse.z,this.m_impulse.x+=t.x,this.m_impulse.y+=t.y,this.m_impulse.z=0}else this.m_impulse.SelfAdd(l)}else if(this.m_limitState===box2d.b2LimitState.e_atUpperLimit){var q=this.m_impulse.z+l.z;if(q>0){var r=-o.x+this.m_impulse.z*this.m_mass.ez.x,s=-o.y+this.m_impulse.z*this.m_mass.ez.y,t=this.m_mass.Solve22(r,s,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_reduced);l.x=t.x,l.y=t.y,l.z=-this.m_impulse.z,this.m_impulse.x+=t.x,this.m_impulse.y+=t.y,this.m_impulse.z=0}else this.m_impulse.SelfAdd(l)}var u=box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_P.SetXY(l.x,l.y);b.SelfMulSub(f,u),c-=h*(box2d.b2CrossVV(this.m_rA,u)+l.z),d.SelfMulAdd(g,u),e+=i*(box2d.b2CrossVV(this.m_rB,u)+l.z)}else{var k=box2d.b2SubVV(box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2Vec2.s_t1),box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_Cdot),l=this.m_mass.Solve22(-k.x,-k.y,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_impulse2);this.m_impulse.x+=l.x,this.m_impulse.y+=l.y,b.SelfMulSub(f,l),c-=h*box2d.b2CrossVV(this.m_rA,l),d.SelfMulAdd(g,l),e+=i*box2d.b2CrossVV(this.m_rB,l)}a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_Cdot=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_Cdot1=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_impulse3=new box2d.b2Vec3,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_reduced=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.SolveVelocityConstraints.s_impulse2=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.SolvePositionConstraints=function(a){var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.positions[this.m_indexB].c,e=a.positions[this.m_indexB].a,f=this.m_qA.SetAngleRadians(c),g=this.m_qB.SetAngleRadians(e),h=0,i=0,j=this.m_invIA+this.m_invIB===0;if(this.m_enableLimit&&this.m_limitState!==box2d.b2LimitState.e_inactiveLimit&&j===!1){var k=e-c-this.m_referenceAngle,l=0;if(this.m_limitState===box2d.b2LimitState.e_equalLimits){var m=box2d.b2Clamp(k-this.m_lowerAngle,-box2d.b2_maxAngularCorrection,box2d.b2_maxAngularCorrection);l=-this.m_motorMass*m,h=box2d.b2Abs(m)}else if(this.m_limitState===box2d.b2LimitState.e_atLowerLimit){var m=k-this.m_lowerAngle;h=-m,m=box2d.b2Clamp(m+box2d.b2_angularSlop,-box2d.b2_maxAngularCorrection,0),l=-this.m_motorMass*m}else if(this.m_limitState===box2d.b2LimitState.e_atUpperLimit){var m=k-this.m_upperAngle;h=m,m=box2d.b2Clamp(m-box2d.b2_angularSlop,0,box2d.b2_maxAngularCorrection),l=-this.m_motorMass*m}c-=this.m_invIA*l,e+=this.m_invIB*l}f.SetAngleRadians(c),g.SetAngleRadians(e),box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var n=box2d.b2MulRV(f,this.m_lalcA,this.m_rA);box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var o=box2d.b2MulRV(g,this.m_lalcB,this.m_rB),m=box2d.b2SubVV(box2d.b2AddVV(d,o,box2d.b2Vec2.s_t0),box2d.b2AddVV(b,n,box2d.b2Vec2.s_t1),box2d.b2RevoluteJoint.prototype.SolvePositionConstraints.s_C);i=m.GetLength();var p=this.m_invMassA,q=this.m_invMassB,r=this.m_invIA,s=this.m_invIB,t=this.m_K;t.ex.x=p+q+r*n.y*n.y+s*o.y*o.y,t.ex.y=-r*n.x*n.y-s*o.x*o.y,t.ey.x=t.ex.y,t.ey.y=p+q+r*n.x*n.x+s*o.x*o.x;var u=t.Solve(m.x,m.y,box2d.b2RevoluteJoint.prototype.SolvePositionConstraints.s_impulse).SelfNeg();return b.SelfMulSub(p,u),c-=r*box2d.b2CrossVV(n,u),d.SelfMulAdd(q,u),e+=s*box2d.b2CrossVV(o,u),a.positions[this.m_indexA].a=c,a.positions[this.m_indexB].a=e,i<=box2d.b2_linearSlop&&h<=box2d.b2_angularSlop},box2d.b2RevoluteJoint.prototype.SolvePositionConstraints.s_C=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.SolvePositionConstraints.s_impulse=new box2d.b2Vec2,box2d.b2RevoluteJoint.prototype.GetAnchorA=function(a){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,a)},box2d.b2RevoluteJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,a)},box2d.b2RevoluteJoint.prototype.GetReactionForce=function(a,b){return b.SetXY(a*this.m_impulse.x,a*this.m_impulse.y)},box2d.b2RevoluteJoint.prototype.GetReactionTorque=function(a){return a*this.m_impulse.z},box2d.b2RevoluteJoint.prototype.GetLocalAnchorA=function(a){return a.Copy(this.m_localAnchorA)},box2d.b2RevoluteJoint.prototype.GetLocalAnchorB=function(a){return a.Copy(this.m_localAnchorB)},box2d.b2RevoluteJoint.prototype.GetReferenceAngle=function(){return this.m_referenceAngle},box2d.b2RevoluteJoint.prototype.GetJointAngleRadians=function(){return this.m_bodyB.m_sweep.a-this.m_bodyA.m_sweep.a-this.m_referenceAngle},box2d.b2RevoluteJoint.prototype.GetJointSpeed=function(){return this.m_bodyB.m_angularVelocity-this.m_bodyA.m_angularVelocity},box2d.b2RevoluteJoint.prototype.IsMotorEnabled=function(){return this.m_enableMotor},box2d.b2RevoluteJoint.prototype.EnableMotor=function(a){this.m_enableMotor!==a&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableMotor=a)},box2d.b2RevoluteJoint.prototype.GetMotorTorque=function(a){return a*this.m_motorImpulse},box2d.b2RevoluteJoint.prototype.GetMotorSpeed=function(){return this.m_motorSpeed},box2d.b2RevoluteJoint.prototype.SetMaxMotorTorque=function(a){this.m_maxMotorTorque=a},box2d.b2RevoluteJoint.prototype.GetMaxMotorTorque=function(){return this.m_maxMotorTorque},box2d.b2RevoluteJoint.prototype.IsLimitEnabled=function(){return this.m_enableLimit},box2d.b2RevoluteJoint.prototype.EnableLimit=function(a){a!==this.m_enableLimit&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableLimit=a,this.m_impulse.z=0)},box2d.b2RevoluteJoint.prototype.GetLowerLimit=function(){return this.m_lowerAngle},box2d.b2RevoluteJoint.prototype.GetUpperLimit=function(){return this.m_upperAngle},box2d.b2RevoluteJoint.prototype.SetLimits=function(a,b){(a!==this.m_lowerAngle||b!==this.m_upperAngle)&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_impulse.z=0,this.m_lowerAngle=a,this.m_upperAngle=b)},box2d.b2RevoluteJoint.prototype.SetMotorSpeed=function(a){this.m_motorSpeed!==a&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_motorSpeed=a)},box2d.b2RevoluteJoint.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_bodyA.m_islandIndex,b=this.m_bodyB.m_islandIndex;box2d.b2Log(" /*box2d.b2RevoluteJointDef*/ var jd = new box2d.b2RevoluteJointDef();\n"),box2d.b2Log(" jd.bodyA = bodies[%d];\n",a),box2d.b2Log(" jd.bodyB = bodies[%d];\n",b),box2d.b2Log(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),box2d.b2Log(" jd.localAnchorA.SetXY(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),box2d.b2Log(" jd.localAnchorB.SetXY(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),box2d.b2Log(" jd.referenceAngle = %.15f;\n",this.m_referenceAngle),box2d.b2Log(" jd.enableLimit = %s;\n",this.m_enableLimit?"true":"false"),box2d.b2Log(" jd.lowerAngle = %.15f;\n",this.m_lowerAngle),box2d.b2Log(" jd.upperAngle = %.15f;\n",this.m_upperAngle),box2d.b2Log(" jd.enableMotor = %s;\n",this.m_enableMotor?"true":"false"),box2d.b2Log(" jd.motorSpeed = %.15f;\n",this.m_motorSpeed),box2d.b2Log(" jd.maxMotorTorque = %.15f;\n",this.m_maxMotorTorque),box2d.b2Log(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)}},goog.provide("box2d.b2PrismaticJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2PrismaticJointDef=function(){goog.base(this,box2d.b2JointType.e_prismaticJoint),this.localAnchorA=new box2d.b2Vec2,this.localAnchorB=new box2d.b2Vec2,this.localAxisA=new box2d.b2Vec2(1,0)},goog.inherits(box2d.b2PrismaticJointDef,box2d.b2JointDef),box2d.b2PrismaticJointDef.prototype.localAnchorA=null,box2d.b2PrismaticJointDef.prototype.localAnchorB=null,box2d.b2PrismaticJointDef.prototype.localAxisA=null,box2d.b2PrismaticJointDef.prototype.referenceAngle=0,box2d.b2PrismaticJointDef.prototype.enableLimit=!1,box2d.b2PrismaticJointDef.prototype.lowerTranslation=0,box2d.b2PrismaticJointDef.prototype.upperTranslation=0,box2d.b2PrismaticJointDef.prototype.enableMotor=!1,box2d.b2PrismaticJointDef.prototype.maxMotorForce=0,box2d.b2PrismaticJointDef.prototype.motorSpeed=0,box2d.b2PrismaticJointDef.prototype.Initialize=function(a,b,c,d){this.bodyA=a,this.bodyB=b,this.bodyA.GetLocalPoint(c,this.localAnchorA),this.bodyB.GetLocalPoint(c,this.localAnchorB),this.bodyA.GetLocalVector(d,this.localAxisA),this.referenceAngle=this.bodyB.GetAngleRadians()-this.bodyA.GetAngleRadians()},box2d.b2PrismaticJoint=function(a){goog.base(this,a),this.m_localAnchorA=a.localAnchorA.Clone(),this.m_localAnchorB=a.localAnchorB.Clone(),this.m_localXAxisA=a.localAxisA.Clone().SelfNormalize(),this.m_localYAxisA=box2d.b2CrossOneV(this.m_localXAxisA,new box2d.b2Vec2),this.m_referenceAngle=a.referenceAngle,this.m_impulse=new box2d.b2Vec3(0,0,0),this.m_lowerTranslation=a.lowerTranslation,this.m_upperTranslation=a.upperTranslation,this.m_maxMotorForce=a.maxMotorForce,this.m_motorSpeed=a.motorSpeed,this.m_enableLimit=a.enableLimit,this.m_enableMotor=a.enableMotor,this.m_localCenterA=new box2d.b2Vec2,this.m_localCenterB=new box2d.b2Vec2,this.m_axis=new box2d.b2Vec2(0,0),this.m_perp=new box2d.b2Vec2(0,0),this.m_K=new box2d.b2Mat33,this.m_K3=new box2d.b2Mat33,this.m_K2=new box2d.b2Mat22,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_lalcA=new box2d.b2Vec2,this.m_lalcB=new box2d.b2Vec2,this.m_rA=new box2d.b2Vec2,this.m_rB=new box2d.b2Vec2},goog.inherits(box2d.b2PrismaticJoint,box2d.b2Joint),box2d.b2PrismaticJoint.prototype.m_localAnchorA=null,box2d.b2PrismaticJoint.prototype.m_localAnchorB=null,box2d.b2PrismaticJoint.prototype.m_localXAxisA=null,box2d.b2PrismaticJoint.prototype.m_localYAxisA=null,box2d.b2PrismaticJoint.prototype.m_referenceAngle=0,box2d.b2PrismaticJoint.prototype.m_impulse=null,box2d.b2PrismaticJoint.prototype.m_motorImpulse=0,box2d.b2PrismaticJoint.prototype.m_lowerTranslation=0,box2d.b2PrismaticJoint.prototype.m_upperTranslation=0,box2d.b2PrismaticJoint.prototype.m_maxMotorForce=0,box2d.b2PrismaticJoint.prototype.m_motorSpeed=0,box2d.b2PrismaticJoint.prototype.m_enableLimit=!1,box2d.b2PrismaticJoint.prototype.m_enableMotor=!1,box2d.b2PrismaticJoint.prototype.m_limitState=box2d.b2LimitState.e_inactiveLimit,box2d.b2PrismaticJoint.prototype.m_indexA=0,box2d.b2PrismaticJoint.prototype.m_indexB=0,box2d.b2PrismaticJoint.prototype.m_localCenterA=null,box2d.b2PrismaticJoint.prototype.m_localCenterB=null,box2d.b2PrismaticJoint.prototype.m_invMassA=0,box2d.b2PrismaticJoint.prototype.m_invMassB=0,box2d.b2PrismaticJoint.prototype.m_invIA=0,box2d.b2PrismaticJoint.prototype.m_invIB=0,box2d.b2PrismaticJoint.prototype.m_axis=null,box2d.b2PrismaticJoint.prototype.m_perp=null,box2d.b2PrismaticJoint.prototype.m_s1=0,box2d.b2PrismaticJoint.prototype.m_s2=0,box2d.b2PrismaticJoint.prototype.m_a1=0,box2d.b2PrismaticJoint.prototype.m_a2=0,box2d.b2PrismaticJoint.prototype.m_K=null,box2d.b2PrismaticJoint.prototype.m_K3=null,box2d.b2PrismaticJoint.prototype.m_K2=null,box2d.b2PrismaticJoint.prototype.m_motorMass=0,box2d.b2PrismaticJoint.prototype.m_qA=null,box2d.b2PrismaticJoint.prototype.m_qB=null,box2d.b2PrismaticJoint.prototype.m_lalcA=null,box2d.b2PrismaticJoint.prototype.m_lalcB=null,box2d.b2PrismaticJoint.prototype.m_rA=null,box2d.b2PrismaticJoint.prototype.m_rB=null,box2d.b2PrismaticJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.velocities[this.m_indexA].v,e=a.velocities[this.m_indexA].w,f=a.positions[this.m_indexB].c,g=a.positions[this.m_indexB].a,h=a.velocities[this.m_indexB].v,i=a.velocities[this.m_indexB].w,j=this.m_qA.SetAngleRadians(c),k=this.m_qB.SetAngleRadians(g);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var l=box2d.b2MulRV(j,this.m_lalcA,this.m_rA);box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var m=box2d.b2MulRV(k,this.m_lalcB,this.m_rB),n=box2d.b2AddVV(box2d.b2SubVV(f,b,box2d.b2Vec2.s_t0),box2d.b2SubVV(m,l,box2d.b2Vec2.s_t1),box2d.b2PrismaticJoint.prototype.InitVelocityConstraints.s_d),o=this.m_invMassA,p=this.m_invMassB,q=this.m_invIA,r=this.m_invIB;if(box2d.b2MulRV(j,this.m_localXAxisA,this.m_axis),this.m_a1=box2d.b2CrossVV(box2d.b2AddVV(n,l,box2d.b2Vec2.s_t0),this.m_axis),this.m_a2=box2d.b2CrossVV(m,this.m_axis),this.m_motorMass=o+p+q*this.m_a1*this.m_a1+r*this.m_a2*this.m_a2,this.m_motorMass>0&&(this.m_motorMass=1/this.m_motorMass),box2d.b2MulRV(j,this.m_localYAxisA,this.m_perp),this.m_s1=box2d.b2CrossVV(box2d.b2AddVV(n,l,box2d.b2Vec2.s_t0),this.m_perp),this.m_s2=box2d.b2CrossVV(m,this.m_perp),this.m_K.ex.x=o+p+q*this.m_s1*this.m_s1+r*this.m_s2*this.m_s2,this.m_K.ex.y=q*this.m_s1+r*this.m_s2,this.m_K.ex.z=q*this.m_s1*this.m_a1+r*this.m_s2*this.m_a2,this.m_K.ey.x=this.m_K.ex.y,this.m_K.ey.y=q+r,0===this.m_K.ey.y&&(this.m_K.ey.y=1),this.m_K.ey.z=q*this.m_a1+r*this.m_a2,this.m_K.ez.x=this.m_K.ex.z,this.m_K.ez.y=this.m_K.ey.z,this.m_K.ez.z=o+p+q*this.m_a1*this.m_a1+r*this.m_a2*this.m_a2,this.m_enableLimit){var s=box2d.b2DotVV(this.m_axis,n);box2d.b2Abs(this.m_upperTranslation-this.m_lowerTranslation)<2*box2d.b2_linearSlop?this.m_limitState=box2d.b2LimitState.e_equalLimits:s<=this.m_lowerTranslation?this.m_limitState!==box2d.b2LimitState.e_atLowerLimit&&(this.m_limitState=box2d.b2LimitState.e_atLowerLimit,this.m_impulse.z=0):s>=this.m_upperTranslation?this.m_limitState!==box2d.b2LimitState.e_atUpperLimit&&(this.m_limitState=box2d.b2LimitState.e_atUpperLimit,this.m_impulse.z=0):(this.m_limitState=box2d.b2LimitState.e_inactiveLimit,this.m_impulse.z=0)}else this.m_limitState=box2d.b2LimitState.e_inactiveLimit,this.m_impulse.z=0;if(this.m_enableMotor===!1&&(this.m_motorImpulse=0),a.step.warmStarting){this.m_impulse.SelfMul(a.step.dtRatio),this.m_motorImpulse*=a.step.dtRatio;var t=box2d.b2AddVV(box2d.b2MulSV(this.m_impulse.x,this.m_perp,box2d.b2Vec2.s_t0),box2d.b2MulSV(this.m_motorImpulse+this.m_impulse.z,this.m_axis,box2d.b2Vec2.s_t1),box2d.b2PrismaticJoint.prototype.InitVelocityConstraints.s_P),u=this.m_impulse.x*this.m_s1+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a1,v=this.m_impulse.x*this.m_s2+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a2;d.SelfMulSub(o,t),e-=q*u,h.SelfMulAdd(p,t),i+=r*v}else this.m_impulse.SetZero(),this.m_motorImpulse=0;a.velocities[this.m_indexA].w=e,a.velocities[this.m_indexB].w=i},box2d.b2PrismaticJoint.prototype.InitVelocityConstraints.s_d=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.InitVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=this.m_invMassA,g=this.m_invMassB,h=this.m_invIA,i=this.m_invIB;if(this.m_enableMotor&&this.m_limitState!==box2d.b2LimitState.e_equalLimits){var j=box2d.b2DotVV(this.m_axis,box2d.b2SubVV(d,b,box2d.b2Vec2.s_t0))+this.m_a2*e-this.m_a1*c,k=this.m_motorMass*(this.m_motorSpeed-j),l=this.m_motorImpulse,m=a.step.dt*this.m_maxMotorForce;this.m_motorImpulse=box2d.b2Clamp(this.m_motorImpulse+k,-m,m),k=this.m_motorImpulse-l;var n=box2d.b2MulSV(k,this.m_axis,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_P),o=k*this.m_a1,p=k*this.m_a2;b.SelfMulSub(f,n),c-=h*o,d.SelfMulAdd(g,n),e+=i*p}var q=box2d.b2DotVV(this.m_perp,box2d.b2SubVV(d,b,box2d.b2Vec2.s_t0))+this.m_s2*e-this.m_s1*c,r=e-c;if(this.m_enableLimit&&this.m_limitState!==box2d.b2LimitState.e_inactiveLimit){var s=box2d.b2DotVV(this.m_axis,box2d.b2SubVV(d,b,box2d.b2Vec2.s_t0))+this.m_a2*e-this.m_a1*c,t=box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_f1.Copy(this.m_impulse),u=this.m_K.Solve33(-q,-r,-s,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_df3);this.m_impulse.SelfAdd(u),this.m_limitState===box2d.b2LimitState.e_atLowerLimit?this.m_impulse.z=box2d.b2Max(this.m_impulse.z,0):this.m_limitState===box2d.b2LimitState.e_atUpperLimit&&(this.m_impulse.z=box2d.b2Min(this.m_impulse.z,0));var v=-q-(this.m_impulse.z-t.z)*this.m_K.ez.x,w=-r-(this.m_impulse.z-t.z)*this.m_K.ez.y,x=this.m_K.Solve22(v,w,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_f2r);x.x+=t.x,x.y+=t.y,this.m_impulse.x=x.x,this.m_impulse.y=x.y,u.x=this.m_impulse.x-t.x,u.y=this.m_impulse.y-t.y,u.z=this.m_impulse.z-t.z;var n=box2d.b2AddVV(box2d.b2MulSV(u.x,this.m_perp,box2d.b2Vec2.s_t0),box2d.b2MulSV(u.z,this.m_axis,box2d.b2Vec2.s_t1),box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_P),o=u.x*this.m_s1+u.y+u.z*this.m_a1,p=u.x*this.m_s2+u.y+u.z*this.m_a2;b.SelfMulSub(f,n),c-=h*o,d.SelfMulAdd(g,n),e+=i*p}else{var u=this.m_K.Solve22(-q,-r,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_df2);this.m_impulse.x+=u.x,this.m_impulse.y+=u.y;var n=box2d.b2MulSV(u.x,this.m_perp,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_P),o=u.x*this.m_s1+u.y,p=u.x*this.m_s2+u.y;b.SelfMulSub(f,n),c-=h*o,d.SelfMulAdd(g,n),e+=i*p}a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_f2r=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_f1=new box2d.b2Vec3,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_df3=new box2d.b2Vec3,box2d.b2PrismaticJoint.prototype.SolveVelocityConstraints.s_df2=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.SolvePositionConstraints=function(a){var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.positions[this.m_indexB].c,e=a.positions[this.m_indexB].a,f=this.m_qA.SetAngleRadians(c),g=this.m_qB.SetAngleRadians(e),h=this.m_invMassA,i=this.m_invMassB,j=this.m_invIA,k=this.m_invIB,l=box2d.b2MulRV(f,this.m_lalcA,this.m_rA),m=box2d.b2MulRV(g,this.m_lalcB,this.m_rB),n=box2d.b2SubVV(box2d.b2AddVV(d,m,box2d.b2Vec2.s_t0),box2d.b2AddVV(b,l,box2d.b2Vec2.s_t1),box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_d),o=box2d.b2MulRV(f,this.m_localXAxisA,this.m_axis),p=box2d.b2CrossVV(box2d.b2AddVV(n,l,box2d.b2Vec2.s_t0),o),q=box2d.b2CrossVV(m,o),r=box2d.b2MulRV(f,this.m_localYAxisA,this.m_perp),s=box2d.b2CrossVV(box2d.b2AddVV(n,l,box2d.b2Vec2.s_t0),r),t=box2d.b2CrossVV(m,r),u=box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_impulse,v=box2d.b2DotVV(r,n),w=e-c-this.m_referenceAngle,x=box2d.b2Abs(v),y=box2d.b2Abs(w),z=!1,A=0; +if(this.m_enableLimit){var B=box2d.b2DotVV(o,n);box2d.b2Abs(this.m_upperTranslation-this.m_lowerTranslation)<2*box2d.b2_linearSlop?(A=box2d.b2Clamp(B,-box2d.b2_maxLinearCorrection,box2d.b2_maxLinearCorrection),x=box2d.b2Max(x,box2d.b2Abs(B)),z=!0):B<=this.m_lowerTranslation?(A=box2d.b2Clamp(B-this.m_lowerTranslation+box2d.b2_linearSlop,-box2d.b2_maxLinearCorrection,0),x=box2d.b2Max(x,this.m_lowerTranslation-B),z=!0):B>=this.m_upperTranslation&&(A=box2d.b2Clamp(B-this.m_upperTranslation-box2d.b2_linearSlop,0,box2d.b2_maxLinearCorrection),x=box2d.b2Max(x,B-this.m_upperTranslation),z=!0)}if(z){var C=h+i+j*s*s+k*t*t,D=j*s+k*t,E=j*s*p+k*t*q,F=j+k;0===F&&(F=1);var G=j*p+k*q,H=h+i+j*p*p+k*q*q,I=this.m_K3;I.ex.SetXYZ(C,D,E),I.ey.SetXYZ(D,F,G),I.ez.SetXYZ(E,G,H),u=I.Solve33(-v,-w,-A,u)}else{var C=h+i+j*s*s+k*t*t,D=j*s+k*t,F=j+k;0===F&&(F=1);var J=this.m_K2;J.ex.SetXY(C,D),J.ey.SetXY(D,F);var K=J.Solve(-v,-w,box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_impulse1);u.x=K.x,u.y=K.y,u.z=0}var L=box2d.b2AddVV(box2d.b2MulSV(u.x,r,box2d.b2Vec2.s_t0),box2d.b2MulSV(u.z,o,box2d.b2Vec2.s_t1),box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_P),M=u.x*s+u.y+u.z*p,N=u.x*t+u.y+u.z*q;return b.SelfMulSub(h,L),c-=j*M,d.SelfMulAdd(i,L),e+=k*N,a.positions[this.m_indexA].a=c,a.positions[this.m_indexB].a=e,x<=box2d.b2_linearSlop&&y<=box2d.b2_angularSlop},box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_d=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_impulse=new box2d.b2Vec3,box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_impulse1=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.SolvePositionConstraints.s_P=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.GetAnchorA=function(a){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,a)},box2d.b2PrismaticJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,a)},box2d.b2PrismaticJoint.prototype.GetReactionForce=function(a,b){return b.SetXY(a*(this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.x),a*(this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.y))},box2d.b2PrismaticJoint.prototype.GetReactionTorque=function(a){return a*this.m_impulse.y},box2d.b2PrismaticJoint.prototype.GetLocalAnchorA=function(a){return a.Copy(this.m_localAnchorA)},box2d.b2PrismaticJoint.prototype.GetLocalAnchorB=function(a){return a.Copy(this.m_localAnchorB)},box2d.b2PrismaticJoint.prototype.GetLocalAxisA=function(a){return a.Copy(this.m_localXAxisA)},box2d.b2PrismaticJoint.prototype.GetReferenceAngle=function(){return this.m_referenceAngle},box2d.b2PrismaticJoint.prototype.GetJointTranslation=function(){var a=this.m_bodyA.GetWorldPoint(this.m_localAnchorA,box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_pA),b=this.m_bodyB.GetWorldPoint(this.m_localAnchorB,box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_pB),c=box2d.b2SubVV(b,a,box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_d),d=this.m_bodyA.GetWorldVector(this.m_localXAxisA,box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_axis),e=box2d.b2DotVV(c,d);return e},box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_pA=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_pB=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_d=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.GetJointTranslation.s_axis=new box2d.b2Vec2,box2d.b2PrismaticJoint.prototype.GetJointSpeed=function(){var a=this.m_bodyA,b=this.m_bodyB;box2d.b2SubVV(this.m_localAnchorA,a.m_sweep.localCenter,this.m_lalcA);var c=box2d.b2MulRV(a.m_xf.q,this.m_lalcA,this.m_rA);box2d.b2SubVV(this.m_localAnchorB,b.m_sweep.localCenter,this.m_lalcB);var d=box2d.b2MulRV(b.m_xf.q,this.m_lalcB,this.m_rB),e=box2d.b2AddVV(a.m_sweep.c,c,box2d.b2Vec2.s_t0),f=box2d.b2AddVV(b.m_sweep.c,d,box2d.b2Vec2.s_t1),g=box2d.b2SubVV(f,e,box2d.b2Vec2.s_t2),h=a.GetWorldVector(this.m_localXAxisA,this.m_axis),i=a.m_linearVelocity,j=b.m_linearVelocity,k=a.m_angularVelocity,l=b.m_angularVelocity,m=box2d.b2DotVV(g,box2d.b2CrossSV(k,h,box2d.b2Vec2.s_t0))+box2d.b2DotVV(h,box2d.b2SubVV(box2d.b2AddVCrossSV(j,l,d,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(i,k,c,box2d.b2Vec2.s_t1),box2d.b2Vec2.s_t0));return m},box2d.b2PrismaticJoint.prototype.IsLimitEnabled=function(){return this.m_enableLimit},box2d.b2PrismaticJoint.prototype.EnableLimit=function(a){a!==this.m_enableLimit&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableLimit=a,this.m_impulse.z=0)},box2d.b2PrismaticJoint.prototype.GetLowerLimit=function(){return this.m_lowerTranslation},box2d.b2PrismaticJoint.prototype.GetUpperLimit=function(){return this.m_upperTranslation},box2d.b2PrismaticJoint.prototype.SetLimits=function(a,b){(a!==this.m_lowerTranslation||b!==this.m_upperTranslation)&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_lowerTranslation=a,this.m_upperTranslation=b,this.m_impulse.z=0)},box2d.b2PrismaticJoint.prototype.IsMotorEnabled=function(){return this.m_enableMotor},box2d.b2PrismaticJoint.prototype.EnableMotor=function(a){this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableMotor=a},box2d.b2PrismaticJoint.prototype.SetMotorSpeed=function(a){this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_motorSpeed=a},box2d.b2PrismaticJoint.prototype.GetMotorSpeed=function(){return this.m_motorSpeed},box2d.b2PrismaticJoint.prototype.SetMaxMotorForce=function(a){this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_maxMotorForce=a},box2d.b2PrismaticJoint.prototype.GetMaxMotorForce=function(){return this.m_maxMotorForce},box2d.b2PrismaticJoint.prototype.GetMotorForce=function(a){return a*this.m_motorImpulse},box2d.b2PrismaticJoint.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_bodyA.m_islandIndex,b=this.m_bodyB.m_islandIndex;box2d.b2Log(" /*box2d.b2PrismaticJointDef*/ var jd = new box2d.b2PrismaticJointDef();\n"),box2d.b2Log(" jd.bodyA = bodies[%d];\n",a),box2d.b2Log(" jd.bodyB = bodies[%d];\n",b),box2d.b2Log(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),box2d.b2Log(" jd.localAnchorA.SetXY(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),box2d.b2Log(" jd.localAnchorB.SetXY(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),box2d.b2Log(" jd.localAxisA.SetXY(%.15f, %.15f);\n",this.m_localXAxisA.x,this.m_localXAxisA.y),box2d.b2Log(" jd.referenceAngle = %.15f;\n",this.m_referenceAngle),box2d.b2Log(" jd.enableLimit = %s;\n",this.m_enableLimit?"true":"false"),box2d.b2Log(" jd.lowerTranslation = %.15f;\n",this.m_lowerTranslation),box2d.b2Log(" jd.upperTranslation = %.15f;\n",this.m_upperTranslation),box2d.b2Log(" jd.enableMotor = %s;\n",this.m_enableMotor?"true":"false"),box2d.b2Log(" jd.motorSpeed = %.15f;\n",this.m_motorSpeed),box2d.b2Log(" jd.maxMotorForce = %.15f;\n",this.m_maxMotorForce),box2d.b2Log(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)}},goog.provide("box2d.b2GearJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),goog.require("box2d.b2RevoluteJoint"),goog.require("box2d.b2PrismaticJoint"),box2d.b2GearJointDef=function(){goog.base(this,box2d.b2JointType.e_gearJoint)},goog.inherits(box2d.b2GearJointDef,box2d.b2JointDef),box2d.b2GearJointDef.prototype.joint1=null,box2d.b2GearJointDef.prototype.joint2=null,box2d.b2GearJointDef.prototype.ratio=1,box2d.b2GearJoint=function(a){goog.base(this,a),this.m_joint1=a.joint1,this.m_joint2=a.joint2,this.m_localAnchorA=new box2d.b2Vec2,this.m_localAnchorB=new box2d.b2Vec2,this.m_localAnchorC=new box2d.b2Vec2,this.m_localAnchorD=new box2d.b2Vec2,this.m_localAxisC=new box2d.b2Vec2,this.m_localAxisD=new box2d.b2Vec2,this.m_lcA=new box2d.b2Vec2,this.m_lcB=new box2d.b2Vec2,this.m_lcC=new box2d.b2Vec2,this.m_lcD=new box2d.b2Vec2,this.m_JvAC=new box2d.b2Vec2,this.m_JvBD=new box2d.b2Vec2,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_qC=new box2d.b2Rot,this.m_qD=new box2d.b2Rot,this.m_lalcA=new box2d.b2Vec2,this.m_lalcB=new box2d.b2Vec2,this.m_lalcC=new box2d.b2Vec2,this.m_lalcD=new box2d.b2Vec2,this.m_typeA=this.m_joint1.GetType(),this.m_typeB=this.m_joint2.GetType(),box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_typeA===box2d.b2JointType.e_revoluteJoint||this.m_typeA===box2d.b2JointType.e_prismaticJoint),box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_typeB===box2d.b2JointType.e_revoluteJoint||this.m_typeB===box2d.b2JointType.e_prismaticJoint);var b,c;this.m_bodyC=this.m_joint1.GetBodyA(),this.m_bodyA=this.m_joint1.GetBodyB();var d=this.m_bodyA.m_xf,e=this.m_bodyA.m_sweep.a,f=this.m_bodyC.m_xf,g=this.m_bodyC.m_sweep.a;if(this.m_typeA===box2d.b2JointType.e_revoluteJoint){var h=a.joint1;this.m_localAnchorC.Copy(h.m_localAnchorA),this.m_localAnchorA.Copy(h.m_localAnchorB),this.m_referenceAngleA=h.m_referenceAngle,this.m_localAxisC.SetZero(),b=e-g-this.m_referenceAngleA}else{var i=a.joint1;this.m_localAnchorC.Copy(i.m_localAnchorA),this.m_localAnchorA.Copy(i.m_localAnchorB),this.m_referenceAngleA=i.m_referenceAngle,this.m_localAxisC.Copy(i.m_localXAxisA);var j=this.m_localAnchorC,k=box2d.b2MulTRV(f.q,box2d.b2AddVV(box2d.b2MulRV(d.q,this.m_localAnchorA,box2d.b2Vec2.s_t0),box2d.b2SubVV(d.p,f.p,box2d.b2Vec2.s_t1),box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0);b=box2d.b2DotVV(box2d.b2SubVV(k,j,box2d.b2Vec2.s_t0),this.m_localAxisC)}this.m_bodyD=this.m_joint2.GetBodyA(),this.m_bodyB=this.m_joint2.GetBodyB();var l=this.m_bodyB.m_xf,m=this.m_bodyB.m_sweep.a,n=this.m_bodyD.m_xf,o=this.m_bodyD.m_sweep.a;if(this.m_typeB===box2d.b2JointType.e_revoluteJoint){var h=a.joint2;this.m_localAnchorD.Copy(h.m_localAnchorA),this.m_localAnchorB.Copy(h.m_localAnchorB),this.m_referenceAngleB=h.m_referenceAngle,this.m_localAxisD.SetZero(),c=m-o-this.m_referenceAngleB}else{var i=a.joint2;this.m_localAnchorD.Copy(i.m_localAnchorA),this.m_localAnchorB.Copy(i.m_localAnchorB),this.m_referenceAngleB=i.m_referenceAngle,this.m_localAxisD.Copy(i.m_localXAxisA);var p=this.m_localAnchorD,q=box2d.b2MulTRV(n.q,box2d.b2AddVV(box2d.b2MulRV(l.q,this.m_localAnchorB,box2d.b2Vec2.s_t0),box2d.b2SubVV(l.p,n.p,box2d.b2Vec2.s_t1),box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0);c=box2d.b2DotVV(box2d.b2SubVV(q,p,box2d.b2Vec2.s_t0),this.m_localAxisD)}this.m_ratio=a.ratio,this.m_constant=b+this.m_ratio*c,this.m_impulse=0},goog.inherits(box2d.b2GearJoint,box2d.b2Joint),box2d.b2GearJoint.prototype.m_joint1=null,box2d.b2GearJoint.prototype.m_joint2=null,box2d.b2GearJoint.prototype.m_typeA=box2d.b2JointType.e_unknownJoint,box2d.b2GearJoint.prototype.m_typeB=box2d.b2JointType.e_unknownJoint,box2d.b2GearJoint.prototype.m_bodyC=null,box2d.b2GearJoint.prototype.m_bodyD=null,box2d.b2GearJoint.prototype.m_localAnchorA=null,box2d.b2GearJoint.prototype.m_localAnchorB=null,box2d.b2GearJoint.prototype.m_localAnchorC=null,box2d.b2GearJoint.prototype.m_localAnchorD=null,box2d.b2GearJoint.prototype.m_localAxisC=null,box2d.b2GearJoint.prototype.m_localAxisD=null,box2d.b2GearJoint.prototype.m_referenceAngleA=0,box2d.b2GearJoint.prototype.m_referenceAngleB=0,box2d.b2GearJoint.prototype.m_constant=0,box2d.b2GearJoint.prototype.m_ratio=0,box2d.b2GearJoint.prototype.m_impulse=0,box2d.b2GearJoint.prototype.m_indexA=0,box2d.b2GearJoint.prototype.m_indexB=0,box2d.b2GearJoint.prototype.m_indexC=0,box2d.b2GearJoint.prototype.m_indexD=0,box2d.b2GearJoint.prototype.m_lcA=null,box2d.b2GearJoint.prototype.m_lcB=null,box2d.b2GearJoint.prototype.m_lcC=null,box2d.b2GearJoint.prototype.m_lcD=null,box2d.b2GearJoint.prototype.m_mA=0,box2d.b2GearJoint.prototype.m_mB=0,box2d.b2GearJoint.prototype.m_mC=0,box2d.b2GearJoint.prototype.m_mD=0,box2d.b2GearJoint.prototype.m_iA=0,box2d.b2GearJoint.prototype.m_iB=0,box2d.b2GearJoint.prototype.m_iC=0,box2d.b2GearJoint.prototype.m_iD=0,box2d.b2GearJoint.prototype.m_JvAC=null,box2d.b2GearJoint.prototype.m_JvBD=null,box2d.b2GearJoint.prototype.m_JwA=0,box2d.b2GearJoint.prototype.m_JwB=0,box2d.b2GearJoint.prototype.m_JwC=0,box2d.b2GearJoint.prototype.m_JwD=0,box2d.b2GearJoint.prototype.m_mass=0,box2d.b2GearJoint.prototype.m_qA=null,box2d.b2GearJoint.prototype.m_qB=null,box2d.b2GearJoint.prototype.m_qC=null,box2d.b2GearJoint.prototype.m_qD=null,box2d.b2GearJoint.prototype.m_lalcA=null,box2d.b2GearJoint.prototype.m_lalcB=null,box2d.b2GearJoint.prototype.m_lalcC=null,box2d.b2GearJoint.prototype.m_lalcD=null,box2d.b2GearJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_indexC=this.m_bodyC.m_islandIndex,this.m_indexD=this.m_bodyD.m_islandIndex,this.m_lcA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_lcB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_lcC.Copy(this.m_bodyC.m_sweep.localCenter),this.m_lcD.Copy(this.m_bodyD.m_sweep.localCenter),this.m_mA=this.m_bodyA.m_invMass,this.m_mB=this.m_bodyB.m_invMass,this.m_mC=this.m_bodyC.m_invMass,this.m_mD=this.m_bodyD.m_invMass,this.m_iA=this.m_bodyA.m_invI,this.m_iB=this.m_bodyB.m_invI,this.m_iC=this.m_bodyC.m_invI,this.m_iD=this.m_bodyD.m_invI;var b=a.positions[this.m_indexA].a,c=a.velocities[this.m_indexA].v,d=a.velocities[this.m_indexA].w,e=a.positions[this.m_indexB].a,f=a.velocities[this.m_indexB].v,g=a.velocities[this.m_indexB].w,h=a.positions[this.m_indexC].a,i=a.velocities[this.m_indexC].v,j=a.velocities[this.m_indexC].w,k=a.positions[this.m_indexD].a,l=a.velocities[this.m_indexD].v,m=a.velocities[this.m_indexD].w,n=this.m_qA.SetAngleRadians(b),o=this.m_qB.SetAngleRadians(e),p=this.m_qC.SetAngleRadians(h),q=this.m_qD.SetAngleRadians(k);if(this.m_mass=0,this.m_typeA===box2d.b2JointType.e_revoluteJoint)this.m_JvAC.SetZero(),this.m_JwA=1,this.m_JwC=1,this.m_mass+=this.m_iA+this.m_iC;else{var r=box2d.b2MulRV(p,this.m_localAxisC,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_u);box2d.b2SubVV(this.m_localAnchorC,this.m_lcC,this.m_lalcC);var s=box2d.b2MulRV(p,this.m_lalcC,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rC);box2d.b2SubVV(this.m_localAnchorA,this.m_lcA,this.m_lalcA);var t=box2d.b2MulRV(n,this.m_lalcA,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rA);this.m_JvAC.Copy(r),this.m_JwC=box2d.b2CrossVV(s,r),this.m_JwA=box2d.b2CrossVV(t,r),this.m_mass+=this.m_mC+this.m_mA+this.m_iC*this.m_JwC*this.m_JwC+this.m_iA*this.m_JwA*this.m_JwA}if(this.m_typeB===box2d.b2JointType.e_revoluteJoint)this.m_JvBD.SetZero(),this.m_JwB=this.m_ratio,this.m_JwD=this.m_ratio,this.m_mass+=this.m_ratio*this.m_ratio*(this.m_iB+this.m_iD);else{var r=box2d.b2MulRV(q,this.m_localAxisD,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_u);box2d.b2SubVV(this.m_localAnchorD,this.m_lcD,this.m_lalcD);var u=box2d.b2MulRV(q,this.m_lalcD,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rD);box2d.b2SubVV(this.m_localAnchorB,this.m_lcB,this.m_lalcB);var v=box2d.b2MulRV(o,this.m_lalcB,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rB);box2d.b2MulSV(this.m_ratio,r,this.m_JvBD),this.m_JwD=this.m_ratio*box2d.b2CrossVV(u,r),this.m_JwB=this.m_ratio*box2d.b2CrossVV(v,r),this.m_mass+=this.m_ratio*this.m_ratio*(this.m_mD+this.m_mB)+this.m_iD*this.m_JwD*this.m_JwD+this.m_iB*this.m_JwB*this.m_JwB}this.m_mass=this.m_mass>0?1/this.m_mass:0,a.step.warmStarting?(c.SelfMulAdd(this.m_mA*this.m_impulse,this.m_JvAC),d+=this.m_iA*this.m_impulse*this.m_JwA,f.SelfMulAdd(this.m_mB*this.m_impulse,this.m_JvBD),g+=this.m_iB*this.m_impulse*this.m_JwB,i.SelfMulSub(this.m_mC*this.m_impulse,this.m_JvAC),j-=this.m_iC*this.m_impulse*this.m_JwC,l.SelfMulSub(this.m_mD*this.m_impulse,this.m_JvBD),m-=this.m_iD*this.m_impulse*this.m_JwD):this.m_impulse=0,a.velocities[this.m_indexA].w=d,a.velocities[this.m_indexB].w=g,a.velocities[this.m_indexC].w=j,a.velocities[this.m_indexD].w=m},box2d.b2GearJoint.prototype.InitVelocityConstraints.s_u=new box2d.b2Vec2,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rA=new box2d.b2Vec2,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rB=new box2d.b2Vec2,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rC=new box2d.b2Vec2,box2d.b2GearJoint.prototype.InitVelocityConstraints.s_rD=new box2d.b2Vec2,box2d.b2GearJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=a.velocities[this.m_indexC].v,g=a.velocities[this.m_indexC].w,h=a.velocities[this.m_indexD].v,i=a.velocities[this.m_indexD].w,j=box2d.b2DotVV(this.m_JvAC,box2d.b2SubVV(b,f,box2d.b2Vec2.s_t0))+box2d.b2DotVV(this.m_JvBD,box2d.b2SubVV(d,h,box2d.b2Vec2.s_t0));j+=this.m_JwA*c-this.m_JwC*g+(this.m_JwB*e-this.m_JwD*i);var k=-this.m_mass*j;this.m_impulse+=k,b.SelfMulAdd(this.m_mA*k,this.m_JvAC),c+=this.m_iA*k*this.m_JwA,d.SelfMulAdd(this.m_mB*k,this.m_JvBD),e+=this.m_iB*k*this.m_JwB,f.SelfMulSub(this.m_mC*k,this.m_JvAC),g-=this.m_iC*k*this.m_JwC,h.SelfMulSub(this.m_mD*k,this.m_JvBD),i-=this.m_iD*k*this.m_JwD,a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e,a.velocities[this.m_indexC].w=g,a.velocities[this.m_indexD].w=i},box2d.b2GearJoint.prototype.SolvePositionConstraints=function(a){var b,c,d,e,f,g,h=a.positions[this.m_indexA].c,i=a.positions[this.m_indexA].a,j=a.positions[this.m_indexB].c,k=a.positions[this.m_indexB].a,l=a.positions[this.m_indexC].c,m=a.positions[this.m_indexC].a,n=a.positions[this.m_indexD].c,o=a.positions[this.m_indexD].a,p=this.m_qA.SetAngleRadians(i),q=this.m_qB.SetAngleRadians(k),r=this.m_qC.SetAngleRadians(m),s=this.m_qD.SetAngleRadians(o),t=0,u=this.m_JvAC,v=this.m_JvBD,w=0;if(this.m_typeA===box2d.b2JointType.e_revoluteJoint)u.SetZero(),d=1,f=1,w+=this.m_iA+this.m_iC,b=i-m-this.m_referenceAngleA;else{var x=box2d.b2MulRV(r,this.m_localAxisC,box2d.b2GearJoint.prototype.SolvePositionConstraints.s_u),y=box2d.b2MulRV(r,this.m_lalcC,box2d.b2GearJoint.prototype.SolvePositionConstraints.s_rC),z=box2d.b2MulRV(p,this.m_lalcA,box2d.b2GearJoint.prototype.SolvePositionConstraints.s_rA);u.Copy(x),f=box2d.b2CrossVV(y,x),d=box2d.b2CrossVV(z,x),w+=this.m_mC+this.m_mA+this.m_iC*f*f+this.m_iA*d*d;var A=this.m_lalcC,B=box2d.b2MulTRV(r,box2d.b2AddVV(z,box2d.b2SubVV(h,l,box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0);b=box2d.b2DotVV(box2d.b2SubVV(B,A,box2d.b2Vec2.s_t0),this.m_localAxisC)}if(this.m_typeB===box2d.b2JointType.e_revoluteJoint)v.SetZero(),e=this.m_ratio,g=this.m_ratio,w+=this.m_ratio*this.m_ratio*(this.m_iB+this.m_iD),c=k-o-this.m_referenceAngleB;else{var x=box2d.b2MulRV(s,this.m_localAxisD,box2d.b2GearJoint.prototype.SolvePositionConstraints.s_u),C=box2d.b2MulRV(s,this.m_lalcD,box2d.b2GearJoint.prototype.SolvePositionConstraints.s_rD),D=box2d.b2MulRV(q,this.m_lalcB,box2d.b2GearJoint.prototype.SolvePositionConstraints.s_rB);box2d.b2MulSV(this.m_ratio,x,v),g=this.m_ratio*box2d.b2CrossVV(C,x),e=this.m_ratio*box2d.b2CrossVV(D,x),w+=this.m_ratio*this.m_ratio*(this.m_mD+this.m_mB)+this.m_iD*g*g+this.m_iB*e*e;var E=this.m_lalcD,F=box2d.b2MulTRV(s,box2d.b2AddVV(D,box2d.b2SubVV(j,n,box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0);c=box2d.b2DotVV(box2d.b2SubVV(F,E,box2d.b2Vec2.s_t0),this.m_localAxisD)}var G=b+this.m_ratio*c-this.m_constant,H=0;return w>0&&(H=-G/w),h.SelfMulAdd(this.m_mA*H,u),i+=this.m_iA*H*d,j.SelfMulAdd(this.m_mB*H,v),k+=this.m_iB*H*e,l.SelfMulSub(this.m_mC*H,u),m-=this.m_iC*H*f,n.SelfMulSub(this.m_mD*H,v),o-=this.m_iD*H*g,a.positions[this.m_indexA].a=i,a.positions[this.m_indexB].a=k,a.positions[this.m_indexC].a=m,a.positions[this.m_indexD].a=o,tc&&(b=d,c=e)}return b},box2d.b2DistanceProxy.prototype.GetSupportVertex=function(a,b){for(var c=0,d=box2d.b2DotVV(this.m_vertices[0],a),e=1;ed&&(c=e,d=f)}return b.Copy(this.m_vertices[c])},box2d.b2DistanceProxy.prototype.GetVertexCount=function(){return this.m_count},box2d.b2DistanceProxy.prototype.GetVertex=function(a){return box2d.ENABLE_ASSERTS&&box2d.b2Assert(a>=0&&a1){var k=a.metric,l=this.GetMetric();(.5*k>l||l>2*k||l0?box2d.b2CrossOneV(b,a):box2d.b2CrossVOne(b,a);default:return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),a.SetZero()}},box2d.b2Simplex.prototype.GetClosestPoint=function(a){switch(this.m_count){case 0:return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),a.SetZero();case 1:return a.Copy(this.m_v1.w);case 2:return a.SetXY(this.m_v1.a*this.m_v1.w.x+this.m_v2.a*this.m_v2.w.x,this.m_v1.a*this.m_v1.w.y+this.m_v2.a*this.m_v2.w.y);case 3:return a.SetZero();default:return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),a.SetZero()}},box2d.b2Simplex.prototype.GetWitnessPoints=function(a,b){switch(this.m_count){case 0:box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1);break;case 1:a.Copy(this.m_v1.wA),b.Copy(this.m_v1.wB);break;case 2:a.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x,a.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y,b.x=this.m_v1.a*this.m_v1.wB.x+this.m_v2.a*this.m_v2.wB.x,b.y=this.m_v1.a*this.m_v1.wB.y+this.m_v2.a*this.m_v2.wB.y;break;case 3:b.x=a.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x+this.m_v3.a*this.m_v3.wA.x,b.y=a.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y+this.m_v3.a*this.m_v3.wA.y;break;default:box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1)}},box2d.b2Simplex.prototype.GetMetric=function(){switch(this.m_count){case 0:return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),0;case 1:return 0;case 2:return box2d.b2DistanceVV(this.m_v1.w,this.m_v2.w);case 3:return box2d.b2CrossVV(box2d.b2SubVV(this.m_v2.w,this.m_v1.w,box2d.b2Vec2.s_t0),box2d.b2SubVV(this.m_v3.w,this.m_v1.w,box2d.b2Vec2.s_t1));default:return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),0}},box2d.b2Simplex.prototype.Solve2=function(){var a=this.m_v1.w,b=this.m_v2.w,c=box2d.b2SubVV(b,a,box2d.b2Simplex.s_e12),d=-box2d.b2DotVV(a,c);if(0>=d)return this.m_v1.a=1,void(this.m_count=1);var e=box2d.b2DotVV(b,c);if(0>=e)return this.m_v2.a=1,this.m_count=1,void this.m_v1.Copy(this.m_v2);var f=1/(e+d);this.m_v1.a=e*f,this.m_v2.a=d*f,this.m_count=2},box2d.b2Simplex.prototype.Solve3=function(){var a=this.m_v1.w,b=this.m_v2.w,c=this.m_v3.w,d=box2d.b2SubVV(b,a,box2d.b2Simplex.s_e12),e=box2d.b2DotVV(a,d),f=box2d.b2DotVV(b,d),g=f,h=-e,i=box2d.b2SubVV(c,a,box2d.b2Simplex.s_e13),j=box2d.b2DotVV(a,i),k=box2d.b2DotVV(c,i),l=k,m=-j,n=box2d.b2SubVV(c,b,box2d.b2Simplex.s_e23),o=box2d.b2DotVV(b,n),p=box2d.b2DotVV(c,n),q=p,r=-o,s=box2d.b2CrossVV(d,i),t=s*box2d.b2CrossVV(b,c),u=s*box2d.b2CrossVV(c,a),v=s*box2d.b2CrossVV(a,b);if(0>=h&&0>=m)return this.m_v1.a=1,void(this.m_count=1);if(g>0&&h>0&&0>=v){var w=1/(g+h);return this.m_v1.a=g*w,this.m_v2.a=h*w,void(this.m_count=2)}if(l>0&&m>0&&0>=u){var x=1/(l+m);return this.m_v1.a=l*x,this.m_v3.a=m*x,this.m_count=2,void this.m_v2.Copy(this.m_v3)}if(0>=g&&0>=r)return this.m_v2.a=1,this.m_count=1,void this.m_v1.Copy(this.m_v2);if(0>=l&&0>=q)return this.m_v3.a=1,this.m_count=1,void this.m_v1.Copy(this.m_v3);if(q>0&&r>0&&0>=t){var y=1/(q+r);return this.m_v2.a=q*y,this.m_v3.a=r*y,this.m_count=2,void this.m_v1.Copy(this.m_v3)}var z=1/(t+u+v);this.m_v1.a=t*z,this.m_v2.a=u*z,this.m_v3.a=v*z,this.m_count=3},box2d.b2Simplex.s_e12=new box2d.b2Vec2,box2d.b2Simplex.s_e13=new box2d.b2Vec2,box2d.b2Simplex.s_e23=new box2d.b2Vec2,box2d.b2Distance=function(a,b,c){++box2d.b2_gjkCalls;var d=c.proxyA,e=c.proxyB,f=c.transformA,g=c.transformB,h=box2d.b2Distance.s_simplex;h.ReadCache(b,d,f,e,g);for(var i=h.m_vertices,j=20,k=box2d.b2Distance.s_saveA,l=box2d.b2Distance.s_saveB,m=0,n=box2d.b2_maxFloat,o=n,p=0;j>p;){m=h.m_count;for(var q=0;m>q;++q)k[q]=i[q].indexA,l[q]=i[q].indexB;switch(h.m_count){case 1:break;case 2:h.Solve2();break;case 3:h.Solve3();break;default:box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1)}if(3===h.m_count)break;var r=h.GetClosestPoint(box2d.b2Distance.s_p);o=r.GetLengthSquared(),n=o;var s=h.GetSearchDirection(box2d.b2Distance.s_d);if(s.GetLengthSquared()q;++q)if(t.indexA===k[q]&&t.indexB===l[q]){u=!0;break}if(u)break;++h.m_count}if(box2d.b2_gjkMaxIters=box2d.b2Max(box2d.b2_gjkMaxIters,p),h.GetWitnessPoints(a.pointA,a.pointB),a.distance=box2d.b2DistanceVV(a.pointA,a.pointB),a.iterations=p,h.WriteCache(b),c.useRadii){var v=d.m_radius,w=e.m_radius;if(a.distance>v+w&&a.distance>box2d.b2_epsilon){a.distance-=v+w;var x=box2d.b2SubVV(a.pointB,a.pointA,box2d.b2Distance.s_normal);x.Normalize(),a.pointA.SelfMulAdd(v,x),a.pointB.SelfMulSub(w,x)}else{var r=box2d.b2MidVV(a.pointA,a.pointB,box2d.b2Distance.s_p);a.pointA.Copy(r),a.pointB.Copy(r),a.distance=0}}},box2d.b2Distance.s_simplex=new box2d.b2Simplex,box2d.b2Distance.s_saveA=box2d.b2MakeNumberArray(3),box2d.b2Distance.s_saveB=box2d.b2MakeNumberArray(3),box2d.b2Distance.s_p=new box2d.b2Vec2,box2d.b2Distance.s_d=new box2d.b2Vec2,box2d.b2Distance.s_normal=new box2d.b2Vec2,box2d.b2Distance.s_supportA=new box2d.b2Vec2,box2d.b2Distance.s_supportB=new box2d.b2Vec2,goog.provide("box2d.b2WeldJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2WeldJointDef=function(){goog.base(this,box2d.b2JointType.e_weldJoint),this.localAnchorA=new box2d.b2Vec2,this.localAnchorB=new box2d.b2Vec2},goog.inherits(box2d.b2WeldJointDef,box2d.b2JointDef),box2d.b2WeldJointDef.prototype.localAnchorA=null,box2d.b2WeldJointDef.prototype.localAnchorB=null,box2d.b2WeldJointDef.prototype.referenceAngle=0,box2d.b2WeldJointDef.prototype.frequencyHz=0,box2d.b2WeldJointDef.prototype.dampingRatio=0,box2d.b2WeldJointDef.prototype.Initialize=function(a,b,c){this.bodyA=a,this.bodyB=b,this.bodyA.GetLocalPoint(c,this.localAnchorA),this.bodyB.GetLocalPoint(c,this.localAnchorB),this.referenceAngle=this.bodyB.GetAngleRadians()-this.bodyA.GetAngleRadians()},box2d.b2WeldJoint=function(a){goog.base(this,a),this.m_frequencyHz=a.frequencyHz,this.m_dampingRatio=a.dampingRatio,this.m_localAnchorA=a.localAnchorA.Clone(),this.m_localAnchorB=a.localAnchorB.Clone(),this.m_referenceAngle=a.referenceAngle,this.m_impulse=new box2d.b2Vec3(0,0,0),this.m_rA=new box2d.b2Vec2,this.m_rB=new box2d.b2Vec2,this.m_localCenterA=new box2d.b2Vec2,this.m_localCenterB=new box2d.b2Vec2,this.m_mass=new box2d.b2Mat33,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_lalcA=new box2d.b2Vec2,this.m_lalcB=new box2d.b2Vec2,this.m_K=new box2d.b2Mat33 +},goog.inherits(box2d.b2WeldJoint,box2d.b2Joint),box2d.b2WeldJoint.prototype.m_frequencyHz=0,box2d.b2WeldJoint.prototype.m_dampingRatio=0,box2d.b2WeldJoint.prototype.m_bias=0,box2d.b2WeldJoint.prototype.m_localAnchorA=null,box2d.b2WeldJoint.prototype.m_localAnchorB=null,box2d.b2WeldJoint.prototype.m_referenceAngle=0,box2d.b2WeldJoint.prototype.m_gamma=0,box2d.b2WeldJoint.prototype.m_impulse=null,box2d.b2WeldJoint.prototype.m_indexA=0,box2d.b2WeldJoint.prototype.m_indexB=0,box2d.b2WeldJoint.prototype.m_rA=null,box2d.b2WeldJoint.prototype.m_rB=null,box2d.b2WeldJoint.prototype.m_localCenterA=null,box2d.b2WeldJoint.prototype.m_localCenterB=null,box2d.b2WeldJoint.prototype.m_invMassA=0,box2d.b2WeldJoint.prototype.m_invMassB=0,box2d.b2WeldJoint.prototype.m_invIA=0,box2d.b2WeldJoint.prototype.m_invIB=0,box2d.b2WeldJoint.prototype.m_mass=null,box2d.b2WeldJoint.prototype.m_qA=null,box2d.b2WeldJoint.prototype.m_qB=null,box2d.b2WeldJoint.prototype.m_lalcA=null,box2d.b2WeldJoint.prototype.m_lalcB=null,box2d.b2WeldJoint.prototype.m_K=null,box2d.b2WeldJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexA].a,c=a.velocities[this.m_indexA].v,d=a.velocities[this.m_indexA].w,e=a.positions[this.m_indexB].a,f=a.velocities[this.m_indexB].v,g=a.velocities[this.m_indexB].w,h=this.m_qA.SetAngleRadians(b),i=this.m_qB.SetAngleRadians(e);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),box2d.b2MulRV(h,this.m_lalcA,this.m_rA),box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),box2d.b2MulRV(i,this.m_lalcB,this.m_rB);var j=this.m_invMassA,k=this.m_invMassB,l=this.m_invIA,m=this.m_invIB,n=this.m_K;if(n.ex.x=j+k+this.m_rA.y*this.m_rA.y*l+this.m_rB.y*this.m_rB.y*m,n.ey.x=-this.m_rA.y*this.m_rA.x*l-this.m_rB.y*this.m_rB.x*m,n.ez.x=-this.m_rA.y*l-this.m_rB.y*m,n.ex.y=n.ey.x,n.ey.y=j+k+this.m_rA.x*this.m_rA.x*l+this.m_rB.x*this.m_rB.x*m,n.ez.y=this.m_rA.x*l+this.m_rB.x*m,n.ex.z=n.ez.x,n.ey.z=n.ez.y,n.ez.z=l+m,this.m_frequencyHz>0){n.GetInverse22(this.m_mass);var o=l+m,p=o>0?1/o:0,q=e-b-this.m_referenceAngle,r=2*box2d.b2_pi*this.m_frequencyHz,s=2*p*this.m_dampingRatio*r,t=p*r*r,u=a.step.dt;this.m_gamma=u*(s+u*t),this.m_gamma=0!==this.m_gamma?1/this.m_gamma:0,this.m_bias=q*u*t*this.m_gamma,o+=this.m_gamma,this.m_mass.ez.z=0!==o?1/o:0}else n.GetSymInverse33(this.m_mass),this.m_gamma=0,this.m_bias=0;if(a.step.warmStarting){this.m_impulse.SelfMul(a.step.dtRatio);var v=box2d.b2WeldJoint.prototype.InitVelocityConstraints.s_P.SetXY(this.m_impulse.x,this.m_impulse.y);c.SelfMulSub(j,v),d-=l*(box2d.b2CrossVV(this.m_rA,v)+this.m_impulse.z),f.SelfMulAdd(k,v),g+=m*(box2d.b2CrossVV(this.m_rB,v)+this.m_impulse.z)}else this.m_impulse.SetZero();a.velocities[this.m_indexA].w=d,a.velocities[this.m_indexB].w=g},box2d.b2WeldJoint.prototype.InitVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2WeldJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=this.m_invMassA,g=this.m_invMassB,h=this.m_invIA,i=this.m_invIB;if(this.m_frequencyHz>0){var j=e-c,k=-this.m_mass.ez.z*(j+this.m_bias+this.m_gamma*this.m_impulse.z);this.m_impulse.z+=k,c-=h*k,e+=i*k;var l=box2d.b2SubVV(box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2Vec2.s_t1),box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_Cdot1),m=box2d.b2MulM33XY(this.m_mass,l.x,l.y,box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_impulse1).SelfNeg();this.m_impulse.x+=m.x,this.m_impulse.y+=m.y;var n=m;b.SelfMulSub(f,n),c-=h*box2d.b2CrossVV(this.m_rA,n),d.SelfMulAdd(g,n),e+=i*box2d.b2CrossVV(this.m_rB,n)}else{var l=box2d.b2SubVV(box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2Vec2.s_t1),box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_Cdot1),j=e-c,o=box2d.b2MulM33XYZ(this.m_mass,l.x,l.y,j,box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_impulse).SelfNeg();this.m_impulse.SelfAdd(o);var n=box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_P.SetXY(o.x,o.y);b.SelfMulSub(f,n),c-=h*(box2d.b2CrossVV(this.m_rA,n)+o.z),d.SelfMulAdd(g,n),e+=i*(box2d.b2CrossVV(this.m_rB,n)+o.z)}a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_Cdot1=new box2d.b2Vec2,box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_impulse1=new box2d.b2Vec2,box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_impulse=new box2d.b2Vec3,box2d.b2WeldJoint.prototype.SolveVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2WeldJoint.prototype.SolvePositionConstraints=function(a){var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.positions[this.m_indexB].c,e=a.positions[this.m_indexB].a,f=this.m_qA.SetAngleRadians(c),g=this.m_qB.SetAngleRadians(e),h=this.m_invMassA,i=this.m_invMassB,j=this.m_invIA,k=this.m_invIB;box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var l=box2d.b2MulRV(f,this.m_lalcA,this.m_rA);box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var m,n,o=box2d.b2MulRV(g,this.m_lalcB,this.m_rB),p=this.m_K;if(p.ex.x=h+i+l.y*l.y*j+o.y*o.y*k,p.ey.x=-l.y*l.x*j-o.y*o.x*k,p.ez.x=-l.y*j-o.y*k,p.ex.y=p.ey.x,p.ey.y=h+i+l.x*l.x*j+o.x*o.x*k,p.ez.y=l.x*j+o.x*k,p.ex.z=p.ez.x,p.ey.z=p.ez.y,p.ez.z=j+k,this.m_frequencyHz>0){var q=box2d.b2SubVV(box2d.b2AddVV(d,o,box2d.b2Vec2.s_t0),box2d.b2AddVV(b,l,box2d.b2Vec2.s_t1),box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_C1);m=q.GetLength(),n=0;var r=p.Solve22(q.x,q.y,box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_P).SelfNeg();b.SelfMulSub(h,r),c-=j*box2d.b2CrossVV(l,r),d.SelfMulAdd(i,r),e+=k*box2d.b2CrossVV(o,r)}else{var q=box2d.b2SubVV(box2d.b2AddVV(d,o,box2d.b2Vec2.s_t0),box2d.b2AddVV(b,l,box2d.b2Vec2.s_t1),box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_C1),s=e-c-this.m_referenceAngle;m=q.GetLength(),n=box2d.b2Abs(s);var t=p.Solve33(q.x,q.y,s,box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_impulse).SelfNeg(),r=box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_P.SetXY(t.x,t.y);b.SelfMulSub(h,r),c-=j*(box2d.b2CrossVV(this.m_rA,r)+t.z),d.SelfMulAdd(i,r),e+=k*(box2d.b2CrossVV(this.m_rB,r)+t.z)}return a.positions[this.m_indexA].a=c,a.positions[this.m_indexB].a=e,m<=box2d.b2_linearSlop&&n<=box2d.b2_angularSlop},box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_C1=new box2d.b2Vec2,box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_P=new box2d.b2Vec2,box2d.b2WeldJoint.prototype.SolvePositionConstraints.s_impulse=new box2d.b2Vec3,box2d.b2WeldJoint.prototype.GetAnchorA=function(a){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,a)},box2d.b2WeldJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,a)},box2d.b2WeldJoint.prototype.GetReactionForce=function(a,b){return b.SetXY(a*this.m_impulse.x,a*this.m_impulse.y)},box2d.b2WeldJoint.prototype.GetReactionTorque=function(a){return a*this.m_impulse.z},box2d.b2WeldJoint.prototype.GetLocalAnchorA=function(a){return a.Copy(this.m_localAnchorA)},box2d.b2WeldJoint.prototype.GetLocalAnchorB=function(a){return a.Copy(this.m_localAnchorB)},box2d.b2WeldJoint.prototype.GetReferenceAngle=function(){return this.m_referenceAngle},box2d.b2WeldJoint.prototype.SetFrequency=function(a){this.m_frequencyHz=a},box2d.b2WeldJoint.prototype.GetFrequency=function(){return this.m_frequencyHz},box2d.b2WeldJoint.prototype.SetDampingRatio=function(a){this.m_dampingRatio=a},box2d.b2WeldJoint.prototype.GetDampingRatio=function(){return this.m_dampingRatio},box2d.b2WeldJoint.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_bodyA.m_islandIndex,b=this.m_bodyB.m_islandIndex;box2d.b2Log(" /*box2d.b2WeldJointDef*/ var jd = new box2d.b2WeldJointDef();\n"),box2d.b2Log(" jd.bodyA = bodies[%d];\n",a),box2d.b2Log(" jd.bodyB = bodies[%d];\n",b),box2d.b2Log(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),box2d.b2Log(" jd.localAnchorA.SetXY(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),box2d.b2Log(" jd.localAnchorB.SetXY(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),box2d.b2Log(" jd.referenceAngle = %.15f;\n",this.m_referenceAngle),box2d.b2Log(" jd.frequencyHz = %.15f;\n",this.m_frequencyHz),box2d.b2Log(" jd.dampingRatio = %.15f;\n",this.m_dampingRatio),box2d.b2Log(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)}},goog.provide("box2d.b2RopeJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2RopeJointDef=function(){goog.base(this,box2d.b2JointType.e_ropeJoint),this.localAnchorA=new box2d.b2Vec2(-1,0),this.localAnchorB=new box2d.b2Vec2(1,0)},goog.inherits(box2d.b2RopeJointDef,box2d.b2JointDef),box2d.b2RopeJointDef.prototype.localAnchorA=null,box2d.b2RopeJointDef.prototype.localAnchorB=null,box2d.b2RopeJointDef.prototype.maxLength=0,box2d.b2RopeJoint=function(a){goog.base(this,a),this.m_localAnchorA=a.localAnchorA.Clone(),this.m_localAnchorB=a.localAnchorB.Clone(),this.m_maxLength=a.maxLength,this.m_u=new box2d.b2Vec2,this.m_rA=new box2d.b2Vec2,this.m_rB=new box2d.b2Vec2,this.m_localCenterA=new box2d.b2Vec2,this.m_localCenterB=new box2d.b2Vec2,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_lalcA=new box2d.b2Vec2,this.m_lalcB=new box2d.b2Vec2},goog.inherits(box2d.b2RopeJoint,box2d.b2Joint),box2d.b2RopeJoint.prototype.m_localAnchorA=null,box2d.b2RopeJoint.prototype.m_localAnchorB=null,box2d.b2RopeJoint.prototype.m_maxLength=0,box2d.b2RopeJoint.prototype.m_length=0,box2d.b2RopeJoint.prototype.m_impulse=0,box2d.b2RopeJoint.prototype.m_indexA=0,box2d.b2RopeJoint.prototype.m_indexB=0,box2d.b2RopeJoint.prototype.m_u=null,box2d.b2RopeJoint.prototype.m_rA=null,box2d.b2RopeJoint.prototype.m_rB=null,box2d.b2RopeJoint.prototype.m_localCenterA=null,box2d.b2RopeJoint.prototype.m_localCenterB=null,box2d.b2RopeJoint.prototype.m_invMassA=0,box2d.b2RopeJoint.prototype.m_invMassB=0,box2d.b2RopeJoint.prototype.m_invIA=0,box2d.b2RopeJoint.prototype.m_invIB=0,box2d.b2RopeJoint.prototype.m_mass=0,box2d.b2RopeJoint.prototype.m_state=box2d.b2LimitState.e_inactiveLimit,box2d.b2RopeJoint.prototype.m_qA=null,box2d.b2RopeJoint.prototype.m_qB=null,box2d.b2RopeJoint.prototype.m_lalcA=null,box2d.b2RopeJoint.prototype.m_lalcB=null,box2d.b2RopeJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.velocities[this.m_indexA].v,e=a.velocities[this.m_indexA].w,f=a.positions[this.m_indexB].c,g=a.positions[this.m_indexB].a,h=a.velocities[this.m_indexB].v,i=a.velocities[this.m_indexB].w,j=this.m_qA.SetAngleRadians(c),k=this.m_qB.SetAngleRadians(g);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),box2d.b2MulRV(j,this.m_lalcA,this.m_rA),box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),box2d.b2MulRV(k,this.m_lalcB,this.m_rB),this.m_u.Copy(f).SelfAdd(this.m_rB).SelfSub(b).SelfSub(this.m_rA),this.m_length=this.m_u.GetLength();var l=this.m_length-this.m_maxLength;if(this.m_state=l>0?box2d.b2LimitState.e_atUpperLimit:box2d.b2LimitState.e_inactiveLimit,!(this.m_length>box2d.b2_linearSlop))return this.m_u.SetZero(),this.m_mass=0,void(this.m_impulse=0);this.m_u.SelfMul(1/this.m_length);var m=box2d.b2CrossVV(this.m_rA,this.m_u),n=box2d.b2CrossVV(this.m_rB,this.m_u),o=this.m_invMassA+this.m_invIA*m*m+this.m_invMassB+this.m_invIB*n*n;if(this.m_mass=0!==o?1/o:0,a.step.warmStarting){this.m_impulse*=a.step.dtRatio;var p=box2d.b2MulSV(this.m_impulse,this.m_u,box2d.b2RopeJoint.prototype.InitVelocityConstraints.s_P);d.SelfMulSub(this.m_invMassA,p),e-=this.m_invIA*box2d.b2CrossVV(this.m_rA,p),h.SelfMulAdd(this.m_invMassB,p),i+=this.m_invIB*box2d.b2CrossVV(this.m_rB,p)}else this.m_impulse=0;a.velocities[this.m_indexA].w=e,a.velocities[this.m_indexB].w=i},box2d.b2RopeJoint.prototype.InitVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2RopeJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2RopeJoint.prototype.SolveVelocityConstraints.s_vpA),g=box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2RopeJoint.prototype.SolveVelocityConstraints.s_vpB),h=this.m_length-this.m_maxLength,i=box2d.b2DotVV(this.m_u,box2d.b2SubVV(g,f,box2d.b2Vec2.s_t0));0>h&&(i+=a.step.inv_dt*h);var j=-this.m_mass*i,k=this.m_impulse;this.m_impulse=box2d.b2Min(0,this.m_impulse+j),j=this.m_impulse-k;var l=box2d.b2MulSV(j,this.m_u,box2d.b2RopeJoint.prototype.SolveVelocityConstraints.s_P);b.SelfMulSub(this.m_invMassA,l),c-=this.m_invIA*box2d.b2CrossVV(this.m_rA,l),d.SelfMulAdd(this.m_invMassB,l),e+=this.m_invIB*box2d.b2CrossVV(this.m_rB,l),a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2RopeJoint.prototype.SolveVelocityConstraints.s_vpA=new box2d.b2Vec2,box2d.b2RopeJoint.prototype.SolveVelocityConstraints.s_vpB=new box2d.b2Vec2,box2d.b2RopeJoint.prototype.SolveVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2RopeJoint.prototype.SolvePositionConstraints=function(a){var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.positions[this.m_indexB].c,e=a.positions[this.m_indexB].a,f=this.m_qA.SetAngleRadians(c),g=this.m_qB.SetAngleRadians(e);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var h=box2d.b2MulRV(f,this.m_lalcA,this.m_rA);box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var i=box2d.b2MulRV(g,this.m_lalcB,this.m_rB),j=this.m_u.Copy(d).SelfAdd(i).SelfSub(b).SelfSub(h),k=j.Normalize(),l=k-this.m_maxLength;l=box2d.b2Clamp(l,0,box2d.b2_maxLinearCorrection);var m=-this.m_mass*l,n=box2d.b2MulSV(m,j,box2d.b2RopeJoint.prototype.SolvePositionConstraints.s_P);return b.SelfMulSub(this.m_invMassA,n),c-=this.m_invIA*box2d.b2CrossVV(h,n),d.SelfMulAdd(this.m_invMassB,n),e+=this.m_invIB*box2d.b2CrossVV(i,n),a.positions[this.m_indexA].a=c,a.positions[this.m_indexB].a=e,k-this.m_maxLength>8&255,this.cf._typeA=this._key>>16&255,this.cf._typeB=this._key>>24&255}}),box2d.b2ManifoldPoint=function(){this.localPoint=new box2d.b2Vec2,this.id=new box2d.b2ContactID},box2d.b2ManifoldPoint.prototype.localPoint=null,box2d.b2ManifoldPoint.prototype.normalImpulse=0,box2d.b2ManifoldPoint.prototype.tangentImpulse=0,box2d.b2ManifoldPoint.prototype.id=null,box2d.b2ManifoldPoint.MakeArray=function(a){return box2d.b2MakeArray(a,function(){return new box2d.b2ManifoldPoint})},box2d.b2ManifoldPoint.prototype.Reset=function(){this.localPoint.SetZero(),this.normalImpulse=0,this.tangentImpulse=0,this.id.key=0},box2d.b2ManifoldPoint.prototype.Copy=function(a){return this.localPoint.Copy(a.localPoint),this.normalImpulse=a.normalImpulse,this.tangentImpulse=a.tangentImpulse,this.id.Copy(a.id),this},box2d.b2ManifoldType={e_unknown:-1,e_circles:0,e_faceA:1,e_faceB:2},goog.exportProperty(box2d.b2ManifoldType,"e_unknown",box2d.b2ManifoldType.e_unknown),goog.exportProperty(box2d.b2ManifoldType,"e_circles",box2d.b2ManifoldType.e_circles),goog.exportProperty(box2d.b2ManifoldType,"e_faceA",box2d.b2ManifoldType.e_faceA),goog.exportProperty(box2d.b2ManifoldType,"e_faceB",box2d.b2ManifoldType.e_faceB),box2d.b2Manifold=function(){this.points=box2d.b2ManifoldPoint.MakeArray(box2d.b2_maxManifoldPoints),this.localNormal=new box2d.b2Vec2,this.localPoint=new box2d.b2Vec2,this.type=box2d.b2ManifoldType.e_unknown,this.pointCount=0},box2d.b2Manifold.prototype.points=null,box2d.b2Manifold.prototype.localNormal=null,box2d.b2Manifold.prototype.localPoint=null,box2d.b2Manifold.prototype.type=box2d.b2ManifoldType.e_unknown,box2d.b2Manifold.prototype.pointCount=0,box2d.b2Manifold.prototype.Reset=function(){for(var a=0,b=box2d.b2_maxManifoldPoints;b>a;++a)this.points[a].Reset();this.localNormal.SetZero(),this.localPoint.SetZero(),this.type=box2d.b2ManifoldType.e_unknown,this.pointCount=0},box2d.b2Manifold.prototype.Copy=function(a){this.pointCount=a.pointCount;for(var b=0,c=box2d.b2_maxManifoldPoints;c>b;++b)this.points[b].Copy(a.points[b]);return this.localNormal.Copy(a.localNormal),this.localPoint.Copy(a.localPoint),this.type=a.type,this},box2d.b2Manifold.prototype.Clone=function(){return(new box2d.b2Manifold).Copy(this)},box2d.b2WorldManifold=function(){this.normal=new box2d.b2Vec2,this.points=box2d.b2Vec2.MakeArray(box2d.b2_maxManifoldPoints),this.separations=box2d.b2MakeNumberArray(box2d.b2_maxManifoldPoints)},box2d.b2WorldManifold.prototype.normal=null,box2d.b2WorldManifold.prototype.points=null,box2d.b2WorldManifold.prototype.separations=null,box2d.b2WorldManifold.prototype.Initialize=function(a,b,c,d,e){if(0!==a.pointCount)switch(a.type){case box2d.b2ManifoldType.e_circles:this.normal.SetXY(1,0);var f=box2d.b2MulXV(b,a.localPoint,box2d.b2WorldManifold.prototype.Initialize.s_pointA),g=box2d.b2MulXV(d,a.points[0].localPoint,box2d.b2WorldManifold.prototype.Initialize.s_pointB);box2d.b2DistanceSquaredVV(f,g)>box2d.b2_epsilon_sq&&box2d.b2SubVV(g,f,this.normal).SelfNormalize();var h=box2d.b2AddVMulSV(f,c,this.normal,box2d.b2WorldManifold.prototype.Initialize.s_cA),i=box2d.b2SubVMulSV(g,e,this.normal,box2d.b2WorldManifold.prototype.Initialize.s_cB);box2d.b2MidVV(h,i,this.points[0]),this.separations[0]=box2d.b2DotVV(box2d.b2SubVV(i,h,box2d.b2Vec2.s_t0),this.normal);break;case box2d.b2ManifoldType.e_faceA:box2d.b2MulRV(b.q,a.localNormal,this.normal);for(var j=box2d.b2MulXV(b,a.localPoint,box2d.b2WorldManifold.prototype.Initialize.s_planePoint),k=0,l=a.pointCount;l>k;++k){var m=box2d.b2MulXV(d,a.points[k].localPoint,box2d.b2WorldManifold.prototype.Initialize.s_clipPoint),n=c-box2d.b2DotVV(box2d.b2SubVV(m,j,box2d.b2Vec2.s_t0),this.normal),h=box2d.b2AddVMulSV(m,n,this.normal,box2d.b2WorldManifold.prototype.Initialize.s_cA),i=box2d.b2SubVMulSV(m,e,this.normal,box2d.b2WorldManifold.prototype.Initialize.s_cB);box2d.b2MidVV(h,i,this.points[k]),this.separations[k]=box2d.b2DotVV(box2d.b2SubVV(i,h,box2d.b2Vec2.s_t0),this.normal)}break;case box2d.b2ManifoldType.e_faceB:box2d.b2MulRV(d.q,a.localNormal,this.normal);for(var j=box2d.b2MulXV(d,a.localPoint,box2d.b2WorldManifold.prototype.Initialize.s_planePoint),k=0,l=a.pointCount;l>k;++k){var m=box2d.b2MulXV(b,a.points[k].localPoint,box2d.b2WorldManifold.prototype.Initialize.s_clipPoint),n=e-box2d.b2DotVV(box2d.b2SubVV(m,j,box2d.b2Vec2.s_t0),this.normal),i=box2d.b2AddVMulSV(m,n,this.normal,box2d.b2WorldManifold.prototype.Initialize.s_cB),h=box2d.b2SubVMulSV(m,c,this.normal,box2d.b2WorldManifold.prototype.Initialize.s_cA);box2d.b2MidVV(h,i,this.points[k]),this.separations[k]=box2d.b2DotVV(box2d.b2SubVV(h,i,box2d.b2Vec2.s_t0),this.normal)}this.normal.SelfNeg()}},box2d.b2WorldManifold.prototype.Initialize.s_pointA=new box2d.b2Vec2,box2d.b2WorldManifold.prototype.Initialize.s_pointB=new box2d.b2Vec2,box2d.b2WorldManifold.prototype.Initialize.s_cA=new box2d.b2Vec2,box2d.b2WorldManifold.prototype.Initialize.s_cB=new box2d.b2Vec2,box2d.b2WorldManifold.prototype.Initialize.s_planePoint=new box2d.b2Vec2,box2d.b2WorldManifold.prototype.Initialize.s_clipPoint=new box2d.b2Vec2,box2d.b2PointState={b2_nullState:0,b2_addState:1,b2_persistState:2,b2_removeState:3},goog.exportProperty(box2d.b2PointState,"b2_nullState ",box2d.b2PointState.b2_nullState),goog.exportProperty(box2d.b2PointState,"b2_addState ",box2d.b2PointState.b2_addState),goog.exportProperty(box2d.b2PointState,"b2_persistState",box2d.b2PointState.b2_persistState),goog.exportProperty(box2d.b2PointState,"b2_removeState ",box2d.b2PointState.b2_removeState),box2d.b2GetPointStates=function(a,b,c,d){for(var e=0,f=c.pointCount;f>e;++e){var g=c.points[e].id,h=g.key;a[e]=box2d.b2PointState.b2_removeState;for(var i=0,j=d.pointCount;j>i;++i)if(d.points[i].id.key===h){a[e]=box2d.b2PointState.b2_persistState;break}}for(var f=box2d.b2_maxManifoldPoints;f>e;++e)a[e]=box2d.b2PointState.b2_nullState;for(var e=0,f=d.pointCount;f>e;++e){var g=d.points[e].id,h=g.key;b[e]=box2d.b2PointState.b2_addState;for(var i=0,j=c.pointCount;j>i;++i)if(c.points[i].id.key===h){b[e]=box2d.b2PointState.b2_persistState;break}}for(var f=box2d.b2_maxManifoldPoints;f>e;++e)b[e]=box2d.b2PointState.b2_nullState},box2d.b2ClipVertex=function(){this.v=new box2d.b2Vec2,this.id=new box2d.b2ContactID},box2d.b2ClipVertex.prototype.v=null,box2d.b2ClipVertex.prototype.id=null,box2d.b2ClipVertex.MakeArray=function(a){return box2d.b2MakeArray(a,function(){return new box2d.b2ClipVertex})},box2d.b2ClipVertex.prototype.Copy=function(a){return this.v.Copy(a.v),this.id.Copy(a.id),this},box2d.b2RayCastInput=function(){this.p1=new box2d.b2Vec2,this.p2=new box2d.b2Vec2,this.maxFraction=1},box2d.b2RayCastInput.prototype.p1=null,box2d.b2RayCastInput.prototype.p2=null,box2d.b2RayCastInput.prototype.maxFraction=1,box2d.b2RayCastInput.prototype.Copy=function(a){return this.p1.Copy(a.p1),this.p2.Copy(a.p2),this.maxFraction=a.maxFraction,this},box2d.b2RayCastOutput=function(){this.normal=new box2d.b2Vec2,this.fraction=0},box2d.b2RayCastOutput.prototype.normal=null,box2d.b2RayCastOutput.prototype.fraction=0,box2d.b2RayCastOutput.prototype.Copy=function(a){return this.normal.Copy(a.normal),this.fraction=a.fraction,this},box2d.b2AABB=function(){this.lowerBound=new box2d.b2Vec2,this.upperBound=new box2d.b2Vec2,this.m_out_center=new box2d.b2Vec2,this.m_out_extent=new box2d.b2Vec2},box2d.b2AABB.prototype.lowerBound=null,box2d.b2AABB.prototype.upperBound=null,box2d.b2AABB.prototype.m_out_center=null,box2d.b2AABB.prototype.m_out_extent=null,box2d.b2AABB.prototype.Copy=function(a){return this.lowerBound.Copy(a.lowerBound),this.upperBound.Copy(a.upperBound),this},box2d.b2AABB.prototype.IsValid=function(){var a=this.upperBound.x-this.lowerBound.x,b=this.upperBound.y-this.lowerBound.y,c=a>=0&&b>=0;return c=c&&this.lowerBound.IsValid()&&this.upperBound.IsValid()},box2d.b2AABB.prototype.GetCenter=function(){return box2d.b2MidVV(this.lowerBound,this.upperBound,this.m_out_center)},box2d.b2AABB.prototype.GetExtents=function(){return box2d.b2ExtVV(this.lowerBound,this.upperBound,this.m_out_extent)},box2d.b2AABB.prototype.GetPerimeter=function(){var a=this.upperBound.x-this.lowerBound.x,b=this.upperBound.y-this.lowerBound.y;return 2*(a+b)},box2d.b2AABB.prototype.Combine1=function(a){return this.lowerBound.x=box2d.b2Min(this.lowerBound.x,a.lowerBound.x),this.lowerBound.y=box2d.b2Min(this.lowerBound.y,a.lowerBound.y),this.upperBound.x=box2d.b2Max(this.upperBound.x,a.upperBound.x),this.upperBound.y=box2d.b2Max(this.upperBound.y,a.upperBound.y),this},box2d.b2AABB.prototype.Combine2=function(a,b){return this.lowerBound.x=box2d.b2Min(a.lowerBound.x,b.lowerBound.x),this.lowerBound.y=box2d.b2Min(a.lowerBound.y,b.lowerBound.y),this.upperBound.x=box2d.b2Max(a.upperBound.x,b.upperBound.x),this.upperBound.y=box2d.b2Max(a.upperBound.y,b.upperBound.y),this},box2d.b2AABB.Combine=function(a,b,c){return c.Combine2(a,b),c},box2d.b2AABB.prototype.Contains=function(a){var b=!0;return b=b&&this.lowerBound.x<=a.lowerBound.x,b=b&&this.lowerBound.y<=a.lowerBound.y,b=b&&a.upperBound.x<=this.upperBound.x,b=b&&a.upperBound.y<=this.upperBound.y},box2d.b2AABB.prototype.RayCast=function(a,b){var c=-box2d.b2_maxFloat,d=box2d.b2_maxFloat,e=b.p1.x,f=b.p1.y,g=b.p2.x-b.p1.x,h=b.p2.y-b.p1.y,i=box2d.b2Abs(g),j=box2d.b2Abs(h),k=a.normal;if(in){var p=m;m=n,n=p,o=1}if(m>c&&(k.x=o,k.y=0,c=m),d=box2d.b2Min(d,n),c>d)return!1}if(jn){var p=m;m=n,n=p,o=1}if(m>c&&(k.x=0,k.y=o,c=m),d=box2d.b2Min(d,n),c>d)return!1}return 0>c||b.maxFraction0||c>0?!1:d>0||e>0?!1:!0},box2d.b2TestOverlapAABB=function(a,b){var c=b.lowerBound.x-a.upperBound.x,d=b.lowerBound.y-a.upperBound.y,e=a.lowerBound.x-b.upperBound.x,f=a.lowerBound.y-b.upperBound.y;return c>0||d>0?!1:e>0||f>0?!1:!0},box2d.b2ClipSegmentToLine=function(a,b,c,d,e){var f=0,g=b[0],h=b[1],i=box2d.b2DotVV(c,g.v)-d,j=box2d.b2DotVV(c,h.v)-d;if(0>=i&&a[f++].Copy(g),0>=j&&a[f++].Copy(h),0>i*j){var k=i/(i-j),l=a[f].v;l.x=g.v.x+k*(h.v.x-g.v.x),l.y=g.v.y+k*(h.v.y-g.v.y);var m=a[f].id;m.cf.indexA=e,m.cf.indexB=g.id.cf.indexB,m.cf.typeA=box2d.b2ContactFeatureType.e_vertex,m.cf.typeB=box2d.b2ContactFeatureType.e_face,++f}return f},box2d.b2TestOverlapShape=function(a,b,c,d,e,f){var g=box2d.b2TestOverlapShape.s_input.Reset(); +g.proxyA.SetShape(a,b),g.proxyB.SetShape(c,d),g.transformA.Copy(e),g.transformB.Copy(f),g.useRadii=!0;var h=box2d.b2TestOverlapShape.s_simplexCache.Reset();h.count=0;var i=box2d.b2TestOverlapShape.s_output.Reset();return box2d.b2Distance(i,h,g),i.distance<10*box2d.b2_epsilon},box2d.b2TestOverlapShape.s_input=new box2d.b2DistanceInput,box2d.b2TestOverlapShape.s_simplexCache=new box2d.b2SimplexCache,box2d.b2TestOverlapShape.s_output=new box2d.b2DistanceOutput,goog.provide("box2d.b2Timer"),goog.require("box2d.b2Settings"),box2d.b2Timer=function(){this.m_start=(new Date).getTime()},box2d.b2Timer.prototype.m_start=0,box2d.b2Timer.prototype.Reset=function(){return this.m_start=(new Date).getTime(),this},box2d.b2Timer.prototype.GetMilliseconds=function(){return(new Date).getTime()-this.m_start},box2d.b2Counter=function(){},box2d.b2Counter.prototype.m_count=0,box2d.b2Counter.prototype.m_min_count=0,box2d.b2Counter.prototype.m_max_count=0,box2d.b2Counter.prototype.GetCount=function(){return this.m_count},box2d.b2Counter.prototype.GetMinCount=function(){return this.m_min_count},box2d.b2Counter.prototype.GetMaxCount=function(){return this.m_max_count},box2d.b2Counter.prototype.ResetCount=function(){var a=this.m_count;return this.m_count=0,a},box2d.b2Counter.prototype.ResetMinCount=function(){this.m_min_count=0},box2d.b2Counter.prototype.ResetMaxCount=function(){this.m_max_count=0},box2d.b2Counter.prototype.Increment=function(){this.m_count++,this.m_max_countthis.m_count&&(this.m_min_count=this.m_count)},goog.provide("box2d.b2TimeOfImpact"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Distance"),goog.require("box2d.b2Math"),goog.require("box2d.b2Timer"),box2d.b2_toiTime=0,box2d.b2_toiMaxTime=0,box2d.b2_toiCalls=0,box2d.b2_toiIters=0,box2d.b2_toiMaxIters=0,box2d.b2_toiRootIters=0,box2d.b2_toiMaxRootIters=0,box2d.b2TOIInput=function(){this.proxyA=new box2d.b2DistanceProxy,this.proxyB=new box2d.b2DistanceProxy,this.sweepA=new box2d.b2Sweep,this.sweepB=new box2d.b2Sweep},box2d.b2TOIInput.prototype.proxyA=null,box2d.b2TOIInput.prototype.proxyB=null,box2d.b2TOIInput.prototype.sweepA=null,box2d.b2TOIInput.prototype.sweepB=null,box2d.b2TOIInput.prototype.tMax=0,box2d.b2TOIOutputState={e_unknown:0,e_failed:1,e_overlapped:2,e_touching:3,e_separated:4},goog.exportProperty(box2d.b2TOIOutputState,"e_unknown",box2d.b2TOIOutputState.e_unknown),goog.exportProperty(box2d.b2TOIOutputState,"e_failed",box2d.b2TOIOutputState.e_failed),goog.exportProperty(box2d.b2TOIOutputState,"e_overlapped",box2d.b2TOIOutputState.e_overlapped),goog.exportProperty(box2d.b2TOIOutputState,"e_touching",box2d.b2TOIOutputState.e_touching),goog.exportProperty(box2d.b2TOIOutputState,"e_separated",box2d.b2TOIOutputState.e_separated),box2d.b2TOIOutput=function(){},box2d.b2TOIOutput.prototype.state=box2d.b2TOIOutputState.e_unknown,box2d.b2TOIOutput.prototype.t=0,box2d.b2SeparationFunctionType={e_unknown:-1,e_points:0,e_faceA:1,e_faceB:2},goog.exportProperty(box2d.b2SeparationFunctionType,"e_unknown",box2d.b2SeparationFunctionType.e_unknown),goog.exportProperty(box2d.b2SeparationFunctionType,"e_points",box2d.b2SeparationFunctionType.e_points),goog.exportProperty(box2d.b2SeparationFunctionType,"e_faceA",box2d.b2SeparationFunctionType.e_faceA),goog.exportProperty(box2d.b2SeparationFunctionType,"e_faceB",box2d.b2SeparationFunctionType.e_faceB),box2d.b2SeparationFunction=function(){this.m_sweepA=new box2d.b2Sweep,this.m_sweepB=new box2d.b2Sweep,this.m_localPoint=new box2d.b2Vec2,this.m_axis=new box2d.b2Vec2},box2d.b2SeparationFunction.prototype.m_proxyA=null,box2d.b2SeparationFunction.prototype.m_proxyB=null,box2d.b2SeparationFunction.prototype.m_sweepA=null,box2d.b2SeparationFunction.prototype.m_sweepB=null,box2d.b2SeparationFunction.prototype.m_type=box2d.b2SeparationFunctionType.e_unknown,box2d.b2SeparationFunction.prototype.m_localPoint=null,box2d.b2SeparationFunction.prototype.m_axis=null,box2d.b2SeparationFunction.prototype.Initialize=function(a,b,c,d,e,f){this.m_proxyA=b,this.m_proxyB=d;var g=a.count;box2d.ENABLE_ASSERTS&&box2d.b2Assert(g>0&&3>g),this.m_sweepA.Copy(c),this.m_sweepB.Copy(e);var h=box2d.b2TimeOfImpact.s_xfA,i=box2d.b2TimeOfImpact.s_xfB;if(this.m_sweepA.GetTransform(h,f),this.m_sweepB.GetTransform(i,f),1===g){this.m_type=box2d.b2SeparationFunctionType.e_points;var j=this.m_proxyA.GetVertex(a.indexA[0]),k=this.m_proxyB.GetVertex(a.indexB[0]),l=box2d.b2MulXV(h,j,box2d.b2TimeOfImpact.s_pointA),m=box2d.b2MulXV(i,k,box2d.b2TimeOfImpact.s_pointB);box2d.b2SubVV(m,l,this.m_axis);var n=this.m_axis.Normalize();return n}if(a.indexA[0]===a.indexA[1]){this.m_type=box2d.b2SeparationFunctionType.e_faceB;var o=this.m_proxyB.GetVertex(a.indexB[0]),p=this.m_proxyB.GetVertex(a.indexB[1]);box2d.b2CrossVOne(box2d.b2SubVV(p,o,box2d.b2Vec2.s_t0),this.m_axis).SelfNormalize();var q=box2d.b2MulRV(i.q,this.m_axis,box2d.b2TimeOfImpact.s_normal);box2d.b2MidVV(o,p,this.m_localPoint);var m=box2d.b2MulXV(i,this.m_localPoint,box2d.b2TimeOfImpact.s_pointB),j=this.m_proxyA.GetVertex(a.indexA[0]),l=box2d.b2MulXV(h,j,box2d.b2TimeOfImpact.s_pointA),n=box2d.b2DotVV(box2d.b2SubVV(l,m,box2d.b2Vec2.s_t0),q);return 0>n&&(this.m_axis.SelfNeg(),n=-n),n}this.m_type=box2d.b2SeparationFunctionType.e_faceA;var r=this.m_proxyA.GetVertex(a.indexA[0]),s=this.m_proxyA.GetVertex(a.indexA[1]);box2d.b2CrossVOne(box2d.b2SubVV(s,r,box2d.b2Vec2.s_t0),this.m_axis).SelfNormalize();var q=box2d.b2MulRV(h.q,this.m_axis,box2d.b2TimeOfImpact.s_normal);box2d.b2MidVV(r,s,this.m_localPoint);var l=box2d.b2MulXV(h,this.m_localPoint,box2d.b2TimeOfImpact.s_pointA),k=this.m_proxyB.GetVertex(a.indexB[0]),m=box2d.b2MulXV(i,k,box2d.b2TimeOfImpact.s_pointB),n=box2d.b2DotVV(box2d.b2SubVV(m,l,box2d.b2Vec2.s_t0),q);return 0>n&&(this.m_axis.SelfNeg(),n=-n),n},box2d.b2SeparationFunction.prototype.FindMinSeparation=function(a,b,c){var d=box2d.b2TimeOfImpact.s_xfA,e=box2d.b2TimeOfImpact.s_xfB;switch(this.m_sweepA.GetTransform(d,c),this.m_sweepB.GetTransform(e,c),this.m_type){case box2d.b2SeparationFunctionType.e_points:var f=box2d.b2MulTRV(d.q,this.m_axis,box2d.b2TimeOfImpact.s_axisA),g=box2d.b2MulTRV(e.q,box2d.b2NegV(this.m_axis,box2d.b2Vec2.s_t0),box2d.b2TimeOfImpact.s_axisB);a[0]=this.m_proxyA.GetSupport(f),b[0]=this.m_proxyB.GetSupport(g);var h=this.m_proxyA.GetVertex(a[0]),i=this.m_proxyB.GetVertex(b[0]),j=box2d.b2MulXV(d,h,box2d.b2TimeOfImpact.s_pointA),k=box2d.b2MulXV(e,i,box2d.b2TimeOfImpact.s_pointB),l=box2d.b2DotVV(box2d.b2SubVV(k,j,box2d.b2Vec2.s_t0),this.m_axis);return l;case box2d.b2SeparationFunctionType.e_faceA:var m=box2d.b2MulRV(d.q,this.m_axis,box2d.b2TimeOfImpact.s_normal),j=box2d.b2MulXV(d,this.m_localPoint,box2d.b2TimeOfImpact.s_pointA),g=box2d.b2MulTRV(e.q,box2d.b2NegV(m,box2d.b2Vec2.s_t0),box2d.b2TimeOfImpact.s_axisB);a[0]=-1,b[0]=this.m_proxyB.GetSupport(g);var i=this.m_proxyB.GetVertex(b[0]),k=box2d.b2MulXV(e,i,box2d.b2TimeOfImpact.s_pointB),l=box2d.b2DotVV(box2d.b2SubVV(k,j,box2d.b2Vec2.s_t0),m);return l;case box2d.b2SeparationFunctionType.e_faceB:var m=box2d.b2MulRV(e.q,this.m_axis,box2d.b2TimeOfImpact.s_normal),k=box2d.b2MulXV(e,this.m_localPoint,box2d.b2TimeOfImpact.s_pointB),f=box2d.b2MulTRV(d.q,box2d.b2NegV(m,box2d.b2Vec2.s_t0),box2d.b2TimeOfImpact.s_axisA);b[0]=-1,a[0]=this.m_proxyA.GetSupport(f);var h=this.m_proxyA.GetVertex(a[0]),j=box2d.b2MulXV(d,h,box2d.b2TimeOfImpact.s_pointA),l=box2d.b2DotVV(box2d.b2SubVV(j,k,box2d.b2Vec2.s_t0),m);return l;default:return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),a[0]=-1,b[0]=-1,0}},box2d.b2SeparationFunction.prototype.Evaluate=function(a,b,c){var d=box2d.b2TimeOfImpact.s_xfA,e=box2d.b2TimeOfImpact.s_xfB;switch(this.m_sweepA.GetTransform(d,c),this.m_sweepB.GetTransform(e,c),this.m_type){case box2d.b2SeparationFunctionType.e_points:var f=this.m_proxyA.GetVertex(a),g=this.m_proxyB.GetVertex(b),h=box2d.b2MulXV(d,f,box2d.b2TimeOfImpact.s_pointA),i=box2d.b2MulXV(e,g,box2d.b2TimeOfImpact.s_pointB),j=box2d.b2DotVV(box2d.b2SubVV(i,h,box2d.b2Vec2.s_t0),this.m_axis);return j;case box2d.b2SeparationFunctionType.e_faceA:var k=box2d.b2MulRV(d.q,this.m_axis,box2d.b2TimeOfImpact.s_normal),h=box2d.b2MulXV(d,this.m_localPoint,box2d.b2TimeOfImpact.s_pointA),g=this.m_proxyB.GetVertex(b),i=box2d.b2MulXV(e,g,box2d.b2TimeOfImpact.s_pointB),j=box2d.b2DotVV(box2d.b2SubVV(i,h,box2d.b2Vec2.s_t0),k);return j;case box2d.b2SeparationFunctionType.e_faceB:var k=box2d.b2MulRV(e.q,this.m_axis,box2d.b2TimeOfImpact.s_normal),i=box2d.b2MulXV(e,this.m_localPoint,box2d.b2TimeOfImpact.s_pointB),f=this.m_proxyA.GetVertex(a),h=box2d.b2MulXV(d,f,box2d.b2TimeOfImpact.s_pointA),j=box2d.b2DotVV(box2d.b2SubVV(h,i,box2d.b2Vec2.s_t0),k);return j;default:return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),0}},box2d.b2TimeOfImpact=function(a,b){var c=box2d.b2TimeOfImpact.s_timer.Reset();++box2d.b2_toiCalls,a.state=box2d.b2TOIOutputState.e_unknown,a.t=b.tMax;var d=b.proxyA,e=b.proxyB,f=box2d.b2TimeOfImpact.s_sweepA.Copy(b.sweepA),g=box2d.b2TimeOfImpact.s_sweepB.Copy(b.sweepB);f.Normalize(),g.Normalize();var h=b.tMax,i=d.m_radius+e.m_radius,j=box2d.b2Max(box2d.b2_linearSlop,i-3*box2d.b2_linearSlop),k=.25*box2d.b2_linearSlop;box2d.ENABLE_ASSERTS&&box2d.b2Assert(j>k);var l=0,m=20,n=0,o=box2d.b2TimeOfImpact.s_cache;o.count=0;var p=box2d.b2TimeOfImpact.s_distanceInput;for(p.proxyA=b.proxyA,p.proxyB=b.proxyB,p.useRadii=!1;;){var q=box2d.b2TimeOfImpact.s_xfA,r=box2d.b2TimeOfImpact.s_xfB;f.GetTransform(q,l),g.GetTransform(r,l),p.transformA.Copy(q),p.transformB.Copy(r);var s=box2d.b2TimeOfImpact.s_distanceOutput;if(box2d.b2Distance(s,o,p),s.distance<=0){a.state=box2d.b2TOIOutputState.e_overlapped,a.t=0;break}if(s.distancej+k){a.state=box2d.b2TOIOutputState.e_separated,a.t=h,u=!0;break}if(z>j-k){l=v;break}var A=t.Evaluate(x[0],y[0],l);if(j-k>A){a.state=box2d.b2TOIOutputState.e_failed,a.t=l,u=!0;break}if(j+k>=A){a.state=box2d.b2TOIOutputState.e_touching,a.t=l,u=!0;break}for(var B=0,C=l,D=v;;){var E=0;E=1&B?C+(j-A)*(D-C)/(z-A):.5*(C+D),++B,++box2d.b2_toiRootIters;var F=t.Evaluate(x[0],y[0],E);if(box2d.b2Abs(F-j)j?(C=E,A=F):(D=E,z=F),50===B)break}if(box2d.b2_toiMaxRootIters=box2d.b2Max(box2d.b2_toiMaxRootIters,B),++w,w===box2d.b2_maxPolygonVertices)break}if(++n,++box2d.b2_toiIters,u)break;if(n===m){a.state=box2d.b2TOIOutputState.e_failed,a.t=l;break}}box2d.b2_toiMaxIters=box2d.b2Max(box2d.b2_toiMaxIters,n);var G=c.GetMilliseconds();box2d.b2_toiMaxTime=box2d.b2Max(box2d.b2_toiMaxTime,G),box2d.b2_toiTime+=G},box2d.b2TimeOfImpact.s_timer=new box2d.b2Timer,box2d.b2TimeOfImpact.s_cache=new box2d.b2SimplexCache,box2d.b2TimeOfImpact.s_distanceInput=new box2d.b2DistanceInput,box2d.b2TimeOfImpact.s_distanceOutput=new box2d.b2DistanceOutput,box2d.b2TimeOfImpact.s_xfA=new box2d.b2Transform,box2d.b2TimeOfImpact.s_xfB=new box2d.b2Transform,box2d.b2TimeOfImpact.s_indexA=box2d.b2MakeNumberArray(1),box2d.b2TimeOfImpact.s_indexB=box2d.b2MakeNumberArray(1),box2d.b2TimeOfImpact.s_fcn=new box2d.b2SeparationFunction,box2d.b2TimeOfImpact.s_sweepA=new box2d.b2Sweep,box2d.b2TimeOfImpact.s_sweepB=new box2d.b2Sweep,box2d.b2TimeOfImpact.s_pointA=new box2d.b2Vec2,box2d.b2TimeOfImpact.s_pointB=new box2d.b2Vec2,box2d.b2TimeOfImpact.s_normal=new box2d.b2Vec2,box2d.b2TimeOfImpact.s_axisA=new box2d.b2Vec2,box2d.b2TimeOfImpact.s_axisB=new box2d.b2Vec2,goog.provide("box2d.b2Contact"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Collision"),goog.require("box2d.b2TimeOfImpact"),box2d.b2MixFriction=function(a,b){return box2d.b2Sqrt(a*b)},box2d.b2MixRestitution=function(a,b){return a>b?a:b},box2d.b2ContactEdge=function(){},box2d.b2ContactEdge.prototype.other=null,box2d.b2ContactEdge.prototype.contact=null,box2d.b2ContactEdge.prototype.prev=null,box2d.b2ContactEdge.prototype.next=null,box2d.b2ContactFlag={e_none:0,e_islandFlag:1,e_touchingFlag:2,e_enabledFlag:4,e_filterFlag:8,e_bulletHitFlag:16,e_toiFlag:32},goog.exportProperty(box2d.b2ContactFlag,"e_none",box2d.b2ContactFlag.e_none),goog.exportProperty(box2d.b2ContactFlag,"e_islandFlag",box2d.b2ContactFlag.e_islandFlag),goog.exportProperty(box2d.b2ContactFlag,"e_touchingFlag",box2d.b2ContactFlag.e_touchingFlag),goog.exportProperty(box2d.b2ContactFlag,"e_enabledFlag",box2d.b2ContactFlag.e_enabledFlag),goog.exportProperty(box2d.b2ContactFlag,"e_filterFlag",box2d.b2ContactFlag.e_filterFlag),goog.exportProperty(box2d.b2ContactFlag,"e_bulletHitFlag",box2d.b2ContactFlag.e_bulletHitFlag),goog.exportProperty(box2d.b2ContactFlag,"e_toiFlag",box2d.b2ContactFlag.e_toiFlag),box2d.b2Contact=function(){this.m_nodeA=new box2d.b2ContactEdge,this.m_nodeB=new box2d.b2ContactEdge,this.m_manifold=new box2d.b2Manifold,this.m_oldManifold=new box2d.b2Manifold},box2d.b2Contact.prototype.m_flags=box2d.b2ContactFlag.e_none,box2d.b2Contact.prototype.m_prev=null,box2d.b2Contact.prototype.m_next=null,box2d.b2Contact.prototype.m_nodeA=null,box2d.b2Contact.prototype.m_nodeB=null,box2d.b2Contact.prototype.m_fixtureA=null,box2d.b2Contact.prototype.m_fixtureB=null,box2d.b2Contact.prototype.m_indexA=0,box2d.b2Contact.prototype.m_indexB=0,box2d.b2Contact.prototype.m_manifold=null,box2d.b2Contact.prototype.m_toiCount=0,box2d.b2Contact.prototype.m_toi=0,box2d.b2Contact.prototype.m_friction=0,box2d.b2Contact.prototype.m_restitution=0,box2d.b2Contact.prototype.m_tangentSpeed=0,box2d.b2Contact.prototype.m_oldManifold=null,box2d.b2Contact.prototype.GetManifold=function(){return this.m_manifold},box2d.b2Contact.prototype.GetWorldManifold=function(a){var b=this.m_fixtureA.GetBody(),c=this.m_fixtureB.GetBody(),d=this.m_fixtureA.GetShape(),e=this.m_fixtureB.GetShape();a.Initialize(this.m_manifold,b.GetTransform(),d.m_radius,c.GetTransform(),e.m_radius)},box2d.b2Contact.prototype.IsTouching=function(){return(this.m_flags&box2d.b2ContactFlag.e_touchingFlag)===box2d.b2ContactFlag.e_touchingFlag},box2d.b2Contact.prototype.SetEnabled=function(a){a?this.m_flags|=box2d.b2ContactFlag.e_enabledFlag:this.m_flags&=~box2d.b2ContactFlag.e_enabledFlag},box2d.b2Contact.prototype.IsEnabled=function(){return(this.m_flags&box2d.b2ContactFlag.e_enabledFlag)===box2d.b2ContactFlag.e_enabledFlag},box2d.b2Contact.prototype.GetNext=function(){return this.m_next},box2d.b2Contact.prototype.GetFixtureA=function(){return this.m_fixtureA},box2d.b2Contact.prototype.GetChildIndexA=function(){return this.m_indexA},box2d.b2Contact.prototype.GetFixtureB=function(){return this.m_fixtureB},box2d.b2Contact.prototype.GetChildIndexB=function(){return this.m_indexB},box2d.b2Contact.prototype.Evaluate=function(){},box2d.b2Contact.prototype.FlagForFiltering=function(){this.m_flags|=box2d.b2ContactFlag.e_filterFlag},box2d.b2Contact.prototype.SetFriction=function(a){this.m_friction=a},box2d.b2Contact.prototype.GetFriction=function(){return this.m_friction},box2d.b2Contact.prototype.ResetFriction=function(){this.m_friction=box2d.b2MixFriction(this.m_fixtureA.m_friction,this.m_fixtureB.m_friction)},box2d.b2Contact.prototype.SetRestitution=function(a){this.m_restitution=a},box2d.b2Contact.prototype.GetRestitution=function(){return this.m_restitution},box2d.b2Contact.prototype.ResetRestitution=function(){this.m_restitution=box2d.b2MixRestitution(this.m_fixtureA.m_restitution,this.m_fixtureB.m_restitution)},box2d.b2Contact.prototype.SetTangentSpeed=function(a){this.m_tangentSpeed=a},box2d.b2Contact.prototype.GetTangentSpeed=function(){return this.m_tangentSpeed},box2d.b2Contact.prototype.Reset=function(a,b,c,d){this.m_flags=box2d.b2ContactFlag.e_enabledFlag,this.m_fixtureA=a,this.m_fixtureB=c,this.m_indexA=b,this.m_indexB=d,this.m_manifold.pointCount=0,this.m_prev=null,this.m_next=null,this.m_nodeA.contact=null,this.m_nodeA.prev=null,this.m_nodeA.next=null,this.m_nodeA.other=null,this.m_nodeB.contact=null,this.m_nodeB.prev=null,this.m_nodeB.next=null,this.m_nodeB.other=null,this.m_toiCount=0,this.m_friction=box2d.b2MixFriction(this.m_fixtureA.m_friction,this.m_fixtureB.m_friction),this.m_restitution=box2d.b2MixRestitution(this.m_fixtureA.m_restitution,this.m_fixtureB.m_restitution)},box2d.b2Contact.prototype.Update=function(a){var b=this.m_oldManifold;this.m_oldManifold=this.m_manifold,this.m_manifold=b,this.m_flags|=box2d.b2ContactFlag.e_enabledFlag;var c=!1,d=(this.m_flags&box2d.b2ContactFlag.e_touchingFlag)===box2d.b2ContactFlag.e_touchingFlag,e=this.m_fixtureA.IsSensor(),f=this.m_fixtureB.IsSensor(),g=e||f,h=this.m_fixtureA.GetBody(),i=this.m_fixtureB.GetBody(),j=h.GetTransform(),k=i.GetTransform();if(g){var l=this.m_fixtureA.GetShape(),m=this.m_fixtureB.GetShape();c=box2d.b2TestOverlapShape(l,this.m_indexA,m,this.m_indexB,j,k),this.m_manifold.pointCount=0}else{this.Evaluate(this.m_manifold,j,k),c=this.m_manifold.pointCount>0;for(var n=0;nb;++b)this.m_vertices[b].Copy(a.m_vertices[b]),this.m_normals[b].Copy(a.m_normals[b]);return this},box2d.b2PolygonShape.prototype.SetAsBox=function(a,b){return this.m_count=4,this.m_vertices[0].SetXY(-a,-b),this.m_vertices[1].SetXY(a,-b),this.m_vertices[2].SetXY(a,b),this.m_vertices[3].SetXY(-a,b),this.m_normals[0].SetXY(0,-1),this.m_normals[1].SetXY(1,0),this.m_normals[2].SetXY(0,1),this.m_normals[3].SetXY(-1,0),this.m_centroid.SetZero(),this},box2d.b2PolygonShape.prototype.SetAsOrientedBox=function(a,b,c,d){this.m_count=4,this.m_vertices[0].SetXY(-a,-b),this.m_vertices[1].SetXY(a,-b),this.m_vertices[2].SetXY(a,b),this.m_vertices[3].SetXY(-a,b),this.m_normals[0].SetXY(0,-1),this.m_normals[1].SetXY(1,0),this.m_normals[2].SetXY(0,1),this.m_normals[3].SetXY(-1,0),this.m_centroid.Copy(c);var e=new box2d.b2Transform;e.SetPosition(c),e.SetRotationAngleRadians(d);for(var f=0,g=this.m_count;g>f;++f)box2d.b2MulXV(e,this.m_vertices[f],this.m_vertices[f]),box2d.b2MulRV(e.q,this.m_normals[f],this.m_normals[f]);return this},box2d.b2PolygonShape.prototype.Set=function(a,b){if(void 0===b&&(b=a.length),box2d.ENABLE_ASSERTS&&box2d.b2Assert(b>=3&&b<=box2d.b2_maxPolygonVertices),3>b)return this.SetAsBox(1,1);for(var c=box2d.b2Min(b,box2d.b2_maxPolygonVertices),d=box2d.b2PolygonShape.prototype.Set.s_ps,e=0,f=0;c>f;++f){for(var g=a[f],h=!0,i=0;e>i;++i)if(box2d.b2DistanceSquaredVV(g,d[i])<.5*box2d.b2_linearSlop){h=!1;break}h&&d[e++].Copy(g)}if(c=e,3>c)return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),this.SetAsBox(1,1);for(var j=0,k=d[0].x,f=1;c>f;++f){var l=d[f].x;(l>k||l===k&&d[f].yi;++i)if(p!==o){var q=box2d.b2SubVV(d[p],d[m[n]],box2d.b2PolygonShape.prototype.Set.s_r),g=box2d.b2SubVV(d[i],d[m[n]],box2d.b2PolygonShape.prototype.Set.s_v),r=box2d.b2CrossVV(q,g);0>r&&(p=i),0===r&&g.GetLengthSquared()>q.GetLengthSquared()&&(p=i)}else p=i;if(++n,o=p,p===j)break}this.m_count=n;for(var f=0;n>f;++f)this.m_vertices[f].Copy(d[m[f]]);for(var f=0,s=n;s>f;++f){var t=this.m_vertices[f],u=this.m_vertices[(f+1)%s],v=box2d.b2SubVV(u,t,box2d.b2Vec2.s_t0);box2d.ENABLE_ASSERTS&&box2d.b2Assert(v.GetLengthSquared()>box2d.b2_epsilon_sq),box2d.b2CrossVOne(v,this.m_normals[f]).SelfNormalize()}return box2d.b2PolygonShape.ComputeCentroid(this.m_vertices,n,this.m_centroid),this},box2d.b2PolygonShape.prototype.Set.s_ps=box2d.b2Vec2.MakeArray(box2d.b2_maxPolygonVertices),box2d.b2PolygonShape.prototype.Set.s_hull=box2d.b2MakeNumberArray(box2d.b2_maxPolygonVertices),box2d.b2PolygonShape.prototype.Set.s_r=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.Set.s_v=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.SetAsVector=function(a,b){return this.Set(a,b),this},box2d.b2PolygonShape.prototype.SetAsArray=function(a,b){return this.Set(a,b),this},box2d.b2PolygonShape.prototype.GetChildCount=function(){return 1},box2d.b2PolygonShape.prototype.TestPoint=function(a,b){for(var c=box2d.b2MulTXV(a,b,box2d.b2PolygonShape.prototype.TestPoint.s_pLocal),d=0,e=this.m_count;e>d;++d){var f=box2d.b2DotVV(this.m_normals[d],box2d.b2SubVV(c,this.m_vertices[d],box2d.b2Vec2.s_t0));if(f>0)return!1}return!0},box2d.b2PolygonShape.prototype.TestPoint.s_pLocal=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.RayCast=function(a,b,c){for(var d=box2d.b2MulTXV(c,b.p1,box2d.b2PolygonShape.prototype.RayCast.s_p1),e=box2d.b2MulTXV(c,b.p2,box2d.b2PolygonShape.prototype.RayCast.s_p2),f=box2d.b2SubVV(e,d,box2d.b2PolygonShape.prototype.RayCast.s_d),g=0,h=b.maxFraction,i=-1,j=0,k=this.m_count;k>j;++j){var l=box2d.b2DotVV(this.m_normals[j],box2d.b2SubVV(this.m_vertices[j],d,box2d.b2Vec2.s_t0)),m=box2d.b2DotVV(this.m_normals[j],f);if(0===m){if(0>l)return!1}else 0>m&&g*m>l?(g=l/m,i=j):m>0&&h*m>l&&(h=l/m);if(g>h)return!1}return box2d.ENABLE_ASSERTS&&box2d.b2Assert(g>=0&&g<=b.maxFraction),i>=0?(a.fraction=g,box2d.b2MulRV(c.q,this.m_normals[i],a.normal),!0):!1},box2d.b2PolygonShape.prototype.RayCast.s_p1=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.RayCast.s_p2=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.RayCast.s_d=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeAABB=function(a,b){for(var c=box2d.b2MulXV(b,this.m_vertices[0],a.lowerBound),d=a.upperBound.Copy(c),e=0,f=this.m_count;f>e;++e){var g=box2d.b2MulXV(b,this.m_vertices[e],box2d.b2PolygonShape.prototype.ComputeAABB.s_v);box2d.b2MinV(g,c,c),box2d.b2MaxV(g,d,d)}var h=this.m_radius;c.SelfSubXY(h,h),d.SelfAddXY(h,h)},box2d.b2PolygonShape.prototype.ComputeAABB.s_v=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeMass=function(a,b){box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_count>=3);for(var c=box2d.b2PolygonShape.prototype.ComputeMass.s_center.SetZero(),d=0,e=0,f=box2d.b2PolygonShape.prototype.ComputeMass.s_s.SetZero(),g=0,h=this.m_count;h>g;++g)f.SelfAdd(this.m_vertices[g]);f.SelfMul(1/this.m_count);for(var i=1/3,g=0,h=this.m_count;h>g;++g){var j=box2d.b2SubVV(this.m_vertices[g],f,box2d.b2PolygonShape.prototype.ComputeMass.s_e1),k=box2d.b2SubVV(this.m_vertices[(g+1)%h],f,box2d.b2PolygonShape.prototype.ComputeMass.s_e2),l=box2d.b2CrossVV(j,k),m=.5*l;d+=m,c.SelfAdd(box2d.b2MulSV(m*i,box2d.b2AddVV(j,k,box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t1));var n=j.x,o=j.y,p=k.x,q=k.y,r=n*n+p*n+p*p,s=o*o+q*o+q*q;e+=.25*i*l*(r+s)}a.mass=b*d,box2d.ENABLE_ASSERTS&&box2d.b2Assert(d>box2d.b2_epsilon),c.SelfMul(1/d),box2d.b2AddVV(c,f,a.center),a.I=b*e,a.I+=a.mass*(box2d.b2DotVV(a.center,a.center)-box2d.b2DotVV(c,c))},box2d.b2PolygonShape.prototype.ComputeMass.s_center=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeMass.s_s=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeMass.s_e1=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeMass.s_e2=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.Validate=function(){for(var a=0;ah)return!1}return!0},box2d.b2PolygonShape.prototype.Validate.s_e=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.Validate.s_v=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.SetupDistanceProxy=function(a){a.m_vertices=this.m_vertices,a.m_count=this.m_count,a.m_radius=this.m_radius},box2d.b2PolygonShape.prototype.ComputeSubmergedArea=function(a,b,c,d){for(var e=box2d.b2MulTRV(c.q,a,box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_normalL),f=b-box2d.b2DotVV(a,c.p),g=box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_depths,h=0,i=-1,j=-1,k=!1,l=0,m=this.m_count;m>l;++l){g[l]=box2d.b2DotVV(e,this.m_vertices[l])-f;var n=g[l]<-box2d.b2_epsilon;l>0&&(n?k||(i=l-1,h++):k&&(j=l-1,h++)),k=n}switch(h){case 0:if(k){var o=box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_md;return this.ComputeMass(o,1),box2d.b2MulXV(c,o.center,d),o.mass}return 0;case 1:-1===i?i=this.m_count-1:j=this.m_count-1}for(var p=(i+1)%this.m_count,q=(j+1)%this.m_count,r=(0-g[i])/(g[p]-g[i]),s=(0-g[j])/(g[q]-g[j]),t=box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_intoVec.SetXY(this.m_vertices[i].x*(1-r)+this.m_vertices[p].x*r,this.m_vertices[i].y*(1-r)+this.m_vertices[p].y*r),u=box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_outoVec.SetXY(this.m_vertices[j].x*(1-s)+this.m_vertices[q].x*s,this.m_vertices[j].y*(1-s)+this.m_vertices[q].y*s),v=0,w=box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_center.SetZero(),x=this.m_vertices[p],y=null,l=p;l!==q;){l=(l+1)%this.m_count,y=l===q?u:this.m_vertices[l];var z=.5*((x.x-t.x)*(y.y-t.y)-(x.y-t.y)*(y.x-t.x));v+=z,w.x+=z*(t.x+x.x+y.x)/3,w.y+=z*(t.y+x.y+y.y)/3,x=y}return w.SelfMul(1/v),box2d.b2MulXV(c,w,d),v},box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_normalL=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_depths=box2d.b2MakeNumberArray(box2d.b2_maxPolygonVertices),box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_md=new box2d.b2MassData,box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_intoVec=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_outoVec=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.ComputeSubmergedArea.s_center=new box2d.b2Vec2,box2d.b2PolygonShape.prototype.Dump=function(){box2d.b2Log(" /*box2d.b2PolygonShape*/ var shape = new box2d.b2PolygonShape();\n"),box2d.b2Log(" /*box2d.b2Vec2[]*/ var vs = box2d.b2Vec2.MakeArray(%d);\n",box2d.b2_maxPolygonVertices);for(var a=0;a=3); +var d=c;d.SetZero();for(var e=0,f=box2d.b2PolygonShape.ComputeCentroid.s_pRef.SetZero(),g=1/3,h=0;b>h;++h){var i=f,j=a[h],k=a[(h+1)%b],l=box2d.b2SubVV(j,i,box2d.b2PolygonShape.ComputeCentroid.s_e1),m=box2d.b2SubVV(k,i,box2d.b2PolygonShape.ComputeCentroid.s_e2),n=box2d.b2CrossVV(l,m),o=.5*n;e+=o,d.x+=o*g*(i.x+j.x+k.x),d.y+=o*g*(i.y+j.y+k.y)}return box2d.ENABLE_ASSERTS&&box2d.b2Assert(e>box2d.b2_epsilon),d.SelfMul(1/e),d},box2d.b2PolygonShape.ComputeCentroid.s_pRef=new box2d.b2Vec2,box2d.b2PolygonShape.ComputeCentroid.s_e1=new box2d.b2Vec2,box2d.b2PolygonShape.ComputeCentroid.s_e2=new box2d.b2Vec2,goog.provide("box2d.b2CollideEdge"),goog.require("box2d.b2Collision"),box2d.b2CollideEdgeAndCircle=function(a,b,c,d,e){a.pointCount=0;var f=box2d.b2MulTXV(c,box2d.b2MulXV(e,d.m_p,box2d.b2Vec2.s_t0),box2d.b2CollideEdgeAndCircle.s_Q),g=b.m_vertex1,h=b.m_vertex2,i=box2d.b2SubVV(h,g,box2d.b2CollideEdgeAndCircle.s_e),j=box2d.b2DotVV(i,box2d.b2SubVV(h,f,box2d.b2Vec2.s_t0)),k=box2d.b2DotVV(i,box2d.b2SubVV(f,g,box2d.b2Vec2.s_t0)),l=b.m_radius+d.m_radius,m=box2d.b2CollideEdgeAndCircle.s_id;if(m.cf.indexB=0,m.cf.typeB=box2d.b2ContactFeatureType.e_vertex,0>=k){var n=g,o=box2d.b2SubVV(f,n,box2d.b2CollideEdgeAndCircle.s_d),p=box2d.b2DotVV(o,o);if(p>l*l)return;if(b.m_hasVertex0){var q=b.m_vertex0,r=g,s=box2d.b2SubVV(r,q,box2d.b2CollideEdgeAndCircle.s_e1),t=box2d.b2DotVV(s,box2d.b2SubVV(r,f,box2d.b2Vec2.s_t0));if(t>0)return}return m.cf.indexA=0,m.cf.typeA=box2d.b2ContactFeatureType.e_vertex,a.pointCount=1,a.type=box2d.b2ManifoldType.e_circles,a.localNormal.SetZero(),a.localPoint.Copy(n),a.points[0].id.Copy(m),void a.points[0].localPoint.Copy(d.m_p)}if(0>=j){var n=h,o=box2d.b2SubVV(f,n,box2d.b2CollideEdgeAndCircle.s_d),p=box2d.b2DotVV(o,o);if(p>l*l)return;if(b.m_hasVertex3){var u=b.m_vertex3,v=h,w=box2d.b2SubVV(u,v,box2d.b2CollideEdgeAndCircle.s_e2),x=box2d.b2DotVV(w,box2d.b2SubVV(f,v,box2d.b2Vec2.s_t0));if(x>0)return}return m.cf.indexA=1,m.cf.typeA=box2d.b2ContactFeatureType.e_vertex,a.pointCount=1,a.type=box2d.b2ManifoldType.e_circles,a.localNormal.SetZero(),a.localPoint.Copy(n),a.points[0].id.Copy(m),void a.points[0].localPoint.Copy(d.m_p)}var y=box2d.b2DotVV(i,i);box2d.ENABLE_ASSERTS&&box2d.b2Assert(y>0);var n=box2d.b2CollideEdgeAndCircle.s_P;n.x=1/y*(j*g.x+k*h.x),n.y=1/y*(j*g.y+k*h.y);var o=box2d.b2SubVV(f,n,box2d.b2CollideEdgeAndCircle.s_d),p=box2d.b2DotVV(o,o);if(!(p>l*l)){var z=box2d.b2CollideEdgeAndCircle.s_n.SetXY(-i.y,i.x);box2d.b2DotVV(z,box2d.b2SubVV(f,g,box2d.b2Vec2.s_t0))<0&&z.SetXY(-z.x,-z.y),z.Normalize(),m.cf.indexA=0,m.cf.typeA=box2d.b2ContactFeatureType.e_face,a.pointCount=1,a.type=box2d.b2ManifoldType.e_faceA,a.localNormal.Copy(z),a.localPoint.Copy(g),a.points[0].id.Copy(m),a.points[0].localPoint.Copy(d.m_p)}},box2d.b2CollideEdgeAndCircle.s_Q=new box2d.b2Vec2,box2d.b2CollideEdgeAndCircle.s_e=new box2d.b2Vec2,box2d.b2CollideEdgeAndCircle.s_d=new box2d.b2Vec2,box2d.b2CollideEdgeAndCircle.s_e1=new box2d.b2Vec2,box2d.b2CollideEdgeAndCircle.s_e2=new box2d.b2Vec2,box2d.b2CollideEdgeAndCircle.s_P=new box2d.b2Vec2,box2d.b2CollideEdgeAndCircle.s_n=new box2d.b2Vec2,box2d.b2CollideEdgeAndCircle.s_id=new box2d.b2ContactID,box2d.b2EPAxisType={e_unknown:0,e_edgeA:1,e_edgeB:2},goog.exportProperty(box2d.b2EPAxisType,"e_unknown",box2d.b2EPAxisType.e_unknown),goog.exportProperty(box2d.b2EPAxisType,"e_edgeA",box2d.b2EPAxisType.e_edgeA),goog.exportProperty(box2d.b2EPAxisType,"e_edgeB",box2d.b2EPAxisType.e_edgeB),box2d.b2EPAxis=function(){},box2d.b2EPAxis.prototype.type=box2d.b2EPAxisType.e_unknown,box2d.b2EPAxis.prototype.index=0,box2d.b2EPAxis.prototype.separation=0,box2d.b2TempPolygon=function(){this.vertices=box2d.b2Vec2.MakeArray(box2d.b2_maxPolygonVertices),this.normals=box2d.b2Vec2.MakeArray(box2d.b2_maxPolygonVertices),this.count=0},box2d.b2TempPolygon.prototype.vertices=null,box2d.b2TempPolygon.prototype.normals=null,box2d.b2TempPolygon.prototype.count=0,box2d.b2ReferenceFace=function(){this.i1=0,this.i2=0,this.v1=new box2d.b2Vec2,this.v2=new box2d.b2Vec2,this.normal=new box2d.b2Vec2,this.sideNormal1=new box2d.b2Vec2,this.sideOffset1=0,this.sideNormal2=new box2d.b2Vec2,this.sideOffset2=0},box2d.b2ReferenceFace.prototype.i1=0,box2d.b2ReferenceFace.prototype.i2=0,box2d.b2ReferenceFace.prototype.v1=null,box2d.b2ReferenceFace.prototype.v2=null,box2d.b2ReferenceFace.prototype.normal=null,box2d.b2ReferenceFace.prototype.sideNormal1=null,box2d.b2ReferenceFace.prototype.sideOffset1=0,box2d.b2ReferenceFace.prototype.sideNormal2=null,box2d.b2ReferenceFace.prototype.sideOffset2=0,box2d.b2EPColliderVertexType={e_isolated:0,e_concave:1,e_convex:2},goog.exportProperty(box2d.b2EPColliderVertexType,"e_isolated",box2d.b2EPColliderVertexType.e_isolated),goog.exportProperty(box2d.b2EPColliderVertexType,"e_concave",box2d.b2EPColliderVertexType.e_concave),goog.exportProperty(box2d.b2EPColliderVertexType,"e_convex",box2d.b2EPColliderVertexType.e_convex),box2d.b2EPCollider=function(){this.m_polygonB=new box2d.b2TempPolygon,this.m_xf=new box2d.b2Transform,this.m_centroidB=new box2d.b2Vec2,this.m_v0=new box2d.b2Vec2,this.m_v1=new box2d.b2Vec2,this.m_v2=new box2d.b2Vec2,this.m_v3=new box2d.b2Vec2,this.m_normal0=new box2d.b2Vec2,this.m_normal1=new box2d.b2Vec2,this.m_normal2=new box2d.b2Vec2,this.m_normal=new box2d.b2Vec2,this.m_type1=box2d.b2EPColliderVertexType.e_isolated,this.m_type2=box2d.b2EPColliderVertexType.e_isolated,this.m_lowerLimit=new box2d.b2Vec2,this.m_upperLimit=new box2d.b2Vec2,this.m_radius=0,this.m_front=!1},box2d.b2EPCollider.prototype.m_polygonB=null,box2d.b2EPCollider.prototype.m_xf=null,box2d.b2EPCollider.prototype.m_centroidB=null,box2d.b2EPCollider.prototype.m_v0=null,box2d.b2EPCollider.prototype.m_v1=null,box2d.b2EPCollider.prototype.m_v2=null,box2d.b2EPCollider.prototype.m_v3=null,box2d.b2EPCollider.prototype.m_normal0=null,box2d.b2EPCollider.prototype.m_normal1=null,box2d.b2EPCollider.prototype.m_normal2=null,box2d.b2EPCollider.prototype.m_normal=null,box2d.b2EPCollider.prototype.m_type1=box2d.b2EPColliderVertexType.e_isolated,box2d.b2EPCollider.prototype.m_type2=box2d.b2EPColliderVertexType.e_isolated,box2d.b2EPCollider.prototype.m_lowerLimit=null,box2d.b2EPCollider.prototype.m_upperLimit=null,box2d.b2EPCollider.prototype.m_radius=0,box2d.b2EPCollider.prototype.m_front=!1,box2d.b2EPCollider.prototype.Collide=function(a,b,c,d,e){box2d.b2MulTXX(c,e,this.m_xf),box2d.b2MulXV(this.m_xf,d.m_centroid,this.m_centroidB),this.m_v0.Copy(b.m_vertex0),this.m_v1.Copy(b.m_vertex1),this.m_v2.Copy(b.m_vertex2),this.m_v3.Copy(b.m_vertex3);var f=b.m_hasVertex0,g=b.m_hasVertex3,h=box2d.b2SubVV(this.m_v2,this.m_v1,box2d.b2EPCollider.s_edge1);h.Normalize(),this.m_normal1.SetXY(h.y,-h.x);var i=box2d.b2DotVV(this.m_normal1,box2d.b2SubVV(this.m_centroidB,this.m_v1,box2d.b2Vec2.s_t0)),j=0,k=0,l=!1,m=!1;if(f){var n=box2d.b2SubVV(this.m_v1,this.m_v0,box2d.b2EPCollider.s_edge0);n.Normalize(),this.m_normal0.SetXY(n.y,-n.x),l=box2d.b2CrossVV(n,h)>=0,j=box2d.b2DotVV(this.m_normal0,box2d.b2SubVV(this.m_centroidB,this.m_v0,box2d.b2Vec2.s_t0))}if(g){var o=box2d.b2SubVV(this.m_v3,this.m_v2,box2d.b2EPCollider.s_edge2);o.Normalize(),this.m_normal2.SetXY(o.y,-o.x),m=box2d.b2CrossVV(h,o)>0,k=box2d.b2DotVV(this.m_normal2,box2d.b2SubVV(this.m_centroidB,this.m_v2,box2d.b2Vec2.s_t0))}f&&g?l&&m?(this.m_front=j>=0||i>=0||k>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal0),this.m_upperLimit.Copy(this.m_normal2)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1).SelfNeg())):l?(this.m_front=j>=0||i>=0&&k>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal0),this.m_upperLimit.Copy(this.m_normal1)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal2).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1).SelfNeg())):m?(this.m_front=k>=0||j>=0&&i>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal2)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal0).SelfNeg())):(this.m_front=j>=0&&i>=0&&k>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal2).SelfNeg(),this.m_upperLimit.Copy(this.m_normal0).SelfNeg())):f?l?(this.m_front=j>=0||i>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal0),this.m_upperLimit.Copy(this.m_normal1).SelfNeg()):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1).SelfNeg())):(this.m_front=j>=0&&i>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1).SelfNeg()):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal0).SelfNeg())):g?m?(this.m_front=i>=0||k>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal2)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1))):(this.m_front=i>=0&&k>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal2).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1))):(this.m_front=i>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1).SelfNeg()):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1))),this.m_polygonB.count=d.m_count;for(var p=0,q=d.m_count;q>p;++p)box2d.b2MulXV(this.m_xf,d.m_vertices[p],this.m_polygonB.vertices[p]),box2d.b2MulRV(this.m_xf.q,d.m_normals[p],this.m_polygonB.normals[p]);this.m_radius=2*box2d.b2_polygonRadius,a.pointCount=0;var r=this.ComputeEdgeSeparation(box2d.b2EPCollider.s_edgeAxis);if(r.type!==box2d.b2EPAxisType.e_unknown&&!(r.separation>this.m_radius)){var s=this.ComputePolygonSeparation(box2d.b2EPCollider.s_polygonAxis);if(!(s.type!==box2d.b2EPAxisType.e_unknown&&s.separation>this.m_radius)){var t,u=.98,v=.001;t=s.type===box2d.b2EPAxisType.e_unknown?r:s.separation>u*r.separation+v?s:r;var w=box2d.b2EPCollider.s_ie,x=box2d.b2EPCollider.s_rf;if(t.type===box2d.b2EPAxisType.e_edgeA){a.type=box2d.b2ManifoldType.e_faceA;for(var y=0,z=box2d.b2DotVV(this.m_normal,this.m_polygonB.normals[0]),p=1,q=this.m_polygonB.count;q>p;++p){var A=box2d.b2DotVV(this.m_normal,this.m_polygonB.normals[p]);z>A&&(z=A,y=p)}var B=y,C=(B+1)%this.m_polygonB.count,D=w[0];D.v.Copy(this.m_polygonB.vertices[B]),D.id.cf.indexA=0,D.id.cf.indexB=B,D.id.cf.typeA=box2d.b2ContactFeatureType.e_face,D.id.cf.typeB=box2d.b2ContactFeatureType.e_vertex;var E=w[1];E.v.Copy(this.m_polygonB.vertices[C]),E.id.cf.indexA=0,E.id.cf.indexB=C,E.id.cf.typeA=box2d.b2ContactFeatureType.e_face,E.id.cf.typeB=box2d.b2ContactFeatureType.e_vertex,this.m_front?(x.i1=0,x.i2=1,x.v1.Copy(this.m_v1),x.v2.Copy(this.m_v2),x.normal.Copy(this.m_normal1)):(x.i1=1,x.i2=0,x.v1.Copy(this.m_v2),x.v2.Copy(this.m_v1),x.normal.Copy(this.m_normal1).SelfNeg())}else{a.type=box2d.b2ManifoldType.e_faceB;var D=w[0];D.v.Copy(this.m_v1),D.id.cf.indexA=0,D.id.cf.indexB=t.index,D.id.cf.typeA=box2d.b2ContactFeatureType.e_vertex,D.id.cf.typeB=box2d.b2ContactFeatureType.e_face;var E=w[1];E.v.Copy(this.m_v2),E.id.cf.indexA=0,E.id.cf.indexB=t.index,E.id.cf.typeA=box2d.b2ContactFeatureType.e_vertex,E.id.cf.typeB=box2d.b2ContactFeatureType.e_face,x.i1=t.index,x.i2=(x.i1+1)%this.m_polygonB.count,x.v1.Copy(this.m_polygonB.vertices[x.i1]),x.v2.Copy(this.m_polygonB.vertices[x.i2]),x.normal.Copy(this.m_polygonB.normals[x.i1])}x.sideNormal1.SetXY(x.normal.y,-x.normal.x),x.sideNormal2.Copy(x.sideNormal1).SelfNeg(),x.sideOffset1=box2d.b2DotVV(x.sideNormal1,x.v1),x.sideOffset2=box2d.b2DotVV(x.sideNormal2,x.v2);var F=box2d.b2EPCollider.s_clipPoints1,G=box2d.b2EPCollider.s_clipPoints2,H=0;if(H=box2d.b2ClipSegmentToLine(F,w,x.sideNormal1,x.sideOffset1,x.i1),!(Hp;++p){var J;if(J=box2d.b2DotVV(x.normal,box2d.b2SubVV(G[p].v,x.v1,box2d.b2Vec2.s_t0)),J<=this.m_radius){var K=a.points[I];t.type===box2d.b2EPAxisType.e_edgeA?(box2d.b2MulTXV(this.m_xf,G[p].v,K.localPoint),K.id=G[p].id):(K.localPoint.Copy(G[p].v),K.id.cf.typeA=G[p].id.cf.typeB,K.id.cf.typeB=G[p].id.cf.typeA,K.id.cf.indexA=G[p].id.cf.indexB,K.id.cf.indexB=G[p].id.cf.indexA),++I}}a.pointCount=I}}}},box2d.b2EPCollider.s_edge1=new box2d.b2Vec2,box2d.b2EPCollider.s_edge0=new box2d.b2Vec2,box2d.b2EPCollider.s_edge2=new box2d.b2Vec2,box2d.b2EPCollider.s_ie=box2d.b2ClipVertex.MakeArray(2),box2d.b2EPCollider.s_rf=new box2d.b2ReferenceFace,box2d.b2EPCollider.s_clipPoints1=box2d.b2ClipVertex.MakeArray(2),box2d.b2EPCollider.s_clipPoints2=box2d.b2ClipVertex.MakeArray(2),box2d.b2EPCollider.s_edgeAxis=new box2d.b2EPAxis,box2d.b2EPCollider.s_polygonAxis=new box2d.b2EPAxis,box2d.b2EPCollider.prototype.ComputeEdgeSeparation=function(a){var b=a;b.type=box2d.b2EPAxisType.e_edgeA,b.index=this.m_front?0:1,b.separation=box2d.b2_maxFloat;for(var c=0,d=this.m_polygonB.count;d>c;++c){var e=box2d.b2DotVV(this.m_normal,box2d.b2SubVV(this.m_polygonB.vertices[c],this.m_v1,box2d.b2Vec2.s_t0));ed;++d){var f=box2d.b2NegV(this.m_polygonB.normals[d],box2d.b2EPCollider.s_n),g=box2d.b2DotVV(f,box2d.b2SubVV(this.m_polygonB.vertices[d],this.m_v1,box2d.b2Vec2.s_t0)),h=box2d.b2DotVV(f,box2d.b2SubVV(this.m_polygonB.vertices[d],this.m_v2,box2d.b2Vec2.s_t0)),i=box2d.b2Min(g,h);if(i>this.m_radius)return b.type=box2d.b2EPAxisType.e_edgeB,b.index=d,b.separation=i,b;if(box2d.b2DotVV(f,c)>=0){if(box2d.b2DotVV(box2d.b2SubVV(f,this.m_upperLimit,box2d.b2Vec2.s_t0),this.m_normal)<-box2d.b2_angularSlop)continue}else if(box2d.b2DotVV(box2d.b2SubVV(f,this.m_lowerLimit,box2d.b2Vec2.s_t0),this.m_normal)<-box2d.b2_angularSlop)continue;i>b.separation&&(b.type=box2d.b2EPAxisType.e_edgeB,b.index=d,b.separation=i)}return b},box2d.b2EPCollider.s_n=new box2d.b2Vec2,box2d.b2EPCollider.s_perp=new box2d.b2Vec2,box2d.b2CollideEdgeAndPolygon=function(a,b,c,d,e){var f=box2d.b2CollideEdgeAndPolygon.s_collider;f.Collide(a,b,c,d,e)},box2d.b2CollideEdgeAndPolygon.s_collider=new box2d.b2EPCollider,goog.provide("box2d.b2EdgeShape"),goog.require("box2d.b2Shape"),box2d.b2EdgeShape=function(){goog.base(this,box2d.b2ShapeType.e_edgeShape,box2d.b2_polygonRadius),this.m_vertex1=new box2d.b2Vec2,this.m_vertex2=new box2d.b2Vec2,this.m_vertex0=new box2d.b2Vec2,this.m_vertex3=new box2d.b2Vec2},goog.inherits(box2d.b2EdgeShape,box2d.b2Shape),box2d.b2EdgeShape.prototype.m_vertex1=null,box2d.b2EdgeShape.prototype.m_vertex2=null,box2d.b2EdgeShape.prototype.m_vertex0=null,box2d.b2EdgeShape.prototype.m_vertex3=null,box2d.b2EdgeShape.prototype.m_hasVertex0=!1,box2d.b2EdgeShape.prototype.m_hasVertex3=!1,box2d.b2EdgeShape.prototype.Set=function(a,b){return this.m_vertex1.Copy(a),this.m_vertex2.Copy(b),this.m_hasVertex0=!1,this.m_hasVertex3=!1,this},box2d.b2EdgeShape.prototype.SetAsEdge=box2d.b2EdgeShape.prototype.Set,box2d.b2EdgeShape.prototype.Clone=function(){return(new box2d.b2EdgeShape).Copy(this)},box2d.b2EdgeShape.prototype.Copy=function(a){return goog.base(this,"Copy",a),box2d.ENABLE_ASSERTS&&box2d.b2Assert(a instanceof box2d.b2EdgeShape),this.m_vertex1.Copy(a.m_vertex1),this.m_vertex2.Copy(a.m_vertex2),this.m_vertex0.Copy(a.m_vertex0),this.m_vertex3.Copy(a.m_vertex3),this.m_hasVertex0=a.m_hasVertex0,this.m_hasVertex3=a.m_hasVertex3,this},box2d.b2EdgeShape.prototype.GetChildCount=function(){return 1},box2d.b2EdgeShape.prototype.TestPoint=function(){return!1},box2d.b2EdgeShape.prototype.RayCast=function(a,b,c){var d=box2d.b2MulTXV(c,b.p1,box2d.b2EdgeShape.prototype.RayCast.s_p1),e=box2d.b2MulTXV(c,b.p2,box2d.b2EdgeShape.prototype.RayCast.s_p2),f=box2d.b2SubVV(e,d,box2d.b2EdgeShape.prototype.RayCast.s_d),g=this.m_vertex1,h=this.m_vertex2,i=box2d.b2SubVV(h,g,box2d.b2EdgeShape.prototype.RayCast.s_e),j=a.normal.SetXY(i.y,-i.x).SelfNormalize(),k=box2d.b2DotVV(j,box2d.b2SubVV(g,d,box2d.b2Vec2.s_t0)),l=box2d.b2DotVV(j,f);if(0===l)return!1;var m=k/l;if(0>m||b.maxFractionq||q>1?!1:(a.fraction=m,box2d.b2MulRV(c.q,a.normal,a.normal),k>0&&a.normal.SelfNeg(),!0)},box2d.b2EdgeShape.prototype.RayCast.s_p1=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.RayCast.s_p2=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.RayCast.s_d=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.RayCast.s_e=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.RayCast.s_q=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.RayCast.s_r=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.ComputeAABB=function(a,b){var c=box2d.b2MulXV(b,this.m_vertex1,box2d.b2EdgeShape.prototype.ComputeAABB.s_v1),d=box2d.b2MulXV(b,this.m_vertex2,box2d.b2EdgeShape.prototype.ComputeAABB.s_v2);box2d.b2MinV(c,d,a.lowerBound),box2d.b2MaxV(c,d,a.upperBound);var e=this.m_radius;a.lowerBound.SelfSubXY(e,e),a.upperBound.SelfAddXY(e,e)},box2d.b2EdgeShape.prototype.ComputeAABB.s_v1=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.ComputeAABB.s_v2=new box2d.b2Vec2,box2d.b2EdgeShape.prototype.ComputeMass=function(a){a.mass=0,box2d.b2MidVV(this.m_vertex1,this.m_vertex2,a.center),a.I=0},box2d.b2EdgeShape.prototype.SetupDistanceProxy=function(a){a.m_vertices=new Array(2),a.m_vertices[0]=this.m_vertex1,a.m_vertices[1]=this.m_vertex2,a.m_count=2,a.m_radius=this.m_radius},box2d.b2EdgeShape.prototype.ComputeSubmergedArea=function(a,b,c,d){return d.SetZero(),0},box2d.b2EdgeShape.prototype.Dump=function(){box2d.b2Log(" /*box2d.b2EdgeShape*/ var shape = new box2d.b2EdgeShape();\n"),box2d.b2Log(" shape.m_radius = %.15f;\n",this.m_radius),box2d.b2Log(" shape.m_vertex0.SetXY(%.15f, %.15f);\n",this.m_vertex0.x,this.m_vertex0.y),box2d.b2Log(" shape.m_vertex1.SetXY(%.15f, %.15f);\n",this.m_vertex1.x,this.m_vertex1.y),box2d.b2Log(" shape.m_vertex2.SetXY(%.15f, %.15f);\n",this.m_vertex2.x,this.m_vertex2.y),box2d.b2Log(" shape.m_vertex3.SetXY(%.15f, %.15f);\n",this.m_vertex3.x,this.m_vertex3.y),box2d.b2Log(" shape.m_hasVertex0 = %s;\n",this.m_hasVertex0),box2d.b2Log(" shape.m_hasVertex3 = %s;\n",this.m_hasVertex3)},goog.provide("box2d.b2ChainShape"),goog.require("box2d.b2Shape"),goog.require("box2d.b2EdgeShape"),box2d.b2ChainShape=function(){goog.base(this,box2d.b2ShapeType.e_chainShape,box2d.b2_polygonRadius),this.m_prevVertex=new box2d.b2Vec2,this.m_nextVertex=new box2d.b2Vec2},goog.inherits(box2d.b2ChainShape,box2d.b2Shape),box2d.b2ChainShape.prototype.m_vertices=null,box2d.b2ChainShape.prototype.m_count=0,box2d.b2ChainShape.prototype.m_prevVertex=null,box2d.b2ChainShape.prototype.m_nextVertex=null,box2d.b2ChainShape.prototype.m_hasPrevVertex=!1,box2d.b2ChainShape.prototype.m_hasNextVertex=!1,box2d.b2ChainShape.prototype.CreateLoop=function(a,b){if(b=b||a.length,box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===this.m_vertices&&0===this.m_count),box2d.ENABLE_ASSERTS&&box2d.b2Assert(b>=3),box2d.ENABLE_ASSERTS)for(var c=1;b>c;++c){var d=a[c-1],e=a[c];box2d.b2Assert(box2d.b2DistanceSquaredVV(d,e)>box2d.b2_linearSlop*box2d.b2_linearSlop)}this.m_count=b+1,this.m_vertices=box2d.b2Vec2.MakeArray(this.m_count);for(var c=0;b>c;++c)this.m_vertices[c].Copy(a[c]);return this.m_vertices[b].Copy(this.m_vertices[0]),this.m_prevVertex.Copy(this.m_vertices[this.m_count-2]),this.m_nextVertex.Copy(this.m_vertices[1]),this.m_hasPrevVertex=!0,this.m_hasNextVertex=!0,this},box2d.b2ChainShape.prototype.CreateChain=function(a,b){if(b=b||a.length,box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===this.m_vertices&&0===this.m_count),box2d.ENABLE_ASSERTS&&box2d.b2Assert(b>=2),box2d.ENABLE_ASSERTS)for(var c=1;b>c;++c){var d=a[c-1],e=a[c];box2d.b2Assert(box2d.b2DistanceSquaredVV(d,e)>box2d.b2_linearSlop*box2d.b2_linearSlop)}this.m_count=b,this.m_vertices=box2d.b2Vec2.MakeArray(b);for(var c=0;b>c;++c)this.m_vertices[c].Copy(a[c]);return this.m_hasPrevVertex=!1,this.m_hasNextVertex=!1,this.m_prevVertex.SetZero(),this.m_nextVertex.SetZero(),this},box2d.b2ChainShape.prototype.SetPrevVertex=function(a){return this.m_prevVertex.Copy(a),this.m_hasPrevVertex=!0,this},box2d.b2ChainShape.prototype.SetNextVertex=function(a){return this.m_nextVertex.Copy(a),this.m_hasNextVertex=!0,this},box2d.b2ChainShape.prototype.Clone=function(){return(new box2d.b2ChainShape).Copy(this)},box2d.b2ChainShape.prototype.Copy=function(a){return goog.base(this,"Copy",a),box2d.ENABLE_ASSERTS&&box2d.b2Assert(a instanceof box2d.b2ChainShape),this.CreateChain(a.m_vertices,a.m_count),this.m_prevVertex.Copy(a.m_prevVertex),this.m_nextVertex.Copy(a.m_nextVertex),this.m_hasPrevVertex=a.m_hasPrevVertex,this.m_hasNextVertex=a.m_hasNextVertex,this},box2d.b2ChainShape.prototype.GetChildCount=function(){return this.m_count-1},box2d.b2ChainShape.prototype.GetChildEdge=function(a,b){box2d.ENABLE_ASSERTS&&box2d.b2Assert(b>=0&&b0?(a.m_vertex0.Copy(this.m_vertices[b-1]),a.m_hasVertex0=!0):(a.m_vertex0.Copy(this.m_prevVertex),a.m_hasVertex0=this.m_hasPrevVertex),b=0&&bn;++n){for(var o=box2d.b2MulRV(k.q,h[n],box2d.b2FindMaxSeparation.s_n),p=box2d.b2MulXV(k,i[n],box2d.b2FindMaxSeparation.s_v1),q=box2d.b2_maxFloat,r=0;g>r;++r){var s=box2d.b2DotVV(o,box2d.b2SubVV(j[r],p,box2d.b2Vec2.s_t0));q>s&&(q=s)}q>m&&(m=q,l=n)}return a[0]=l,m},box2d.b2FindMaxSeparation.s_xf=new box2d.b2Transform,box2d.b2FindMaxSeparation.s_n=new box2d.b2Vec2,box2d.b2FindMaxSeparation.s_v1=new box2d.b2Vec2,box2d.b2FindIncidentEdge=function(a,b,c,d,e,f){var g=b.m_count,h=b.m_normals,i=e.m_count,j=e.m_vertices,k=e.m_normals;box2d.ENABLE_ASSERTS&&box2d.b2Assert(d>=0&&g>d);for(var l=box2d.b2MulTRV(f.q,box2d.b2MulRV(c.q,h[d],box2d.b2Vec2.s_t0),box2d.b2FindIncidentEdge.s_normal1),m=0,n=box2d.b2_maxFloat,o=0;i>o;++o){var p=box2d.b2DotVV(l,k[o]);n>p&&(n=p,m=o)}var q=m,r=(q+1)%i,s=a[0];box2d.b2MulXV(f,j[q],s.v);var t=s.id.cf;t.indexA=d,t.indexB=q,t.typeA=box2d.b2ContactFeatureType.e_face,t.typeB=box2d.b2ContactFeatureType.e_vertex;var u=a[1];box2d.b2MulXV(f,j[r],u.v);var v=u.id.cf;v.indexA=d,v.indexB=r,v.typeA=box2d.b2ContactFeatureType.e_face,v.typeB=box2d.b2ContactFeatureType.e_vertex},box2d.b2FindIncidentEdge.s_normal1=new box2d.b2Vec2,box2d.b2CollidePolygons=function(a,b,c,d,e){a.pointCount=0;var f=b.m_radius+d.m_radius,g=box2d.b2CollidePolygons.s_edgeA;g[0]=0;var h=box2d.b2FindMaxSeparation(g,b,c,d,e);if(!(h>f)){var i=box2d.b2CollidePolygons.s_edgeB;i[0]=0;var j=box2d.b2FindMaxSeparation(i,d,e,b,c);if(!(j>f)){var k,l,m,n,o=0,p=0,q=.98,r=.001;j>q*h+r?(k=d,l=b,m=e,n=c,o=i[0],a.type=box2d.b2ManifoldType.e_faceB,p=1):(k=b,l=d,m=c,n=e,o=g[0],a.type=box2d.b2ManifoldType.e_faceA,p=0);var s=box2d.b2CollidePolygons.s_incidentEdge;box2d.b2FindIncidentEdge(s,k,m,o,l,n);var t=k.m_count,u=k.m_vertices,v=o,w=(o+1)%t,x=u[v],y=u[w],z=box2d.b2SubVV(y,x,box2d.b2CollidePolygons.s_localTangent);z.Normalize();var A,B=box2d.b2CrossVOne(z,box2d.b2CollidePolygons.s_localNormal),C=box2d.b2MidVV(x,y,box2d.b2CollidePolygons.s_planePoint),D=box2d.b2MulRV(m.q,z,box2d.b2CollidePolygons.s_tangent),E=box2d.b2CrossVOne(D,box2d.b2CollidePolygons.s_normal),F=box2d.b2MulXV(m,x,box2d.b2CollidePolygons.s_v11),G=box2d.b2MulXV(m,y,box2d.b2CollidePolygons.s_v12),H=box2d.b2DotVV(E,F),I=-box2d.b2DotVV(D,F)+f,J=box2d.b2DotVV(D,G)+f,K=box2d.b2CollidePolygons.s_clipPoints1,L=box2d.b2CollidePolygons.s_clipPoints2,M=box2d.b2NegV(D,box2d.b2CollidePolygons.s_ntangent);if(A=box2d.b2ClipSegmentToLine(K,s,M,I,v),!(2>A||(A=box2d.b2ClipSegmentToLine(L,K,D,J,w),2>A))){a.localNormal.Copy(B),a.localPoint.Copy(C);for(var N=0,O=0;O=Q){var R=a.points[N];if(box2d.b2MulTXV(n,P.v,R.localPoint),R.id.Copy(P.id),p){var S=R.id.cf;R.id.cf.indexA=S.indexB,R.id.cf.indexB=S.indexA,R.id.cf.typeA=S.typeB,R.id.cf.typeB=S.typeA}++N}}a.pointCount=N}}}},box2d.b2CollidePolygons.s_incidentEdge=box2d.b2ClipVertex.MakeArray(2),box2d.b2CollidePolygons.s_clipPoints1=box2d.b2ClipVertex.MakeArray(2),box2d.b2CollidePolygons.s_clipPoints2=box2d.b2ClipVertex.MakeArray(2),box2d.b2CollidePolygons.s_edgeA=box2d.b2MakeNumberArray(1),box2d.b2CollidePolygons.s_edgeB=box2d.b2MakeNumberArray(1),box2d.b2CollidePolygons.s_localTangent=new box2d.b2Vec2,box2d.b2CollidePolygons.s_localNormal=new box2d.b2Vec2,box2d.b2CollidePolygons.s_planePoint=new box2d.b2Vec2,box2d.b2CollidePolygons.s_normal=new box2d.b2Vec2,box2d.b2CollidePolygons.s_tangent=new box2d.b2Vec2,box2d.b2CollidePolygons.s_ntangent=new box2d.b2Vec2,box2d.b2CollidePolygons.s_v11=new box2d.b2Vec2,box2d.b2CollidePolygons.s_v12=new box2d.b2Vec2,goog.provide("box2d.b2PolygonContact"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Contact"),goog.require("box2d.b2CollidePolygon"),box2d.b2PolygonContact=function(){goog.base(this)},goog.inherits(box2d.b2PolygonContact,box2d.b2Contact),box2d.b2PolygonContact.Create=function(){return new box2d.b2PolygonContact},box2d.b2PolygonContact.Destroy=function(){},box2d.b2PolygonContact.prototype.Reset=function(a,b,c,d){goog.base(this,"Reset",a,b,c,d)},box2d.b2PolygonContact.prototype.Evaluate=function(a,b,c){var d=this.m_fixtureA.GetShape(),e=this.m_fixtureB.GetShape();box2d.ENABLE_ASSERTS&&box2d.b2Assert(d instanceof box2d.b2PolygonShape),box2d.ENABLE_ASSERTS&&box2d.b2Assert(e instanceof box2d.b2PolygonShape),box2d.b2CollidePolygons(a,d instanceof box2d.b2PolygonShape?d:null,b,e instanceof box2d.b2PolygonShape?e:null,c)},goog.provide("box2d.b2CollideCircle"),goog.require("box2d.b2Collision"),box2d.b2CollideCircles=function(a,b,c,d,e){a.pointCount=0;var f=box2d.b2MulXV(c,b.m_p,box2d.b2CollideCircles.s_pA),g=box2d.b2MulXV(e,d.m_p,box2d.b2CollideCircles.s_pB),h=box2d.b2DistanceSquaredVV(f,g),i=b.m_radius+d.m_radius;h>i*i||(a.type=box2d.b2ManifoldType.e_circles,a.localPoint.Copy(b.m_p),a.localNormal.SetZero(),a.pointCount=1,a.points[0].localPoint.Copy(d.m_p),a.points[0].id.key=0)},box2d.b2CollideCircles.s_pA=new box2d.b2Vec2,box2d.b2CollideCircles.s_pB=new box2d.b2Vec2,box2d.b2CollidePolygonAndCircle=function(a,b,c,d,e){a.pointCount=0;for(var f=box2d.b2MulXV(e,d.m_p,box2d.b2CollidePolygonAndCircle.s_c),g=box2d.b2MulTXV(c,f,box2d.b2CollidePolygonAndCircle.s_cLocal),h=0,i=-box2d.b2_maxFloat,j=b.m_radius+d.m_radius,k=b.m_count,l=b.m_vertices,m=b.m_normals,n=0;k>n;++n){var o=box2d.b2DotVV(m[n],box2d.b2SubVV(g,l[n],box2d.b2Vec2.s_t0));if(o>j)return;o>i&&(i=o,h=n)}var p=h,q=(p+1)%k,r=l[p],s=l[q];if(i=t){if(box2d.b2DistanceSquaredVV(g,r)>j*j)return; +a.pointCount=1,a.type=box2d.b2ManifoldType.e_faceA,box2d.b2SubVV(g,r,a.localNormal).SelfNormalize(),a.localPoint.Copy(r),a.points[0].localPoint.Copy(d.m_p),a.points[0].id.key=0}else if(0>=u){if(box2d.b2DistanceSquaredVV(g,s)>j*j)return;a.pointCount=1,a.type=box2d.b2ManifoldType.e_faceA,box2d.b2SubVV(g,s,a.localNormal).SelfNormalize(),a.localPoint.Copy(s),a.points[0].localPoint.Copy(d.m_p),a.points[0].id.key=0}else{var v=box2d.b2MidVV(r,s,box2d.b2CollidePolygonAndCircle.s_faceCenter);if(i=box2d.b2DotVV(box2d.b2SubVV(g,v,box2d.b2Vec2.s_t1),m[p]),i>j)return;a.pointCount=1,a.type=box2d.b2ManifoldType.e_faceA,a.localNormal.Copy(m[p]).SelfNormalize(),a.localPoint.Copy(v),a.points[0].localPoint.Copy(d.m_p),a.points[0].id.key=0}},box2d.b2CollidePolygonAndCircle.s_c=new box2d.b2Vec2,box2d.b2CollidePolygonAndCircle.s_cLocal=new box2d.b2Vec2,box2d.b2CollidePolygonAndCircle.s_faceCenter=new box2d.b2Vec2,goog.provide("box2d.b2CircleContact"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Contact"),goog.require("box2d.b2CollideCircle"),box2d.b2CircleContact=function(){goog.base(this)},goog.inherits(box2d.b2CircleContact,box2d.b2Contact),box2d.b2CircleContact.Create=function(){return new box2d.b2CircleContact},box2d.b2CircleContact.Destroy=function(){},box2d.b2CircleContact.prototype.Reset=function(a,b,c,d){goog.base(this,"Reset",a,b,c,d)},box2d.b2CircleContact.prototype.Evaluate=function(a,b,c){var d=this.m_fixtureA.GetShape(),e=this.m_fixtureB.GetShape();box2d.ENABLE_ASSERTS&&box2d.b2Assert(d instanceof box2d.b2CircleShape),box2d.ENABLE_ASSERTS&&box2d.b2Assert(e instanceof box2d.b2CircleShape),box2d.b2CollideCircles(a,d instanceof box2d.b2CircleShape?d:null,b,e instanceof box2d.b2CircleShape?e:null,c)},goog.provide("box2d.b2ChainAndCircleContact"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Contact"),goog.require("box2d.b2CollideEdge"),box2d.b2ChainAndCircleContact=function(){goog.base(this)},goog.inherits(box2d.b2ChainAndCircleContact,box2d.b2Contact),box2d.b2ChainAndCircleContact.Create=function(){return new box2d.b2ChainAndCircleContact},box2d.b2ChainAndCircleContact.Destroy=function(){},box2d.b2ChainAndCircleContact.prototype.Reset=function(a,b,c,d){goog.base(this,"Reset",a,b,c,d),box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.GetType()===box2d.b2ShapeType.e_chainShape),box2d.ENABLE_ASSERTS&&box2d.b2Assert(c.GetType()===box2d.b2ShapeType.e_circleShape)},box2d.b2ChainAndCircleContact.prototype.Evaluate=function(a,b,c){var d=this.m_fixtureA.GetShape(),e=this.m_fixtureB.GetShape();box2d.ENABLE_ASSERTS&&box2d.b2Assert(d instanceof box2d.b2ChainShape),box2d.ENABLE_ASSERTS&&box2d.b2Assert(e instanceof box2d.b2CircleShape);var f=d instanceof box2d.b2ChainShape?d:null,g=box2d.b2ChainAndCircleContact.prototype.Evaluate.s_edge;f.GetChildEdge(g,this.m_indexA),box2d.b2CollideEdgeAndCircle(a,g,b,e instanceof box2d.b2CircleShape?e:null,c)},box2d.b2ChainAndCircleContact.prototype.Evaluate.s_edge=new box2d.b2EdgeShape,goog.provide("box2d.b2EdgeAndCircleContact"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Contact"),goog.require("box2d.b2CollideEdge"),box2d.b2EdgeAndCircleContact=function(){goog.base(this)},goog.inherits(box2d.b2EdgeAndCircleContact,box2d.b2Contact),box2d.b2EdgeAndCircleContact.Create=function(){return new box2d.b2EdgeAndCircleContact},box2d.b2EdgeAndCircleContact.Destroy=function(){},box2d.b2EdgeAndCircleContact.prototype.Reset=function(a,b,c,d){goog.base(this,"Reset",a,b,c,d),box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.GetType()===box2d.b2ShapeType.e_edgeShape),box2d.ENABLE_ASSERTS&&box2d.b2Assert(c.GetType()===box2d.b2ShapeType.e_circleShape)},box2d.b2EdgeAndCircleContact.prototype.Evaluate=function(a,b,c){var d=this.m_fixtureA.GetShape(),e=this.m_fixtureB.GetShape();box2d.ENABLE_ASSERTS&&box2d.b2Assert(d instanceof box2d.b2EdgeShape),box2d.ENABLE_ASSERTS&&box2d.b2Assert(e instanceof box2d.b2CircleShape),box2d.b2CollideEdgeAndCircle(a,d instanceof box2d.b2EdgeShape?d:null,b,e instanceof box2d.b2CircleShape?e:null,c)},goog.provide("box2d.b2ContactSolver"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Math"),goog.require("box2d.b2Collision"),goog.require("box2d.b2CircleContact"),goog.require("box2d.b2PolygonAndCircleContact"),goog.require("box2d.b2PolygonContact"),goog.require("box2d.b2EdgeAndCircleContact"),goog.require("box2d.b2EdgeAndPolygonContact"),goog.require("box2d.b2ChainAndCircleContact"),goog.require("box2d.b2ChainAndPolygonContact"),box2d.b2VelocityConstraintPoint=function(){this.rA=new box2d.b2Vec2,this.rB=new box2d.b2Vec2},box2d.b2VelocityConstraintPoint.prototype.rA=null,box2d.b2VelocityConstraintPoint.prototype.rB=null,box2d.b2VelocityConstraintPoint.prototype.normalImpulse=0,box2d.b2VelocityConstraintPoint.prototype.tangentImpulse=0,box2d.b2VelocityConstraintPoint.prototype.normalMass=0,box2d.b2VelocityConstraintPoint.prototype.tangentMass=0,box2d.b2VelocityConstraintPoint.prototype.velocityBias=0,box2d.b2VelocityConstraintPoint.MakeArray=function(a){return box2d.b2MakeArray(a,function(){return new box2d.b2VelocityConstraintPoint})},box2d.b2ContactVelocityConstraint=function(){this.points=box2d.b2VelocityConstraintPoint.MakeArray(box2d.b2_maxManifoldPoints),this.normal=new box2d.b2Vec2,this.tangent=new box2d.b2Vec2,this.normalMass=new box2d.b2Mat22,this.K=new box2d.b2Mat22},box2d.b2ContactVelocityConstraint.prototype.points=null,box2d.b2ContactVelocityConstraint.prototype.normal=null,box2d.b2ContactVelocityConstraint.prototype.tangent=null,box2d.b2ContactVelocityConstraint.prototype.normalMass=null,box2d.b2ContactVelocityConstraint.prototype.K=null,box2d.b2ContactVelocityConstraint.prototype.indexA=0,box2d.b2ContactVelocityConstraint.prototype.indexB=0,box2d.b2ContactVelocityConstraint.prototype.invMassA=0,box2d.b2ContactVelocityConstraint.prototype.invMassB=0,box2d.b2ContactVelocityConstraint.prototype.invIA=0,box2d.b2ContactVelocityConstraint.prototype.invIB=0,box2d.b2ContactVelocityConstraint.prototype.friction=0,box2d.b2ContactVelocityConstraint.prototype.restitution=0,box2d.b2ContactVelocityConstraint.prototype.tangentSpeed=0,box2d.b2ContactVelocityConstraint.prototype.pointCount=0,box2d.b2ContactVelocityConstraint.prototype.contactIndex=0,box2d.b2ContactVelocityConstraint.MakeArray=function(a){return box2d.b2MakeArray(a,function(){return new box2d.b2ContactVelocityConstraint})},box2d.b2ContactPositionConstraint=function(){this.localPoints=box2d.b2Vec2.MakeArray(box2d.b2_maxManifoldPoints),this.localNormal=new box2d.b2Vec2,this.localPoint=new box2d.b2Vec2,this.localCenterA=new box2d.b2Vec2,this.localCenterB=new box2d.b2Vec2},box2d.b2ContactPositionConstraint.prototype.localPoints=null,box2d.b2ContactPositionConstraint.prototype.localNormal=null,box2d.b2ContactPositionConstraint.prototype.localPoint=null,box2d.b2ContactPositionConstraint.prototype.indexA=0,box2d.b2ContactPositionConstraint.prototype.indexB=0,box2d.b2ContactPositionConstraint.prototype.invMassA=0,box2d.b2ContactPositionConstraint.prototype.invMassB=0,box2d.b2ContactPositionConstraint.prototype.localCenterA=null,box2d.b2ContactPositionConstraint.prototype.localCenterB=null,box2d.b2ContactPositionConstraint.prototype.invIA=0,box2d.b2ContactPositionConstraint.prototype.invIB=0,box2d.b2ContactPositionConstraint.prototype.type=box2d.b2ManifoldType.e_unknown,box2d.b2ContactPositionConstraint.prototype.radiusA=0,box2d.b2ContactPositionConstraint.prototype.radiusB=0,box2d.b2ContactPositionConstraint.prototype.pointCount=0,box2d.b2ContactPositionConstraint.MakeArray=function(a){return box2d.b2MakeArray(a,function(){return new box2d.b2ContactPositionConstraint})},box2d.b2ContactSolverDef=function(){this.step=new box2d.b2TimeStep},box2d.b2ContactSolverDef.prototype.step=null,box2d.b2ContactSolverDef.prototype.contacts=null,box2d.b2ContactSolverDef.prototype.count=0,box2d.b2ContactSolverDef.prototype.positions=null,box2d.b2ContactSolverDef.prototype.velocities=null,box2d.b2ContactSolverDef.prototype.allocator=null,box2d.b2ContactSolver=function(){this.m_step=new box2d.b2TimeStep,this.m_positionConstraints=box2d.b2ContactPositionConstraint.MakeArray(1024),this.m_velocityConstraints=box2d.b2ContactVelocityConstraint.MakeArray(1024)},box2d.b2ContactSolver.prototype.m_step=null,box2d.b2ContactSolver.prototype.m_positions=null,box2d.b2ContactSolver.prototype.m_velocities=null,box2d.b2ContactSolver.prototype.m_allocator=null,box2d.b2ContactSolver.prototype.m_positionConstraints=null,box2d.b2ContactSolver.prototype.m_velocityConstraints=null,box2d.b2ContactSolver.prototype.m_contacts=null,box2d.b2ContactSolver.prototype.m_count=0,box2d.b2ContactSolver.prototype.Initialize=function(a){if(this.m_step.Copy(a.step),this.m_allocator=a.allocator,this.m_count=a.count,this.m_positionConstraints.lengthc;++c)for(g=this.m_contacts[c],h=g.m_fixtureA,i=g.m_fixtureB,j=h.GetShape(),k=i.GetShape(),l=j.m_radius,m=k.m_radius,n=h.GetBody(),o=i.GetBody(),p=g.GetManifold(),q=p.pointCount,box2d.ENABLE_ASSERTS&&box2d.b2Assert(q>0),r=this.m_velocityConstraints[c],r.friction=g.m_friction,r.restitution=g.m_restitution,r.tangentSpeed=g.m_tangentSpeed,r.indexA=n.m_islandIndex,r.indexB=o.m_islandIndex,r.invMassA=n.m_invMass,r.invMassB=o.m_invMass,r.invIA=n.m_invI,r.invIB=o.m_invI,r.contactIndex=c,r.pointCount=q,r.K.SetZero(),r.normalMass.SetZero(),s=this.m_positionConstraints[c],s.indexA=n.m_islandIndex,s.indexB=o.m_islandIndex,s.invMassA=n.m_invMass,s.invMassB=o.m_invMass,s.localCenterA.Copy(n.m_sweep.localCenter),s.localCenterB.Copy(o.m_sweep.localCenter),s.invIA=n.m_invI,s.invIB=o.m_invI,s.localNormal.Copy(p.localNormal),s.localPoint.Copy(p.localPoint),s.pointCount=q,s.radiusA=l,s.radiusB=m,s.type=p.type,e=0,f=q;f>e;++e)t=p.points[e],u=r.points[e],this.m_step.warmStarting?(u.normalImpulse=this.m_step.dtRatio*t.normalImpulse,u.tangentImpulse=this.m_step.dtRatio*t.tangentImpulse):(u.normalImpulse=0,u.tangentImpulse=0),u.rA.SetZero(),u.rB.SetZero(),u.normalMass=0,u.tangentMass=0,u.velocityBias=0,s.localPoints[e].Copy(t.localPoint);return this},box2d.b2ContactSolver.prototype.InitializeVelocityConstraints=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S=box2d.b2ContactSolver.prototype.InitializeVelocityConstraints.s_xfA,T=box2d.b2ContactSolver.prototype.InitializeVelocityConstraints.s_xfB,U=box2d.b2ContactSolver.prototype.InitializeVelocityConstraints.s_worldManifold,V=1e3;for(a=0,b=this.m_count;b>a;++a){for(e=this.m_velocityConstraints[a],f=this.m_positionConstraints[a],g=f.radiusA,h=f.radiusB,i=this.m_contacts[e.contactIndex].GetManifold(),j=e.indexA,k=e.indexB,l=e.invMassA,m=e.invMassB,n=e.invIA,o=e.invIB,p=f.localCenterA,q=f.localCenterB,r=this.m_positions[j].c,s=this.m_positions[j].a,t=this.m_velocities[j].v,u=this.m_velocities[j].w,v=this.m_positions[k].c,w=this.m_positions[k].a,x=this.m_velocities[k].v,y=this.m_velocities[k].w,box2d.ENABLE_ASSERTS&&box2d.b2Assert(i.pointCount>0),S.q.SetAngleRadians(s),T.q.SetAngleRadians(w),box2d.b2SubVV(r,box2d.b2MulRV(S.q,p,box2d.b2Vec2.s_t0),S.p),box2d.b2SubVV(v,box2d.b2MulRV(T.q,q,box2d.b2Vec2.s_t0),T.p),U.Initialize(i,S,g,T,h),e.normal.Copy(U.normal),box2d.b2CrossVOne(e.normal,e.tangent),z=e.pointCount,c=0,d=z;d>c;++c)A=e.points[c],box2d.b2SubVV(U.points[c],r,A.rA),box2d.b2SubVV(U.points[c],v,A.rB),B=box2d.b2CrossVV(A.rA,e.normal),C=box2d.b2CrossVV(A.rB,e.normal),D=l+m+n*B*B+o*C*C,A.normalMass=D>0?1/D:0,E=e.tangent,F=box2d.b2CrossVV(A.rA,E),G=box2d.b2CrossVV(A.rB,E),H=l+m+n*F*F+o*G*G,A.tangentMass=H>0?1/H:0,A.velocityBias=0,I=box2d.b2DotVV(e.normal,box2d.b2SubVV(box2d.b2AddVCrossSV(x,y,A.rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(t,u,A.rA,box2d.b2Vec2.s_t1),box2d.b2Vec2.s_t0)),I<-box2d.b2_velocityThreshold&&(A.velocityBias+=-e.restitution*I);2===e.pointCount&&(J=e.points[0],K=e.points[1],L=box2d.b2CrossVV(J.rA,e.normal),M=box2d.b2CrossVV(J.rB,e.normal),N=box2d.b2CrossVV(K.rA,e.normal),O=box2d.b2CrossVV(K.rB,e.normal),P=l+m+n*L*L+o*M*M,Q=l+m+n*N*N+o*O*O,R=l+m+n*L*N+o*M*O,V*(P*Q-R*R)>P*P?(e.K.ex.SetXY(P,R),e.K.ey.SetXY(R,Q),e.K.GetInverse(e.normalMass)):e.pointCount=1)}},box2d.b2ContactSolver.prototype.InitializeVelocityConstraints.s_xfA=new box2d.b2Transform,box2d.b2ContactSolver.prototype.InitializeVelocityConstraints.s_xfB=new box2d.b2Transform,box2d.b2ContactSolver.prototype.InitializeVelocityConstraints.s_worldManifold=new box2d.b2WorldManifold,box2d.b2ContactSolver.prototype.WarmStart=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=box2d.b2ContactSolver.prototype.WarmStart.s_P;for(a=0,b=this.m_count;b>a;++a){for(e=this.m_velocityConstraints[a],f=e.indexA,g=e.indexB,h=e.invMassA,i=e.invIA,j=e.invMassB,k=e.invIB,l=e.pointCount,m=this.m_velocities[f].v,n=this.m_velocities[f].w,o=this.m_velocities[g].v,p=this.m_velocities[g].w,q=e.normal,r=e.tangent,c=0,d=l;d>c;++c)s=e.points[c],box2d.b2AddVV(box2d.b2MulSV(s.normalImpulse,q,box2d.b2Vec2.s_t0),box2d.b2MulSV(s.tangentImpulse,r,box2d.b2Vec2.s_t1),t),n-=i*box2d.b2CrossVV(s.rA,t),m.SelfMulSub(h,t),p+=k*box2d.b2CrossVV(s.rB,t),o.SelfMulAdd(j,t);this.m_velocities[f].w=n,this.m_velocities[g].w=p}},box2d.b2ContactSolver.prototype.WarmStart.s_P=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_dv,E=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_dv1,F=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_dv2,G=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P,H=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_a,I=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_b,J=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_x,K=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_d,L=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P1,M=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P2,N=box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P1P2;for(a=0,b=this.m_count;b>a;++a){for(e=this.m_velocityConstraints[a],f=e.indexA,g=e.indexB,h=e.invMassA,i=e.invIA,j=e.invMassB,k=e.invIB,l=e.pointCount,m=this.m_velocities[f].v,n=this.m_velocities[f].w,o=this.m_velocities[g].v,p=this.m_velocities[g].w,q=e.normal,r=e.tangent,s=e.friction,box2d.ENABLE_ASSERTS&&box2d.b2Assert(1===l||2===l),c=0,d=l;d>c;++c)t=e.points[c],box2d.b2SubVV(box2d.b2AddVCrossSV(o,p,t.rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(m,n,t.rA,box2d.b2Vec2.s_t1),D),u=box2d.b2DotVV(D,r)-e.tangentSpeed,w=t.tangentMass*-u,x=s*t.normalImpulse,y=box2d.b2Clamp(t.tangentImpulse+w,-x,x),w=y-t.tangentImpulse,t.tangentImpulse=y,box2d.b2MulSV(w,r,G),m.SelfMulSub(h,G),n-=i*box2d.b2CrossVV(t.rA,G),o.SelfMulAdd(j,G),p+=k*box2d.b2CrossVV(t.rB,G);if(1===e.pointCount)t=e.points[0],box2d.b2SubVV(box2d.b2AddVCrossSV(o,p,t.rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(m,n,t.rA,box2d.b2Vec2.s_t1),D),v=box2d.b2DotVV(D,q),w=-t.normalMass*(v-t.velocityBias),y=box2d.b2Max(t.normalImpulse+w,0),w=y-t.normalImpulse,t.normalImpulse=y,box2d.b2MulSV(w,q,G),m.SelfMulSub(h,G),n-=i*box2d.b2CrossVV(t.rA,G),o.SelfMulAdd(j,G),p+=k*box2d.b2CrossVV(t.rB,G);else for(z=e.points[0],A=e.points[1],H.SetXY(z.normalImpulse,A.normalImpulse),box2d.ENABLE_ASSERTS&&box2d.b2Assert(H.x>=0&&H.y>=0),box2d.b2SubVV(box2d.b2AddVCrossSV(o,p,z.rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(m,n,z.rA,box2d.b2Vec2.s_t1),E),box2d.b2SubVV(box2d.b2AddVCrossSV(o,p,A.rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(m,n,A.rA,box2d.b2Vec2.s_t1),F),B=box2d.b2DotVV(E,q),C=box2d.b2DotVV(F,q),I.x=B-z.velocityBias,I.y=C-A.velocityBias,I.SelfSub(box2d.b2MulMV(e.K,H,box2d.b2Vec2.s_t0));;){if(box2d.b2MulMV(e.normalMass,I,J).SelfNeg(),J.x>=0&&J.y>=0){box2d.b2SubVV(J,H,K),box2d.b2MulSV(K.x,q,L),box2d.b2MulSV(K.y,q,M),box2d.b2AddVV(L,M,N),m.SelfMulSub(h,N),n-=i*(box2d.b2CrossVV(z.rA,L)+box2d.b2CrossVV(A.rA,M)),o.SelfMulAdd(j,N),p+=k*(box2d.b2CrossVV(z.rB,L)+box2d.b2CrossVV(A.rB,M)),z.normalImpulse=J.x,A.normalImpulse=J.y;break}if(J.x=-z.normalMass*I.x,J.y=0,B=0,C=e.K.ex.y*J.x+I.y,J.x>=0&&C>=0){box2d.b2SubVV(J,H,K),box2d.b2MulSV(K.x,q,L),box2d.b2MulSV(K.y,q,M),box2d.b2AddVV(L,M,N),m.SelfMulSub(h,N),n-=i*(box2d.b2CrossVV(z.rA,L)+box2d.b2CrossVV(A.rA,M)),o.SelfMulAdd(j,N),p+=k*(box2d.b2CrossVV(z.rB,L)+box2d.b2CrossVV(A.rB,M)),z.normalImpulse=J.x,A.normalImpulse=J.y;break}if(J.x=0,J.y=-A.normalMass*I.y,B=e.K.ey.x*J.y+I.x,C=0,J.y>=0&&B>=0){box2d.b2SubVV(J,H,K),box2d.b2MulSV(K.x,q,L),box2d.b2MulSV(K.y,q,M),box2d.b2AddVV(L,M,N),m.SelfMulSub(h,N),n-=i*(box2d.b2CrossVV(z.rA,L)+box2d.b2CrossVV(A.rA,M)),o.SelfMulAdd(j,N),p+=k*(box2d.b2CrossVV(z.rB,L)+box2d.b2CrossVV(A.rB,M)),z.normalImpulse=J.x,A.normalImpulse=J.y;break}if(J.x=0,J.y=0,B=I.x,C=I.y,B>=0&&C>=0){box2d.b2SubVV(J,H,K),box2d.b2MulSV(K.x,q,L),box2d.b2MulSV(K.y,q,M),box2d.b2AddVV(L,M,N),m.SelfMulSub(h,N),n-=i*(box2d.b2CrossVV(z.rA,L)+box2d.b2CrossVV(A.rA,M)),o.SelfMulAdd(j,N),p+=k*(box2d.b2CrossVV(z.rB,L)+box2d.b2CrossVV(A.rB,M)),z.normalImpulse=J.x,A.normalImpulse=J.y;break}break}this.m_velocities[f].w=n,this.m_velocities[g].w=p}},box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_dv=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_dv1=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_dv2=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_a=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_b=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_x=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_d=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P1=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P2=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveVelocityConstraints.s_P1P2=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.StoreImpulses=function(){var a,b,c,d,e,f;for(a=0,b=this.m_count;b>a;++a)for(e=this.m_velocityConstraints[a],f=this.m_contacts[e.contactIndex].GetManifold(),c=0,d=e.pointCount;d>c;++c)f.points[c].normalImpulse=e.points[c].normalImpulse,f.points[c].tangentImpulse=e.points[c].tangentImpulse},box2d.b2PositionSolverManifold=function(){this.normal=new box2d.b2Vec2,this.point=new box2d.b2Vec2},box2d.b2PositionSolverManifold.prototype.normal=null,box2d.b2PositionSolverManifold.prototype.point=null,box2d.b2PositionSolverManifold.prototype.separation=0,box2d.b2PositionSolverManifold.prototype.Initialize=function(a,b,c,d){var e=box2d.b2PositionSolverManifold.prototype.Initialize.s_pointA,f=box2d.b2PositionSolverManifold.prototype.Initialize.s_pointB,g=box2d.b2PositionSolverManifold.prototype.Initialize.s_planePoint,h=box2d.b2PositionSolverManifold.prototype.Initialize.s_clipPoint;switch(box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.pointCount>0),a.type){case box2d.b2ManifoldType.e_circles:box2d.b2MulXV(b,a.localPoint,e),box2d.b2MulXV(c,a.localPoints[0],f),box2d.b2SubVV(f,e,this.normal).SelfNormalize(),box2d.b2MidVV(e,f,this.point),this.separation=box2d.b2DotVV(box2d.b2SubVV(f,e,box2d.b2Vec2.s_t0),this.normal)-a.radiusA-a.radiusB;break;case box2d.b2ManifoldType.e_faceA:box2d.b2MulRV(b.q,a.localNormal,this.normal),box2d.b2MulXV(b,a.localPoint,g),box2d.b2MulXV(c,a.localPoints[d],h),this.separation=box2d.b2DotVV(box2d.b2SubVV(h,g,box2d.b2Vec2.s_t0),this.normal)-a.radiusA-a.radiusB,this.point.Copy(h);break;case box2d.b2ManifoldType.e_faceB:box2d.b2MulRV(c.q,a.localNormal,this.normal),box2d.b2MulXV(c,a.localPoint,g),box2d.b2MulXV(b,a.localPoints[d],h),this.separation=box2d.b2DotVV(box2d.b2SubVV(h,g,box2d.b2Vec2.s_t0),this.normal)-a.radiusA-a.radiusB,this.point.Copy(h),this.normal.SelfNeg()}},box2d.b2PositionSolverManifold.prototype.Initialize.s_pointA=new box2d.b2Vec2,box2d.b2PositionSolverManifold.prototype.Initialize.s_pointB=new box2d.b2Vec2,box2d.b2PositionSolverManifold.prototype.Initialize.s_planePoint=new box2d.b2Vec2,box2d.b2PositionSolverManifold.prototype.Initialize.s_clipPoint=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolvePositionConstraints=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A=box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_xfA,B=box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_xfB,C=box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_psm,D=box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_rA,E=box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_rB,F=box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_P,G=0;for(a=0,b=this.m_count;b>a;++a){for(e=this.m_positionConstraints[a],f=e.indexA,g=e.indexB,h=e.localCenterA,i=e.invMassA,j=e.invIA,k=e.localCenterB,l=e.invMassB,m=e.invIB,n=e.pointCount,o=this.m_positions[f].c,p=this.m_positions[f].a,q=this.m_positions[g].c,r=this.m_positions[g].a,c=0,d=n;d>c;++c)A.q.SetAngleRadians(p),B.q.SetAngleRadians(r),box2d.b2SubVV(o,box2d.b2MulRV(A.q,h,box2d.b2Vec2.s_t0),A.p),box2d.b2SubVV(q,box2d.b2MulRV(B.q,k,box2d.b2Vec2.s_t0),B.p),C.Initialize(e,A,B,c),s=C.normal,t=C.point,u=C.separation,box2d.b2SubVV(t,o,D),box2d.b2SubVV(t,q,E),G=box2d.b2Min(G,u),v=box2d.b2Clamp(box2d.b2_baumgarte*(u+box2d.b2_linearSlop),-box2d.b2_maxLinearCorrection,0),w=box2d.b2CrossVV(D,s),x=box2d.b2CrossVV(E,s),y=i+l+j*w*w+m*x*x,z=y>0?-v/y:0,box2d.b2MulSV(z,s,F),o.SelfMulSub(i,F),p-=j*box2d.b2CrossVV(D,F),q.SelfMulAdd(l,F),r+=m*box2d.b2CrossVV(E,F);this.m_positions[f].a=p,this.m_positions[g].a=r}return G>-3*box2d.b2_linearSlop},box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_xfA=new box2d.b2Transform,box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_xfB=new box2d.b2Transform,box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_psm=new box2d.b2PositionSolverManifold,box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_rA=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_rB=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolvePositionConstraints.s_P=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C=box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_xfA,D=box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_xfB,E=box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_psm,F=box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_rA,G=box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_rB,H=box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_P,I=0;for(c=0,d=this.m_count;d>c;++c){for(g=this.m_positionConstraints[c],h=g.indexA,i=g.indexB,j=g.localCenterA,k=g.localCenterB,l=g.pointCount,m=0,n=0,(h===a||h===b)&&(m=g.invMassA,n=g.invIA),o=0,p=0,(i===a||i===b)&&(o=g.invMassB,p=g.invIB),q=this.m_positions[h].c,r=this.m_positions[h].a,s=this.m_positions[i].c,t=this.m_positions[i].a,e=0,f=l;f>e;++e)C.q.SetAngleRadians(r),D.q.SetAngleRadians(t),box2d.b2SubVV(q,box2d.b2MulRV(C.q,j,box2d.b2Vec2.s_t0),C.p),box2d.b2SubVV(s,box2d.b2MulRV(D.q,k,box2d.b2Vec2.s_t0),D.p),E.Initialize(g,C,D,e),u=E.normal,v=E.point,w=E.separation,box2d.b2SubVV(v,q,F),box2d.b2SubVV(v,s,G),I=box2d.b2Min(I,w),x=box2d.b2Clamp(box2d.b2_toiBaumgarte*(w+box2d.b2_linearSlop),-box2d.b2_maxLinearCorrection,0),y=box2d.b2CrossVV(F,u),z=box2d.b2CrossVV(G,u),A=m+o+n*y*y+p*z*z,B=A>0?-x/A:0,box2d.b2MulSV(B,u,H),q.SelfMulSub(m,H),r-=n*box2d.b2CrossVV(F,H),s.SelfMulAdd(o,H),t+=p*box2d.b2CrossVV(G,H);this.m_positions[h].a=r,this.m_positions[i].a=t}return I>=-1.5*box2d.b2_linearSlop},box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_xfA=new box2d.b2Transform,box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_xfB=new box2d.b2Transform,box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_psm=new box2d.b2PositionSolverManifold,box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_rA=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_rB=new box2d.b2Vec2,box2d.b2ContactSolver.prototype.SolveTOIPositionConstraints.s_P=new box2d.b2Vec2,goog.provide("box2d.b2WorldCallbacks"),goog.require("box2d.b2Settings"),box2d.b2DestructionListener=function(){},box2d.b2DestructionListener.prototype.SayGoodbyeJoint=function(){},box2d.b2DestructionListener.prototype.SayGoodbyeFixture=function(){},box2d.b2ContactFilter=function(){},box2d.b2ContactFilter.prototype.ShouldCollide=function(a,b){var c=a.GetFilterData(),d=b.GetFilterData();if(c.groupIndex===d.groupIndex&&0!==c.groupIndex)return c.groupIndex>0;var e=0!==(c.maskBits&d.categoryBits)&&0!==(c.categoryBits&d.maskBits);return e},box2d.b2ContactFilter.b2_defaultFilter=new box2d.b2ContactFilter,box2d.b2ContactImpulse=function(){this.normalImpulses=box2d.b2MakeNumberArray(box2d.b2_maxManifoldPoints),this.tangentImpulses=box2d.b2MakeNumberArray(box2d.b2_maxManifoldPoints)},box2d.b2ContactImpulse.prototype.normalImpulses=null,box2d.b2ContactImpulse.prototype.tangentImpulses=null,box2d.b2ContactImpulse.prototype.count=0,box2d.b2ContactListener=function(){},box2d.b2ContactListener.prototype.BeginContact=function(){},box2d.b2ContactListener.prototype.EndContact=function(){},box2d.b2ContactListener.prototype.PreSolve=function(){},box2d.b2ContactListener.prototype.PostSolve=function(){},box2d.b2ContactListener.b2_defaultListener=new box2d.b2ContactListener,box2d.b2QueryCallback=function(){},box2d.b2QueryCallback.prototype.ReportFixture=function(){return!0},box2d.b2RayCastCallback=function(){},box2d.b2RayCastCallback.prototype.ReportFixture=function(a,b,c,d){return d},goog.provide("box2d.b2Island"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Timer"),goog.require("box2d.b2TimeStep"),goog.require("box2d.b2WorldCallbacks"),goog.require("box2d.b2ContactSolver"),box2d.b2Island=function(){this.m_bodies=new Array(1024),this.m_contacts=new Array(1024),this.m_joints=new Array(1024),this.m_positions=box2d.b2Position.MakeArray(1024),this.m_velocities=box2d.b2Velocity.MakeArray(1024)},box2d.b2Island.prototype.m_allocator=null,box2d.b2Island.prototype.m_listener=null,box2d.b2Island.prototype.m_bodies=null,box2d.b2Island.prototype.m_contacts=null,box2d.b2Island.prototype.m_joints=null,box2d.b2Island.prototype.m_positions=null,box2d.b2Island.prototype.m_velocities=null,box2d.b2Island.prototype.m_bodyCount=0,box2d.b2Island.prototype.m_jointCount=0,box2d.b2Island.prototype.m_contactCount=0,box2d.b2Island.prototype.m_bodyCapacity=0,box2d.b2Island.prototype.m_contactCapacity=0,box2d.b2Island.prototype.m_jointCapacity=0,box2d.b2Island.prototype.Initialize=function(a,b,c,d,e){for(this.m_bodyCapacity=a,this.m_contactCapacity=b,this.m_jointCapacity=c,this.m_bodyCount=0,this.m_contactCount=0,this.m_jointCount=0,this.m_allocator=d,this.m_listener=e;this.m_bodies.lengthbox2d.b2_maxTranslationSquared){var r=box2d.b2_maxTranslation/q.GetLength();k.SelfMul(r)}var s=f*l;if(s*s>box2d.b2_maxRotationSquared){var r=box2d.b2_maxRotation/box2d.b2Abs(s);l*=r}i.x+=f*k.x,i.y+=f*k.y,j+=f*l,this.m_positions[g].a=j,this.m_velocities[g].w=l}e.Reset();for(var t=!1,g=0;gA||box2d.b2DotVV(h.m_linearVelocity,h.m_linearVelocity)>z?(h.m_sleepTime=0,y=0):(h.m_sleepTime+=f,y=box2d.b2Min(y,h.m_sleepTime)))}if(y>=box2d.b2_timeToSleep&&t)for(var g=0;gbox2d.b2_maxTranslationSquared){var o=box2d.b2_maxTranslation/n.GetLength();l.SelfMul(o)}var p=i*m;if(p*p>box2d.b2_maxRotationSquared){var o=box2d.b2_maxRotation/box2d.b2Abs(p);m*=o}j.SelfMulAdd(i,l),k+=i*m,this.m_positions[d].a=k,this.m_velocities[d].w=m;var q=this.m_bodies[d];q.m_sweep.c.Copy(j),q.m_sweep.a=k,q.m_linearVelocity.Copy(l),q.m_angularVelocity=m,q.SynchronizeTransform()}this.Report(g.m_velocityConstraints)},box2d.b2Island.prototype.Report=function(a){if(null!==this.m_listener)for(var b=0;b0?e.pop():a(b)},g=function(a){e.push(a)};this.m_registers[c][d].pool=e,this.m_registers[c][d].createFcn=f,this.m_registers[c][d].destroyFcn=g,this.m_registers[c][d].primary=!0,c!==d&&(this.m_registers[d][c].pool=e,this.m_registers[d][c].createFcn=f,this.m_registers[d][c].destroyFcn=g,this.m_registers[d][c].primary=!1)},box2d.b2ContactFactory.prototype.InitializeRegisters=function(){this.m_registers=new Array(box2d.b2ShapeType.e_shapeTypeCount);for(var a=0;a=0&&e=0&&f0&&b.IsSensor()===!1&&c.IsSensor()===!1&&(b.GetBody().SetAwake(!0),c.GetBody().SetAwake(!0));var d=b.GetType(),e=c.GetType();box2d.ENABLE_ASSERTS&&box2d.b2Assert(d>=0&&e=0&&e0),--this.m_count;var a=this.m_stack[this.m_count];return this.m_stack[this.m_count]=null,a},box2d.b2GrowableStack.prototype.GetCount=function(){return this.m_count},goog.provide("box2d.b2DynamicTree"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Collision"),goog.require("box2d.b2GrowableStack"),box2d.b2TreeNode=function(a){this.m_id=a||0,this.aabb=new box2d.b2AABB},box2d.b2TreeNode.prototype.m_id=0,box2d.b2TreeNode.prototype.aabb=null,box2d.b2TreeNode.prototype.userData=null,box2d.b2TreeNode.prototype.parent=null,box2d.b2TreeNode.prototype.child1=null,box2d.b2TreeNode.prototype.child2=null,box2d.b2TreeNode.prototype.height=0,box2d.b2TreeNode.prototype.IsLeaf=function(){return null===this.child1},box2d.b2DynamicTree=function(){},box2d.b2DynamicTree.prototype.m_root=null,box2d.b2DynamicTree.prototype.m_freeList=null,box2d.b2DynamicTree.prototype.m_path=0,box2d.b2DynamicTree.prototype.m_insertionCount=0,box2d.b2DynamicTree.s_stack=new box2d.b2GrowableStack(256),box2d.b2DynamicTree.s_r=new box2d.b2Vec2,box2d.b2DynamicTree.s_v=new box2d.b2Vec2,box2d.b2DynamicTree.s_abs_v=new box2d.b2Vec2,box2d.b2DynamicTree.s_segmentAABB=new box2d.b2AABB,box2d.b2DynamicTree.s_subInput=new box2d.b2RayCastInput,box2d.b2DynamicTree.s_combinedAABB=new box2d.b2AABB,box2d.b2DynamicTree.s_aabb=new box2d.b2AABB,box2d.b2DynamicTree.prototype.GetUserData=function(a){return box2d.ENABLE_ASSERTS&&box2d.b2Assert(null!==a),a.userData},box2d.b2DynamicTree.prototype.GetFatAABB=function(a){return box2d.ENABLE_ASSERTS&&box2d.b2Assert(null!==a),a.aabb},box2d.b2DynamicTree.prototype.Query=function(a,b){if(null!==this.m_root){var c=box2d.b2DynamicTree.s_stack.Reset();for(c.Push(this.m_root);c.GetCount()>0;){var d=c.Pop();if(null!==d&&d.aabb.TestOverlap(b))if(d.IsLeaf()){var e=a(d);if(e===!1)return}else c.Push(d.child1),c.Push(d.child2)}}},box2d.b2DynamicTree.prototype.RayCast=function(a,b){if(null!==this.m_root){var c=b.p1,d=b.p2,e=box2d.b2SubVV(d,c,box2d.b2DynamicTree.s_r);box2d.ENABLE_ASSERTS&&box2d.b2Assert(e.GetLengthSquared()>0),e.Normalize();var f=box2d.b2CrossOneV(e,box2d.b2DynamicTree.s_v),g=box2d.b2AbsV(f,box2d.b2DynamicTree.s_abs_v),h=b.maxFraction,i=box2d.b2DynamicTree.s_segmentAABB,j=c.x+h*(d.x-c.x),k=c.y+h*(d.y-c.y);i.lowerBound.x=box2d.b2Min(c.x,j),i.lowerBound.y=box2d.b2Min(c.y,k),i.upperBound.x=box2d.b2Max(c.x,j),i.upperBound.y=box2d.b2Max(c.y,k);var l=box2d.b2DynamicTree.s_stack.Reset();for(l.Push(this.m_root);l.GetCount()>0;){var m=l.Pop();if(null!==m&&box2d.b2TestOverlapAABB(m.aabb,i)!==!1){var n=m.aabb.GetCenter(),o=m.aabb.GetExtents(),p=box2d.b2Abs(box2d.b2DotVV(f,box2d.b2SubVV(c,n,box2d.b2Vec2.s_t0)))-box2d.b2DotVV(g,o);if(!(p>0))if(m.IsLeaf()){var q=box2d.b2DynamicTree.s_subInput;q.p1.Copy(b.p1),q.p2.Copy(b.p2),q.maxFraction=h;var r=a(q,m);if(0===r)return;r>0&&(h=r,j=c.x+h*(d.x-c.x),k=c.y+h*(d.y-c.y),i.lowerBound.x=box2d.b2Min(c.x,j),i.lowerBound.y=box2d.b2Min(c.y,k),i.upperBound.x=box2d.b2Max(c.x,j),i.upperBound.y=box2d.b2Max(c.y,k))}else l.Push(m.child1),l.Push(m.child2)}}}},box2d.b2DynamicTree.prototype.AllocateNode=function(){if(this.m_freeList){var a=this.m_freeList;return this.m_freeList=a.parent,a.parent=null,a.child1=null,a.child2=null,a.height=0,a.userData=null,a}return new box2d.b2TreeNode(box2d.b2DynamicTree.prototype.s_node_id++)},box2d.b2DynamicTree.prototype.s_node_id=0,box2d.b2DynamicTree.prototype.FreeNode=function(a){a.parent=this.m_freeList,a.height=-1,this.m_freeList=a},box2d.b2DynamicTree.prototype.CreateProxy=function(a,b){var c=this.AllocateNode(),d=box2d.b2_aabbExtension,e=box2d.b2_aabbExtension;return c.aabb.lowerBound.x=a.lowerBound.x-d,c.aabb.lowerBound.y=a.lowerBound.y-e,c.aabb.upperBound.x=a.upperBound.x+d,c.aabb.upperBound.y=a.upperBound.y+e,c.userData=b,c.height=0,this.InsertLeaf(c),c},box2d.b2DynamicTree.prototype.DestroyProxy=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.IsLeaf()),this.RemoveLeaf(a),this.FreeNode(a)},box2d.b2DynamicTree.prototype.MoveProxy=function(a,b,c){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.IsLeaf()),a.aabb.Contains(b))return!1;this.RemoveLeaf(a);var d=box2d.b2_aabbExtension+box2d.b2_aabbMultiplier*(c.x>0?c.x:-c.x),e=box2d.b2_aabbExtension+box2d.b2_aabbMultiplier*(c.y>0?c.y:-c.y);return a.aabb.lowerBound.x=b.lowerBound.x-d,a.aabb.lowerBound.y=b.lowerBound.y-e,a.aabb.upperBound.x=b.upperBound.x+d,a.aabb.upperBound.y=b.upperBound.y+e,this.InsertLeaf(a),!0},box2d.b2DynamicTree.prototype.InsertLeaf=function(a){if(++this.m_insertionCount,null===this.m_root)return this.m_root=a,void(this.m_root.parent=null);for(var b,c,d=a.aabb,e=(d.GetCenter(),this.m_root);e.IsLeaf()===!1;){b=e.child1,c=e.child2;var f=e.aabb.GetPerimeter(),g=box2d.b2DynamicTree.s_combinedAABB;g.Combine2(e.aabb,d);var h,i,j,k=g.GetPerimeter(),l=2*k,m=2*(k-f),n=box2d.b2DynamicTree.s_aabb;b.IsLeaf()?(n.Combine2(d,b.aabb),h=n.GetPerimeter()+m):(n.Combine2(d,b.aabb),i=b.aabb.GetPerimeter(),j=n.GetPerimeter(),h=j-i+m);var o;if(c.IsLeaf()?(n.Combine2(d,c.aabb),o=n.GetPerimeter()+m):(n.Combine2(d,c.aabb),i=c.aabb.GetPerimeter(),j=n.GetPerimeter(),o=j-i+m),h>l&&o>l)break;e=o>h?b:c}var p=e,q=p.parent,r=this.AllocateNode();for(r.parent=q,r.userData=null,r.aabb.Combine2(d,p.aabb),r.height=p.height+1,q?(q.child1===p?q.child1=r:q.child2=r,r.child1=p,r.child2=a,p.parent=r,a.parent=r):(r.child1=p,r.child2=a,p.parent=r,a.parent=r,this.m_root=r),e=a.parent;null!==e;)e=this.Balance(e),b=e.child1,c=e.child2,box2d.ENABLE_ASSERTS&&box2d.b2Assert(null!==b),box2d.ENABLE_ASSERTS&&box2d.b2Assert(null!==c),e.height=1+box2d.b2Max(b.height,c.height),e.aabb.Combine2(b.aabb,c.aabb),e=e.parent},box2d.b2DynamicTree.prototype.RemoveLeaf=function(a){if(a===this.m_root)return void(this.m_root=null);var b,c=a.parent,d=c.parent;if(b=c.child1===a?c.child2:c.child1,d){d.child1===c?d.child1=b:d.child2=b,b.parent=d,this.FreeNode(c);for(var e=d;e;){e=this.Balance(e);var f=e.child1,g=e.child2;e.aabb.Combine2(f.aabb,g.aabb),e.height=1+box2d.b2Max(f.height,g.height),e=e.parent}}else this.m_root=b,b.parent=null,this.FreeNode(c)},box2d.b2DynamicTree.prototype.Balance=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(null!==a),a.IsLeaf()||a.height<2)return a;var b=a.child1,c=a.child2,d=c.height-b.height;if(d>1){var e=c.child1,f=c.child2;return c.child1=a,c.parent=a.parent,a.parent=c,null!==c.parent?c.parent.child1===a?c.parent.child1=c:(box2d.ENABLE_ASSERTS&&box2d.b2Assert(c.parent.child2===a),c.parent.child2=c):this.m_root=c,e.height>f.height?(c.child2=e,a.child2=f,f.parent=a,a.aabb.Combine2(b.aabb,f.aabb),c.aabb.Combine2(a.aabb,e.aabb),a.height=1+box2d.b2Max(b.height,f.height),c.height=1+box2d.b2Max(a.height,e.height)):(c.child2=f,a.child2=e,e.parent=a,a.aabb.Combine2(b.aabb,e.aabb),c.aabb.Combine2(a.aabb,f.aabb),a.height=1+box2d.b2Max(b.height,e.height),c.height=1+box2d.b2Max(a.height,f.height)),c}if(-1>d){var g=b.child1,h=b.child2;return b.child1=a,b.parent=a.parent,a.parent=b,null!==b.parent?b.parent.child1===a?b.parent.child1=b:(box2d.ENABLE_ASSERTS&&box2d.b2Assert(b.parent.child2===a),b.parent.child2=b):this.m_root=b,g.height>h.height?(b.child2=g,a.child1=h,h.parent=a,a.aabb.Combine2(c.aabb,h.aabb),b.aabb.Combine2(a.aabb,g.aabb),a.height=1+box2d.b2Max(c.height,h.height),b.height=1+box2d.b2Max(a.height,g.height)):(b.child2=h,a.child1=g,g.parent=a,a.aabb.Combine2(c.aabb,g.aabb),b.aabb.Combine2(a.aabb,h.aabb),a.height=1+box2d.b2Max(c.height,g.height),b.height=1+box2d.b2Max(a.height,h.height)),b}return a},box2d.b2DynamicTree.prototype.GetHeight=function(){return null===this.m_root?0:this.m_root.height},box2d.b2DynamicTree.prototype.GetAreaRatio=function(){if(null===this.m_root)return 0;var a=this.m_root,b=a.aabb.GetPerimeter(),c=function(a){if(null===a)return 0;if(a.IsLeaf())return 0;var b=a.aabb.GetPerimeter();return b+=c(a.child1),b+=c(a.child2)},d=c(this.m_root);return d/b},box2d.b2DynamicTree.prototype.ComputeHeightNode=function(a){if(a.IsLeaf())return 0;var b=this.ComputeHeightNode(a.child1),c=this.ComputeHeightNode(a.child2);return 1+box2d.b2Max(b,c)},box2d.b2DynamicTree.prototype.ComputeHeight=function(){var a=this.ComputeHeightNode(this.m_root);return a},box2d.b2DynamicTree.prototype.ValidateStructure=function(a){if(null!==a){a===this.m_root&&box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===a.parent);var b=a,c=b.child1,d=b.child2;if(b.IsLeaf())return box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===c),box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===d),void(box2d.ENABLE_ASSERTS&&box2d.b2Assert(0===b.height));box2d.ENABLE_ASSERTS&&box2d.b2Assert(c.parent===a),box2d.ENABLE_ASSERTS&&box2d.b2Assert(d.parent===a),this.ValidateStructure(c),this.ValidateStructure(d)}},box2d.b2DynamicTree.prototype.ValidateMetrics=function(a){if(null!==a){var b=a,c=b.child1,d=b.child2;if(b.IsLeaf())return box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===c),box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===d),void(box2d.ENABLE_ASSERTS&&box2d.b2Assert(0===b.height));var e,f=c.height,g=d.height;e=1+box2d.b2Max(f,g),box2d.ENABLE_ASSERTS&&box2d.b2Assert(b.height===e);var h=box2d.b2DynamicTree.s_aabb;h.Combine2(c.aabb,d.aabb),box2d.ENABLE_ASSERTS&&box2d.b2Assert(h.lowerBound===b.aabb.lowerBound),box2d.ENABLE_ASSERTS&&box2d.b2Assert(h.upperBound===b.aabb.upperBound),this.ValidateMetrics(c),this.ValidateMetrics(d)}},box2d.b2DynamicTree.prototype.Validate=function(){this.ValidateStructure(this.m_root),this.ValidateMetrics(this.m_root);for(var a=0,b=this.m_freeList;null!==b;)b=b.parent,++a;box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.GetHeight()===this.ComputeHeight())},box2d.b2DynamicTree.prototype.GetMaxBalance=function(){var a=function(a,b){if(null===a)return b;if(a.height<=1)return b;box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.IsLeaf()===!1);var c=a.child1,d=a.child2,e=box2d.b2Abs(d.height-c.height);return box2d.b2Max(b,e)},b=a(this.m_root,0);return b},box2d.b2DynamicTree.prototype.RebuildBottomUp=function(){this.Validate()},box2d.b2DynamicTree.prototype.ShiftOrigin=function(a){var b=function(a,c){if(null!==a&&!(a.height<=1)){box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.IsLeaf()===!1);var d=a.child1,e=a.child2;b(d,c),b(e,c),a.aabb.lowerBound.SelfSub(c),a.aabb.upperBound.SelfSub(c)}};b(this.m_root,a)},goog.provide("box2d.b2BroadPhase"),goog.require("box2d.b2Settings"),goog.require("box2d.b2DynamicTree"),box2d.b2Pair=function(){},box2d.b2Pair.prototype.proxyA=null,box2d.b2Pair.prototype.proxyB=null,box2d.b2BroadPhase=function(){this.m_tree=new box2d.b2DynamicTree,this.m_moveBuffer=new Array,this.m_pairBuffer=new Array},box2d.b2BroadPhase.prototype.m_tree=null,box2d.b2BroadPhase.prototype.m_proxyCount=0,box2d.b2BroadPhase.prototype.m_moveCount=0,box2d.b2BroadPhase.prototype.m_moveBuffer=null,box2d.b2BroadPhase.prototype.m_pairCount=0,box2d.b2BroadPhase.prototype.m_pairBuffer=null,box2d.b2BroadPhase.prototype.CreateProxy=function(a,b){var c=this.m_tree.CreateProxy(a,b);return++this.m_proxyCount,this.BufferMove(c),c},box2d.b2BroadPhase.prototype.DestroyProxy=function(a){this.UnBufferMove(a),--this.m_proxyCount,this.m_tree.DestroyProxy(a)},box2d.b2BroadPhase.prototype.MoveProxy=function(a,b,c){var d=this.m_tree.MoveProxy(a,b,c);d&&this.BufferMove(a)},box2d.b2BroadPhase.prototype.TouchProxy=function(a){this.BufferMove(a)},box2d.b2BroadPhase.prototype.GetFatAABB=function(a){return this.m_tree.GetFatAABB(a)},box2d.b2BroadPhase.prototype.GetUserData=function(a){return this.m_tree.GetUserData(a)},box2d.b2BroadPhase.prototype.TestOverlap=function(a,b){var c=this.m_tree.GetFatAABB(a),d=this.m_tree.GetFatAABB(b);return box2d.b2TestOverlapAABB(c,d)},box2d.b2BroadPhase.prototype.GetProxyCount=function(){return this.m_proxyCount},box2d.b2BroadPhase.prototype.GetTreeHeight=function(){return this.m_tree.GetHeight()},box2d.b2BroadPhase.prototype.GetTreeBalance=function(){return this.m_tree.GetMaxBalance()},box2d.b2BroadPhase.prototype.GetTreeQuality=function(){return this.m_tree.GetAreaRatio()},box2d.b2BroadPhase.prototype.ShiftOrigin=function(a){this.m_tree.ShiftOrigin(a)},box2d.b2BroadPhase.prototype.UpdatePairs=function(a){this.m_pairCount=0;for(var b=0;bd?"rgba("+a+","+b+","+c+","+d+")":"rgb("+a+","+b+","+c+")"},box2d.b2Color.RED=new box2d.b2Color(1,0,0),box2d.b2Color.GREEN=new box2d.b2Color(0,1,0),box2d.b2Color.BLUE=new box2d.b2Color(0,0,1),box2d.b2DrawFlags={e_none:0,e_shapeBit:1,e_jointBit:2,e_aabbBit:4,e_pairBit:8,e_centerOfMassBit:16,e_controllerBit:32,e_all:63},goog.exportProperty(box2d.b2DrawFlags,"e_none",box2d.b2DrawFlags.e_none),goog.exportProperty(box2d.b2DrawFlags,"e_shapeBit",box2d.b2DrawFlags.e_shapeBit),goog.exportProperty(box2d.b2DrawFlags,"e_jointBit",box2d.b2DrawFlags.e_jointBit),goog.exportProperty(box2d.b2DrawFlags,"e_aabbBit",box2d.b2DrawFlags.e_aabbBit),goog.exportProperty(box2d.b2DrawFlags,"e_pairBit",box2d.b2DrawFlags.e_pairBit),goog.exportProperty(box2d.b2DrawFlags,"e_centerOfMassBit",box2d.b2DrawFlags.e_centerOfMassBit),goog.exportProperty(box2d.b2DrawFlags,"e_controllerBit",box2d.b2DrawFlags.e_controllerBit),goog.exportProperty(box2d.b2DrawFlags,"e_all",box2d.b2DrawFlags.e_all),box2d.b2Draw=function(){},box2d.b2Draw.prototype.m_drawFlags=box2d.b2DrawFlags.e_none,box2d.b2Draw.prototype.SetFlags=function(a){this.m_drawFlags=a},box2d.b2Draw.prototype.GetFlags=function(){return this.m_drawFlags},box2d.b2Draw.prototype.AppendFlags=function(a){this.m_drawFlags|=a},box2d.b2Draw.prototype.ClearFlags=function(a){this.m_drawFlags&=~a},box2d.b2Draw.prototype.PushTransform=function(){},box2d.b2Draw.prototype.PopTransform=function(){},box2d.b2Draw.prototype.DrawPolygon=function(){},box2d.b2Draw.prototype.DrawSolidPolygon=function(){},box2d.b2Draw.prototype.DrawCircle=function(){},box2d.b2Draw.prototype.DrawSolidCircle=function(){},box2d.b2Draw.prototype.DrawSegment=function(){},box2d.b2Draw.prototype.DrawTransform=function(){},goog.provide("box2d.b2Fixture"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Collision"),goog.require("box2d.b2Shape"),box2d.b2Filter=function(){},box2d.b2Filter.prototype.categoryBits=1,box2d.b2Filter.prototype.maskBits=65535,box2d.b2Filter.prototype.groupIndex=0,box2d.b2Filter.prototype.Clone=function(){return(new box2d.b2Filter).Copy(this)},box2d.b2Filter.prototype.Copy=function(a){return box2d.ENABLE_ASSERTS&&box2d.b2Assert(this!==a),this.categoryBits=a.categoryBits,this.maskBits=a.maskBits,this.groupIndex=a.groupIndex,this},box2d.b2FixtureDef=function(){this.filter=new box2d.b2Filter},box2d.b2FixtureDef.prototype.shape=null,box2d.b2FixtureDef.prototype.userData=null,box2d.b2FixtureDef.prototype.friction=.2,box2d.b2FixtureDef.prototype.restitution=0,box2d.b2FixtureDef.prototype.density=0,box2d.b2FixtureDef.prototype.isSensor=!1,box2d.b2FixtureDef.prototype.filter=null,box2d.b2FixtureProxy=function(){this.aabb=new box2d.b2AABB},box2d.b2FixtureProxy.prototype.aabb=null,box2d.b2FixtureProxy.prototype.fixture=null,box2d.b2FixtureProxy.prototype.childIndex=0,box2d.b2FixtureProxy.prototype.proxy=null,box2d.b2FixtureProxy.MakeArray=function(a){return box2d.b2MakeArray(a,function(){return new box2d.b2FixtureProxy})},box2d.b2Fixture=function(){this.m_proxyCount=0,this.m_filter=new box2d.b2Filter},box2d.b2Fixture.prototype.m_density=0,box2d.b2Fixture.prototype.m_next=null,box2d.b2Fixture.prototype.m_body=null,box2d.b2Fixture.prototype.m_shape=null,box2d.b2Fixture.prototype.m_friction=0,box2d.b2Fixture.prototype.m_restitution=0,box2d.b2Fixture.prototype.m_proxies=null,box2d.b2Fixture.prototype.m_proxyCount=0,box2d.b2Fixture.prototype.m_filter=null,box2d.b2Fixture.prototype.m_isSensor=!1,box2d.b2Fixture.prototype.m_userData=null,box2d.b2Fixture.prototype.GetType=function(){return this.m_shape.GetType()},box2d.b2Fixture.prototype.GetShape=function(){return this.m_shape},box2d.b2Fixture.prototype.IsSensor=function(){return this.m_isSensor},box2d.b2Fixture.prototype.GetFilterData=function(){return this.m_filter},box2d.b2Fixture.prototype.GetUserData=function(){return this.m_userData},box2d.b2Fixture.prototype.SetUserData=function(a){this.m_userData=a},box2d.b2Fixture.prototype.GetBody=function(){return this.m_body},box2d.b2Fixture.prototype.GetNext=function(){return this.m_next},box2d.b2Fixture.prototype.SetDensity=function(a){this.m_density=a},box2d.b2Fixture.prototype.GetDensity=function(){return this.m_density},box2d.b2Fixture.prototype.GetFriction=function(){return this.m_friction},box2d.b2Fixture.prototype.SetFriction=function(a){this.m_friction=a},box2d.b2Fixture.prototype.GetRestitution=function(){return this.m_restitution},box2d.b2Fixture.prototype.SetRestitution=function(a){this.m_restitution=a},box2d.b2Fixture.prototype.TestPoint=function(a){return this.m_shape.TestPoint(this.m_body.GetTransform(),a)},box2d.b2Fixture.prototype.RayCast=function(a,b,c){return this.m_shape.RayCast(a,b,this.m_body.GetTransform(),c)},box2d.b2Fixture.prototype.GetMassData=function(a){return a=a||new box2d.b2MassData,this.m_shape.ComputeMass(a,this.m_density),a},box2d.b2Fixture.prototype.GetAABB=function(a){return box2d.ENABLE_ASSERTS&&box2d.b2Assert(a>=0&&a=0),box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a.angularDamping)&&a.angularDamping>=0),box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a.linearDamping)&&a.linearDamping>=0),this.m_flags=box2d.b2BodyFlag.e_none,a.bullet&&(this.m_flags|=box2d.b2BodyFlag.e_bulletFlag),a.fixedRotation&&(this.m_flags|=box2d.b2BodyFlag.e_fixedRotationFlag),a.allowSleep&&(this.m_flags|=box2d.b2BodyFlag.e_autoSleepFlag),a.awake&&(this.m_flags|=box2d.b2BodyFlag.e_awakeFlag),a.active&&(this.m_flags|=box2d.b2BodyFlag.e_activeFlag),this.m_world=b,this.m_xf.p.Copy(a.position),this.m_xf.q.SetAngleRadians(a.angle),this.m_sweep.localCenter.SetZero(),this.m_sweep.c0.Copy(this.m_xf.p),this.m_sweep.c.Copy(this.m_xf.p),this.m_sweep.a0=a.angle,this.m_sweep.a=a.angle,this.m_sweep.alpha0=0,this.m_linearVelocity.Copy(a.linearVelocity),this.m_angularVelocity=a.angularVelocity,this.m_linearDamping=a.linearDamping,this.m_angularDamping=a.angularDamping,this.m_gravityScale=a.gravityScale,this.m_force.SetZero(),this.m_torque=0,this.m_sleepTime=0,this.m_type=a.type,a.type===box2d.b2BodyType.b2_dynamicBody?(this.m_mass=1,this.m_invMass=1):(this.m_mass=0,this.m_invMass=0),this.m_I=0,this.m_invI=0,this.m_userData=a.userData,this.m_fixtureList=null,this.m_fixtureCount=0,this.m_controllerList=null,this.m_controllerCount=0},box2d.b2Body.prototype.m_flags=box2d.b2BodyFlag.e_none,box2d.b2Body.prototype.m_islandIndex=0,box2d.b2Body.prototype.m_world=null,box2d.b2Body.prototype.m_xf=null,box2d.b2Body.prototype.m_out_xf=null,box2d.b2Body.prototype.m_sweep=null,box2d.b2Body.prototype.m_out_sweep=null,box2d.b2Body.prototype.m_jointList=null,box2d.b2Body.prototype.m_contactList=null,box2d.b2Body.prototype.m_prev=null,box2d.b2Body.prototype.m_next=null,box2d.b2Body.prototype.m_linearVelocity=null,box2d.b2Body.prototype.m_out_linearVelocity=null,box2d.b2Body.prototype.m_angularVelocity=0,box2d.b2Body.prototype.m_linearDamping=0,box2d.b2Body.prototype.m_angularDamping=0,box2d.b2Body.prototype.m_gravityScale=1,box2d.b2Body.prototype.m_force=null,box2d.b2Body.prototype.m_torque=0,box2d.b2Body.prototype.m_sleepTime=0,box2d.b2Body.prototype.m_type=box2d.b2BodyType.b2_staticBody,box2d.b2Body.prototype.m_mass=1,box2d.b2Body.prototype.m_invMass=1,box2d.b2Body.prototype.m_I=0,box2d.b2Body.prototype.m_invI=0,box2d.b2Body.prototype.m_userData=null,box2d.b2Body.prototype.m_fixtureList=null,box2d.b2Body.prototype.m_fixtureCount=0,box2d.b2Body.prototype.m_controllerList=null,box2d.b2Body.prototype.m_controllerCount=0,box2d.b2Body.prototype.CreateFixture=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_world.IsLocked()===!1),this.m_world.IsLocked()===!0)return null;var b=new box2d.b2Fixture;if(b.Create(this,a),this.m_flags&box2d.b2BodyFlag.e_activeFlag){var c=this.m_world.m_contactManager.m_broadPhase;b.CreateProxies(c,this.m_xf)}return b.m_next=this.m_fixtureList,this.m_fixtureList=b,++this.m_fixtureCount,b.m_body=this,b.m_density>0&&this.ResetMassData(),this.m_world.m_flags|=box2d.b2WorldFlag.e_newFixture,b},box2d.b2Body.prototype.CreateFixture2=function(a,b){void 0===b&&(b=0);var c=box2d.b2Body.prototype.CreateFixture2.s_def;return c.shape=a,c.density=b,this.CreateFixture(c)},box2d.b2Body.prototype.CreateFixture2.s_def=new box2d.b2FixtureDef,box2d.b2Body.prototype.DestroyFixture=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_world.IsLocked()===!1),this.m_world.IsLocked()!==!0){box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.m_body===this),box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_fixtureCount>0);for(var b=this.m_fixtureList,c=null,d=!1;null!==b;){if(b===a){c?c.m_next=a.m_next:this.m_fixtureList=a.m_next,d=!0;break}c=b,b=b.m_next}box2d.ENABLE_ASSERTS&&box2d.b2Assert(d);for(var e=this.m_contactList;e;){var f=e.contact;e=e.next;var g=f.GetFixtureA(),h=f.GetFixtureB();(a===g||a===h)&&this.m_world.m_contactManager.Destroy(f)}if(this.m_flags&box2d.b2BodyFlag.e_activeFlag){var i=this.m_world.m_contactManager.m_broadPhase;a.DestroyProxies(i)}a.Destroy(),a.m_body=null,a.m_next=null,--this.m_fixtureCount,this.ResetMassData()}},box2d.b2Body.prototype.SetTransformVecRadians=function(a,b){this.SetTransformXYRadians(a.x,a.y,b)},box2d.b2Body.prototype.SetTransformXYRadians=function(a,b,c){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_world.IsLocked()===!1),this.m_world.IsLocked()!==!0&&(this.m_xf.p.x!==a||this.m_xf.p.y!==b||this.m_xf.q.GetAngleRadians()!==c)){this.m_xf.q.SetAngleRadians(c),this.m_xf.p.SetXY(a,b),box2d.b2MulXV(this.m_xf,this.m_sweep.localCenter,this.m_sweep.c),this.m_sweep.a=c,this.m_sweep.c0.Copy(this.m_sweep.c),this.m_sweep.a0=c;for(var d=this.m_world.m_contactManager.m_broadPhase,e=this.m_fixtureList;e;e=e.m_next)e.Synchronize(d,this.m_xf,this.m_xf)}},box2d.b2Body.prototype.SetTransform=function(a){this.SetTransformVecRadians(a.p,a.GetAngleRadians())},box2d.b2Body.prototype.GetTransform=function(a){return a=a||this.m_out_xf,a.Copy(this.m_xf)},box2d.b2Body.prototype.GetPosition=function(a){return a=a||this.m_out_xf.p,a.Copy(this.m_xf.p)},box2d.b2Body.prototype.SetPosition=function(a){this.SetTransformVecRadians(a,this.GetAngleRadians())},box2d.b2Body.prototype.SetPositionXY=function(a,b){this.SetTransformXYRadians(a,b,this.GetAngleRadians())},box2d.b2Body.prototype.GetAngle=function(){return this.m_sweep.a},box2d.b2Body.prototype.GetAngleRadians=box2d.b2Body.prototype.GetAngle,box2d.b2Body.prototype.GetAngleDegrees=function(){return box2d.b2RadToDeg(this.GetAngle())},box2d.b2Body.prototype.SetAngle=function(a){this.SetTransformVecRadians(this.GetPosition(),a)},box2d.b2Body.prototype.SetAngleRadians=box2d.b2Body.prototype.SetAngle,box2d.b2Body.prototype.SetAngleDegrees=function(a){this.SetAngle(box2d.b2DegToRad(a))},box2d.b2Body.prototype.GetWorldCenter=function(a){return a=a||this.m_out_sweep.c,a.Copy(this.m_sweep.c)},box2d.b2Body.prototype.GetLocalCenter=function(a){return a=a||this.m_out_sweep.localCenter,a.Copy(this.m_sweep.localCenter)},box2d.b2Body.prototype.SetLinearVelocity=function(a){this.m_type!==box2d.b2BodyType.b2_staticBody&&(box2d.b2DotVV(a,a)>0&&this.SetAwake(!0),this.m_linearVelocity.Copy(a))},box2d.b2Body.prototype.GetLinearVelocity=function(a){return a=a||this.m_out_linearVelocity,a.Copy(this.m_linearVelocity)},box2d.b2Body.prototype.SetAngularVelocity=function(a){this.m_type!==box2d.b2BodyType.b2_staticBody&&(a*a>0&&this.SetAwake(!0),this.m_angularVelocity=a)},box2d.b2Body.prototype.GetAngularVelocity=function(){return this.m_angularVelocity},box2d.b2Body.prototype.GetDefinition=function(a){return a.type=this.GetType(),a.allowSleep=(this.m_flags&box2d.b2BodyFlag.e_autoSleepFlag)===box2d.b2BodyFlag.e_autoSleepFlag,a.angle=this.GetAngleRadians(),a.angularDamping=this.m_angularDamping,a.gravityScale=this.m_gravityScale,a.angularVelocity=this.m_angularVelocity,a.fixedRotation=(this.m_flags&box2d.b2BodyFlag.e_fixedRotationFlag)===box2d.b2BodyFlag.e_fixedRotationFlag,a.bullet=(this.m_flags&box2d.b2BodyFlag.e_bulletFlag)===box2d.b2BodyFlag.e_bulletFlag,a.awake=(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)===box2d.b2BodyFlag.e_awakeFlag,a.linearDamping=this.m_linearDamping,a.linearVelocity.Copy(this.GetLinearVelocity()),a.position.Copy(this.GetPosition()),a.userData=this.GetUserData(),a},box2d.b2Body.prototype.ApplyForce=function(a,b,c){c=c||!0,this.m_type===box2d.b2BodyType.b2_dynamicBody&&(c&&0===(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)&&this.SetAwake(!0),this.m_flags&box2d.b2BodyFlag.e_awakeFlag&&(this.m_force.x+=a.x,this.m_force.y+=a.y,this.m_torque+=(b.x-this.m_sweep.c.x)*a.y-(b.y-this.m_sweep.c.y)*a.x))},box2d.b2Body.prototype.ApplyForceToCenter=function(a,b){b=b||!0,this.m_type===box2d.b2BodyType.b2_dynamicBody&&(b&&0===(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)&&this.SetAwake(!0),this.m_flags&box2d.b2BodyFlag.e_awakeFlag&&(this.m_force.x+=a.x,this.m_force.y+=a.y))},box2d.b2Body.prototype.ApplyTorque=function(a,b){b=b||!0,this.m_type===box2d.b2BodyType.b2_dynamicBody&&(b&&0===(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)&&this.SetAwake(!0),this.m_flags&box2d.b2BodyFlag.e_awakeFlag&&(this.m_torque+=a))},box2d.b2Body.prototype.ApplyLinearImpulse=function(a,b,c){c=c||!0,this.m_type===box2d.b2BodyType.b2_dynamicBody&&(c&&0===(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)&&this.SetAwake(!0),this.m_flags&box2d.b2BodyFlag.e_awakeFlag&&(this.m_linearVelocity.x+=this.m_invMass*a.x,this.m_linearVelocity.y+=this.m_invMass*a.y,this.m_angularVelocity+=this.m_invI*((b.x-this.m_sweep.c.x)*a.y-(b.y-this.m_sweep.c.y)*a.x)))},box2d.b2Body.prototype.ApplyAngularImpulse=function(a,b){b=b||!0,this.m_type===box2d.b2BodyType.b2_dynamicBody&&(b&&0===(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)&&this.SetAwake(!0),this.m_flags&box2d.b2BodyFlag.e_awakeFlag&&(this.m_angularVelocity+=this.m_invI*a))},box2d.b2Body.prototype.GetMass=function(){return this.m_mass},box2d.b2Body.prototype.GetInertia=function(){return this.m_I+this.m_mass*box2d.b2DotVV(this.m_sweep.localCenter,this.m_sweep.localCenter)},box2d.b2Body.prototype.GetMassData=function(a){return a.mass=this.m_mass,a.I=this.m_I+this.m_mass*box2d.b2DotVV(this.m_sweep.localCenter,this.m_sweep.localCenter),a.center.Copy(this.m_sweep.localCenter),a},box2d.b2Body.prototype.SetMassData=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_world.IsLocked()===!1),this.m_world.IsLocked()!==!0&&this.m_type===box2d.b2BodyType.b2_dynamicBody){this.m_invMass=0,this.m_I=0,this.m_invI=0,this.m_mass=a.mass,this.m_mass<=0&&(this.m_mass=1),this.m_invMass=1/this.m_mass,a.I>0&&0===(this.m_flags&box2d.b2BodyFlag.e_fixedRotationFlag)&&(this.m_I=a.I-this.m_mass*box2d.b2DotVV(a.center,a.center),box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_I>0),this.m_invI=1/this.m_I);var b=box2d.b2Body.prototype.SetMassData.s_oldCenter.Copy(this.m_sweep.c);this.m_sweep.localCenter.Copy(a.center),box2d.b2MulXV(this.m_xf,this.m_sweep.localCenter,this.m_sweep.c),this.m_sweep.c0.Copy(this.m_sweep.c),box2d.b2AddVCrossSV(this.m_linearVelocity,this.m_angularVelocity,box2d.b2SubVV(this.m_sweep.c,b,box2d.b2Vec2.s_t0),this.m_linearVelocity)}},box2d.b2Body.prototype.SetMassData.s_oldCenter=new box2d.b2Vec2,box2d.b2Body.prototype.ResetMassData=function(){if(this.m_mass=0,this.m_invMass=0,this.m_I=0,this.m_invI=0,this.m_sweep.localCenter.SetZero(),this.m_type===box2d.b2BodyType.b2_staticBody||this.m_type===box2d.b2BodyType.b2_kinematicBody)return this.m_sweep.c0.Copy(this.m_xf.p),this.m_sweep.c.Copy(this.m_xf.p),void(this.m_sweep.a0=this.m_sweep.a);box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_type===box2d.b2BodyType.b2_dynamicBody);for(var a=box2d.b2Body.prototype.ResetMassData.s_localCenter.SetZero(),b=this.m_fixtureList;b;b=b.m_next)if(0!==b.m_density){var c=b.GetMassData(box2d.b2Body.prototype.ResetMassData.s_massData);this.m_mass+=c.mass,a.x+=c.center.x*c.mass,a.y+=c.center.y*c.mass,this.m_I+=c.I}this.m_mass>0?(this.m_invMass=1/this.m_mass,a.x*=this.m_invMass,a.y*=this.m_invMass):(this.m_mass=1,this.m_invMass=1),this.m_I>0&&0===(this.m_flags&box2d.b2BodyFlag.e_fixedRotationFlag)?(this.m_I-=this.m_mass*box2d.b2DotVV(a,a),box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_I>0),this.m_invI=1/this.m_I):(this.m_I=0,this.m_invI=0);var d=box2d.b2Body.prototype.ResetMassData.s_oldCenter.Copy(this.m_sweep.c);this.m_sweep.localCenter.Copy(a),box2d.b2MulXV(this.m_xf,this.m_sweep.localCenter,this.m_sweep.c),this.m_sweep.c0.Copy(this.m_sweep.c),box2d.b2AddVCrossSV(this.m_linearVelocity,this.m_angularVelocity,box2d.b2SubVV(this.m_sweep.c,d,box2d.b2Vec2.s_t0),this.m_linearVelocity)},box2d.b2Body.prototype.ResetMassData.s_localCenter=new box2d.b2Vec2,box2d.b2Body.prototype.ResetMassData.s_oldCenter=new box2d.b2Vec2,box2d.b2Body.prototype.ResetMassData.s_massData=new box2d.b2MassData,box2d.b2Body.prototype.GetWorldPoint=function(a,b){return box2d.b2MulXV(this.m_xf,a,b)},box2d.b2Body.prototype.GetWorldVector=function(a,b){return box2d.b2MulRV(this.m_xf.q,a,b)},box2d.b2Body.prototype.GetLocalPoint=function(a,b){return box2d.b2MulTXV(this.m_xf,a,b)},box2d.b2Body.prototype.GetLocalVector=function(a,b){return box2d.b2MulTRV(this.m_xf.q,a,b)},box2d.b2Body.prototype.GetLinearVelocityFromWorldPoint=function(a,b){return box2d.b2AddVCrossSV(this.m_linearVelocity,this.m_angularVelocity,box2d.b2SubVV(a,this.m_sweep.c,box2d.b2Vec2.s_t0),b)},box2d.b2Body.prototype.GetLinearVelocityFromLocalPoint=function(a,b){return this.GetLinearVelocityFromWorldPoint(this.GetWorldPoint(a,b),b)},box2d.b2Body.prototype.GetLinearDamping=function(){return this.m_linearDamping},box2d.b2Body.prototype.SetLinearDamping=function(a){this.m_linearDamping=a},box2d.b2Body.prototype.GetAngularDamping=function(){return this.m_angularDamping},box2d.b2Body.prototype.SetAngularDamping=function(a){this.m_angularDamping=a},box2d.b2Body.prototype.GetGravityScale=function(){return this.m_gravityScale},box2d.b2Body.prototype.SetGravityScale=function(a){this.m_gravityScale=a},box2d.b2Body.prototype.SetType=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_world.IsLocked()===!1),this.m_world.IsLocked()!==!0&&this.m_type!==a){this.m_type=a,this.ResetMassData(),this.m_type===box2d.b2BodyType.b2_staticBody&&(this.m_linearVelocity.SetZero(),this.m_angularVelocity=0,this.m_sweep.a0=this.m_sweep.a,this.m_sweep.c0.Copy(this.m_sweep.c),this.SynchronizeFixtures()),this.SetAwake(!0),this.m_force.SetZero(),this.m_torque=0;for(var b=this.m_contactList;b;){var c=b;b=b.next,this.m_world.m_contactManager.Destroy(c.contact)}this.m_contactList=null;for(var d=this.m_world.m_contactManager.m_broadPhase,e=this.m_fixtureList;e;e=e.m_next)for(var f=e.m_proxyCount,g=0;f>g;++g)d.TouchProxy(e.m_proxies[g].proxy)}},box2d.b2Body.prototype.GetType=function(){return this.m_type},box2d.b2Body.prototype.SetBullet=function(a){a?this.m_flags|=box2d.b2BodyFlag.e_bulletFlag:this.m_flags&=~box2d.b2BodyFlag.e_bulletFlag},box2d.b2Body.prototype.IsBullet=function(){return(this.m_flags&box2d.b2BodyFlag.e_bulletFlag)===box2d.b2BodyFlag.e_bulletFlag},box2d.b2Body.prototype.SetSleepingAllowed=function(a){a?this.m_flags|=box2d.b2BodyFlag.e_autoSleepFlag:(this.m_flags&=~box2d.b2BodyFlag.e_autoSleepFlag,this.SetAwake(!0))},box2d.b2Body.prototype.IsSleepingAllowed=function(){return(this.m_flags&box2d.b2BodyFlag.e_autoSleepFlag)===box2d.b2BodyFlag.e_autoSleepFlag},box2d.b2Body.prototype.SetAwake=function(a){a?0===(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)&&(this.m_flags|=box2d.b2BodyFlag.e_awakeFlag,this.m_sleepTime=0):(this.m_flags&=~box2d.b2BodyFlag.e_awakeFlag,this.m_sleepTime=0,this.m_linearVelocity.SetZero(),this.m_angularVelocity=0,this.m_force.SetZero(),this.m_torque=0)},box2d.b2Body.prototype.IsAwake=function(){return(this.m_flags&box2d.b2BodyFlag.e_awakeFlag)===box2d.b2BodyFlag.e_awakeFlag},box2d.b2Body.prototype.SetActive=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_world.IsLocked()===!1),a!==this.IsActive())if(a){this.m_flags|=box2d.b2BodyFlag.e_activeFlag;for(var b=this.m_world.m_contactManager.m_broadPhase,c=this.m_fixtureList;c;c=c.m_next)c.CreateProxies(b,this.m_xf)}else{this.m_flags&=~box2d.b2BodyFlag.e_activeFlag;for(var b=this.m_world.m_contactManager.m_broadPhase,c=this.m_fixtureList;c;c=c.m_next)c.DestroyProxies(b);for(var d=this.m_contactList;d;){var e=d;d=d.next,this.m_world.m_contactManager.Destroy(e.contact)}this.m_contactList=null}},box2d.b2Body.prototype.IsActive=function(){return(this.m_flags&box2d.b2BodyFlag.e_activeFlag)===box2d.b2BodyFlag.e_activeFlag},box2d.b2Body.prototype.SetFixedRotation=function(a){var b=(this.m_flags&box2d.b2BodyFlag.e_fixedRotationFlag)===box2d.b2BodyFlag.e_fixedRotationFlag;b!==a&&(a?this.m_flags|=box2d.b2BodyFlag.e_fixedRotationFlag:this.m_flags&=~box2d.b2BodyFlag.e_fixedRotationFlag,this.m_angularVelocity=0,this.ResetMassData())},box2d.b2Body.prototype.IsFixedRotation=function(){return(this.m_flags&box2d.b2BodyFlag.e_fixedRotationFlag)===box2d.b2BodyFlag.e_fixedRotationFlag},box2d.b2Body.prototype.GetFixtureList=function(){return this.m_fixtureList},box2d.b2Body.prototype.GetJointList=function(){return this.m_jointList},box2d.b2Body.prototype.GetContactList=function(){return this.m_contactList},box2d.b2Body.prototype.GetNext=function(){return this.m_next},box2d.b2Body.prototype.GetUserData=function(){return this.m_userData},box2d.b2Body.prototype.SetUserData=function(a){this.m_userData=a},box2d.b2Body.prototype.GetWorld=function(){return this.m_world},box2d.b2Body.prototype.SynchronizeFixtures=function(){var a=box2d.b2Body.prototype.SynchronizeFixtures.s_xf1;a.q.SetAngleRadians(this.m_sweep.a0),box2d.b2MulRV(a.q,this.m_sweep.localCenter,a.p),box2d.b2SubVV(this.m_sweep.c0,a.p,a.p);for(var b=this.m_world.m_contactManager.m_broadPhase,c=this.m_fixtureList;c;c=c.m_next)c.Synchronize(b,a,this.m_xf)},box2d.b2Body.prototype.SynchronizeFixtures.s_xf1=new box2d.b2Transform,box2d.b2Body.prototype.SynchronizeTransform=function(){this.m_xf.q.SetAngleRadians(this.m_sweep.a),box2d.b2MulRV(this.m_xf.q,this.m_sweep.localCenter,this.m_xf.p),box2d.b2SubVV(this.m_sweep.c,this.m_xf.p,this.m_xf.p)},box2d.b2Body.prototype.ShouldCollide=function(a){if(this.m_type!==box2d.b2BodyType.b2_dynamicBody&&a.m_type!==box2d.b2BodyType.b2_dynamicBody)return!1;for(var b=this.m_jointList;b;b=b.next)if(b.other===a&&b.joint.m_collideConnected===!1)return!1;return!0},box2d.b2Body.prototype.Advance=function(a){this.m_sweep.Advance(a),this.m_sweep.c.Copy(this.m_sweep.c0),this.m_sweep.a=this.m_sweep.a0,this.m_xf.q.SetAngleRadians(this.m_sweep.a),box2d.b2MulRV(this.m_xf.q,this.m_sweep.localCenter,this.m_xf.p),box2d.b2SubVV(this.m_sweep.c,this.m_xf.p,this.m_xf.p)},box2d.b2Body.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_islandIndex;box2d.b2Log("if (true)\n"),box2d.b2Log("{\n"),box2d.b2Log(" /*box2d.b2BodyDef*/ var bd = new box2d.b2BodyDef();\n");var b="";switch(this.m_type){case box2d.b2BodyType.b2_staticBody:b="box2d.b2BodyType.b2_staticBody";break;case box2d.b2BodyType.b2_kinematicBody:b="box2d.b2BodyType.b2_kinematicBody";break;case box2d.b2BodyType.b2_dynamicBody:b="box2d.b2BodyType.b2_dynamicBody";break;default:box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1)}box2d.b2Log(" bd.type = %s;\n",b),box2d.b2Log(" bd.position.SetXY(%.15f, %.15f);\n",this.m_xf.p.x,this.m_xf.p.y),box2d.b2Log(" bd.angle = %.15f;\n",this.m_sweep.a),box2d.b2Log(" bd.linearVelocity.SetXY(%.15f, %.15f);\n",this.m_linearVelocity.x,this.m_linearVelocity.y),box2d.b2Log(" bd.angularVelocity = %.15f;\n",this.m_angularVelocity),box2d.b2Log(" bd.linearDamping = %.15f;\n",this.m_linearDamping),box2d.b2Log(" bd.angularDamping = %.15f;\n",this.m_angularDamping),box2d.b2Log(" bd.allowSleep = %s;\n",this.m_flags&box2d.b2BodyFlag.e_autoSleepFlag?"true":"false"),box2d.b2Log(" bd.awake = %s;\n",this.m_flags&box2d.b2BodyFlag.e_awakeFlag?"true":"false"),box2d.b2Log(" bd.fixedRotation = %s;\n",this.m_flags&box2d.b2BodyFlag.e_fixedRotationFlag?"true":"false"),box2d.b2Log(" bd.bullet = %s;\n",this.m_flags&box2d.b2BodyFlag.e_bulletFlag?"true":"false"),box2d.b2Log(" bd.active = %s;\n",this.m_flags&box2d.b2BodyFlag.e_activeFlag?"true":"false"),box2d.b2Log(" bd.gravityScale = %.15f;\n",this.m_gravityScale),box2d.b2Log("\n"),box2d.b2Log(" bodies[%d] = this.m_world.CreateBody(bd);\n",this.m_islandIndex),box2d.b2Log("\n");for(var c=this.m_fixtureList;c;c=c.m_next)box2d.b2Log(" if (true)\n"),box2d.b2Log(" {\n"),c.Dump(a),box2d.b2Log(" }\n");box2d.b2Log("}\n")}},box2d.b2Body.prototype.GetControllerList=function(){return this.m_controllerList},box2d.b2Body.prototype.GetControllerCount=function(){return this.m_controllerCount},goog.provide("box2d.b2World"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Draw"),goog.require("box2d.b2ContactManager"),goog.require("box2d.b2ContactSolver"),goog.require("box2d.b2Island"),goog.require("box2d.b2Body"),goog.require("box2d.b2Math"),goog.require("box2d.b2Collision"),goog.require("box2d.b2TimeStep"),goog.require("box2d.b2WorldCallbacks"),goog.require("box2d.b2JointFactory"),box2d.b2WorldFlag={e_none:0,e_newFixture:1,e_locked:2,e_clearForces:4},goog.exportProperty(box2d.b2WorldFlag,"e_none",box2d.b2WorldFlag.e_none),goog.exportProperty(box2d.b2WorldFlag,"e_newFixture",box2d.b2WorldFlag.e_newFixture),goog.exportProperty(box2d.b2WorldFlag,"e_locked",box2d.b2WorldFlag.e_locked),goog.exportProperty(box2d.b2WorldFlag,"e_clearForces",box2d.b2WorldFlag.e_clearForces),box2d.b2World=function(a){this.m_flags=box2d.b2WorldFlag.e_clearForces,this.m_contactManager=new box2d.b2ContactManager,this.m_gravity=a.Clone(),this.m_out_gravity=new box2d.b2Vec2,this.m_allowSleep=!0,this.m_destructionListener=null,this.m_debugDraw=null,this.m_warmStarting=!0,this.m_continuousPhysics=!0,this.m_subStepping=!1,this.m_stepComplete=!0,this.m_profile=new box2d.b2Profile,this.m_island=new box2d.b2Island,this.s_stack=new Array},box2d.b2World.prototype.m_flags=box2d.b2WorldFlag.e_none,box2d.b2World.prototype.m_contactManager=null,box2d.b2World.prototype.m_bodyList=null,box2d.b2World.prototype.m_jointList=null,box2d.b2World.prototype.m_bodyCount=0,box2d.b2World.prototype.m_jointCount=0,box2d.b2World.prototype.m_gravity=null,box2d.b2World.prototype.m_out_gravity=null,box2d.b2World.prototype.m_allowSleep=!0,box2d.b2World.prototype.m_destructionListener=null,box2d.b2World.prototype.m_debugDraw=null,box2d.b2World.prototype.m_inv_dt0=0,box2d.b2World.prototype.m_warmStarting=!0,box2d.b2World.prototype.m_continuousPhysics=!0,box2d.b2World.prototype.m_subStepping=!1,box2d.b2World.prototype.m_stepComplete=!0,box2d.b2World.prototype.m_profile=null,box2d.b2World.prototype.m_island=null,box2d.b2World.prototype.s_stack=null,box2d.b2World.prototype.m_controllerList=null,box2d.b2World.prototype.m_controllerCount=0,box2d.b2World.prototype.SetAllowSleeping=function(a){if(a!==this.m_allowSleep&&(this.m_allowSleep=a,this.m_allowSleep===!1))for(var b=this.m_bodyList;b;b=b.m_next)b.SetAwake(!0)},box2d.b2World.prototype.GetAllowSleeping=function(){return this.m_allowSleep},box2d.b2World.prototype.SetWarmStarting=function(a){this.m_warmStarting=a},box2d.b2World.prototype.GetWarmStarting=function(){return this.m_warmStarting},box2d.b2World.prototype.SetContinuousPhysics=function(a){this.m_continuousPhysics=a},box2d.b2World.prototype.GetContinuousPhysics=function(){return this.m_continuousPhysics},box2d.b2World.prototype.SetSubStepping=function(a){this.m_subStepping=a},box2d.b2World.prototype.GetSubStepping=function(){return this.m_subStepping},box2d.b2World.prototype.GetBodyList=function(){return this.m_bodyList},box2d.b2World.prototype.GetJointList=function(){return this.m_jointList},box2d.b2World.prototype.GetContactList=function(){return this.m_contactManager.m_contactList},box2d.b2World.prototype.GetBodyCount=function(){return this.m_bodyCount},box2d.b2World.prototype.GetJointCount=function(){return this.m_jointCount},box2d.b2World.prototype.GetContactCount=function(){return this.m_contactManager.m_contactCount},box2d.b2World.prototype.SetGravity=function(a,b){if(b=b||!0,(this.m_gravity.x!==a.x||this.m_gravity.y!==a.y)&&(this.m_gravity.Copy(a),b))for(var c=this.m_bodyList;c;c=c.m_next)c.SetAwake(!0)},box2d.b2World.prototype.GetGravity=function(a){return a=a||this.m_out_gravity,a.Copy(this.m_gravity)},box2d.b2World.prototype.IsLocked=function(){return(this.m_flags&box2d.b2WorldFlag.e_locked)>0},box2d.b2World.prototype.SetAutoClearForces=function(a){a?this.m_flags|=box2d.b2WorldFlag.e_clearForces:this.m_flags&=~box2d.b2WorldFlag.e_clearForces},box2d.b2World.prototype.GetAutoClearForces=function(){return(this.m_flags&box2d.b2WorldFlag.e_clearForces)===box2d.b2WorldFlag.e_clearForces},box2d.b2World.prototype.GetContactManager=function(){return this.m_contactManager},box2d.b2World.prototype.GetProfile=function(){return this.m_profile},box2d.b2World.prototype.SetDestructionListener=function(a){this.m_destructionListener=a},box2d.b2World.prototype.SetContactFilter=function(a){this.m_contactManager.m_contactFilter=a},box2d.b2World.prototype.SetContactListener=function(a){this.m_contactManager.m_contactListener=a},box2d.b2World.prototype.SetDebugDraw=function(a){this.m_debugDraw=a},box2d.b2World.prototype.CreateBody=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.IsLocked()===!1),this.IsLocked())return null;var b=new box2d.b2Body(a,this);return b.m_prev=null,b.m_next=this.m_bodyList,this.m_bodyList&&(this.m_bodyList.m_prev=b),this.m_bodyList=b,++this.m_bodyCount,b},box2d.b2World.prototype.DestroyBody=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_bodyCount>0),box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.IsLocked()===!1),!this.IsLocked()){for(var b=a.m_jointList;b;){var c=b;b=b.next,this.m_destructionListener&&this.m_destructionListener.SayGoodbyeJoint(c.joint),this.DestroyJoint(c.joint),a.m_jointList=b}a.m_jointList=null;for(var d=a.m_controllerList;d;){var e=d;d=d.nextController,e.controller.RemoveBody(a)}for(var f=a.m_contactList;f;){var g=f;f=f.next,this.m_contactManager.Destroy(g.contact)}a.m_contactList=null;for(var h=a.m_fixtureList;h;){var i=h;h=h.m_next,this.m_destructionListener&&this.m_destructionListener.SayGoodbyeFixture(i),i.DestroyProxies(this.m_contactManager.m_broadPhase),i.Destroy(),a.m_fixtureList=h,a.m_fixtureCount-=1}a.m_fixtureList=null,a.m_fixtureCount=0,a.m_prev&&(a.m_prev.m_next=a.m_next),a.m_next&&(a.m_next.m_prev=a.m_prev),a===this.m_bodyList&&(this.m_bodyList=a.m_next),--this.m_bodyCount}},box2d.b2World.prototype.CreateJoint=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.IsLocked()===!1),this.IsLocked())return null;var b=box2d.b2JointFactory.Create(a,null);b.m_prev=null,b.m_next=this.m_jointList,this.m_jointList&&(this.m_jointList.m_prev=b),this.m_jointList=b,++this.m_jointCount,b.m_edgeA.joint=b,b.m_edgeA.other=b.m_bodyB,b.m_edgeA.prev=null,b.m_edgeA.next=b.m_bodyA.m_jointList,b.m_bodyA.m_jointList&&(b.m_bodyA.m_jointList.prev=b.m_edgeA),b.m_bodyA.m_jointList=b.m_edgeA,b.m_edgeB.joint=b,b.m_edgeB.other=b.m_bodyA,b.m_edgeB.prev=null,b.m_edgeB.next=b.m_bodyB.m_jointList,b.m_bodyB.m_jointList&&(b.m_bodyB.m_jointList.prev=b.m_edgeB),b.m_bodyB.m_jointList=b.m_edgeB;var c=a.bodyA,d=a.bodyB;if(a.collideConnected===!1)for(var e=d.GetContactList();e;)e.other===c&&e.contact.FlagForFiltering(),e=e.next;return b},box2d.b2World.prototype.DestroyJoint=function(a){if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.IsLocked()===!1),!this.IsLocked()){var b=a.m_collideConnected;a.m_prev&&(a.m_prev.m_next=a.m_next),a.m_next&&(a.m_next.m_prev=a.m_prev),a===this.m_jointList&&(this.m_jointList=a.m_next);var c=a.m_bodyA,d=a.m_bodyB;if(c.SetAwake(!0),d.SetAwake(!0),a.m_edgeA.prev&&(a.m_edgeA.prev.next=a.m_edgeA.next),a.m_edgeA.next&&(a.m_edgeA.next.prev=a.m_edgeA.prev),a.m_edgeA===c.m_jointList&&(c.m_jointList=a.m_edgeA.next),a.m_edgeA.prev=null,a.m_edgeA.next=null,a.m_edgeB.prev&&(a.m_edgeB.prev.next=a.m_edgeB.next),a.m_edgeB.next&&(a.m_edgeB.next.prev=a.m_edgeB.prev),a.m_edgeB===d.m_jointList&&(d.m_jointList=a.m_edgeB.next),a.m_edgeB.prev=null,a.m_edgeB.next=null,box2d.b2JointFactory.Destroy(a,null),box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.m_jointCount>0),--this.m_jointCount,b===!1)for(var e=d.GetContactList();e;)e.other===c&&e.contact.FlagForFiltering(),e=e.next}},box2d.b2World.prototype.Solve=function(a){for(var b=this.m_controllerList;b;b=b.m_next)b.Step(a);this.m_profile.solveInit=0,this.m_profile.solveVelocity=0,this.m_profile.solvePosition=0;var c=this.m_island;c.Initialize(this.m_bodyCount,this.m_contactManager.m_contactCount,this.m_jointCount,null,this.m_contactManager.m_contactListener);for(var d=this.m_bodyList;d;d=d.m_next)d.m_flags&=~box2d.b2BodyFlag.e_islandFlag;for(var e=this.m_contactManager.m_contactList;e;e=e.m_next)e.m_flags&=~box2d.b2ContactFlag.e_islandFlag;for(var f=this.m_jointList;f;f=f.m_next)f.m_islandFlag=!1;for(var g=this.m_bodyCount,h=this.s_stack,i=this.m_bodyList;i;i=i.m_next)if(!(i.m_flags&box2d.b2BodyFlag.e_islandFlag)&&i.IsAwake()!==!1&&i.IsActive()!==!1&&i.GetType()!==box2d.b2BodyType.b2_staticBody){c.Clear();var j=0;for(h[j++]=i,i.m_flags|=box2d.b2BodyFlag.e_islandFlag;j>0;){var d=h[--j];if(box2d.ENABLE_ASSERTS&&box2d.b2Assert(d.IsActive()===!0),c.AddBody(d),d.SetAwake(!0),d.GetType()!==box2d.b2BodyType.b2_staticBody){for(var k=d.m_contactList;k;k=k.next){var l=k.contact;if(!(l.m_flags&box2d.b2ContactFlag.e_islandFlag)&&l.IsEnabled()!==!1&&l.IsTouching()!==!1){var m=l.m_fixtureA.m_isSensor,n=l.m_fixtureB.m_isSensor; +if(!m&&!n){c.AddContact(l),l.m_flags|=box2d.b2ContactFlag.e_islandFlag;var o=k.other;o.m_flags&box2d.b2BodyFlag.e_islandFlag||(box2d.ENABLE_ASSERTS&&box2d.b2Assert(g>j),h[j++]=o,o.m_flags|=box2d.b2BodyFlag.e_islandFlag)}}}for(var p=d.m_jointList;p;p=p.next)if(p.joint.m_islandFlag!==!0){var o=p.other;o.IsActive()!==!1&&(c.AddJoint(p.joint),p.joint.m_islandFlag=!0,o.m_flags&box2d.b2BodyFlag.e_islandFlag||(box2d.ENABLE_ASSERTS&&box2d.b2Assert(g>j),h[j++]=o,o.m_flags|=box2d.b2BodyFlag.e_islandFlag))}}}var q=new box2d.b2Profile;c.Solve(q,a,this.m_gravity,this.m_allowSleep),this.m_profile.solveInit+=q.solveInit,this.m_profile.solveVelocity+=q.solveVelocity,this.m_profile.solvePosition+=q.solvePosition;for(var r=0;rbox2d.b2_maxSubSteps)){var g=1;if(d.m_flags&box2d.b2ContactFlag.e_toiFlag)g=d.m_toi;else{var h=d.GetFixtureA(),i=d.GetFixtureB();if(h.IsSensor()||i.IsSensor())continue;var j=h.GetBody(),k=i.GetBody(),l=j.m_type,m=k.m_type;box2d.ENABLE_ASSERTS&&box2d.b2Assert(l===box2d.b2BodyType.b2_dynamicBody||m===box2d.b2BodyType.b2_dynamicBody);var n=j.IsAwake()&&l!==box2d.b2BodyType.b2_staticBody,o=k.IsAwake()&&m!==box2d.b2BodyType.b2_staticBody;if(n===!1&&o===!1)continue;var p=j.IsBullet()||l!==box2d.b2BodyType.b2_dynamicBody,q=k.IsBullet()||m!==box2d.b2BodyType.b2_dynamicBody;if(p===!1&&q===!1)continue;var r=j.m_sweep.alpha0;j.m_sweep.alpha0r);var s=d.GetChildIndexA(),t=d.GetChildIndexB(),u=box2d.b2World.prototype.SolveTOI.s_toi_input;u.proxyA.SetShape(h.GetShape(),s),u.proxyB.SetShape(i.GetShape(),t),u.sweepA.Copy(j.m_sweep),u.sweepB.Copy(k.m_sweep),u.tMax=1;var v=box2d.b2World.prototype.SolveTOI.s_toi_output;box2d.b2TimeOfImpact(v,u);var w=v.t;g=v.state===box2d.b2TOIOutputState.e_touching?box2d.b2Min(r+(1-r)*w,1):1,d.m_toi=g,d.m_flags|=box2d.b2ContactFlag.e_toiFlag}f>g&&(e=d,f=g)}if(null===e||1-10*box2d.b2_epsilonz;++z){var A=0===z?j:k;if(A.m_type===box2d.b2BodyType.b2_dynamicBody)for(var B=A.m_contactList;B&&b.m_bodyCount!==b.m_bodyCapacity&&b.m_contactCount!==b.m_contactCapacity;B=B.next){var C=B.contact;if(!(C.m_flags&box2d.b2ContactFlag.e_islandFlag)){var D=B.other;if(D.m_type!==box2d.b2BodyType.b2_dynamicBody||A.IsBullet()!==!1||D.IsBullet()!==!1){var E=C.m_fixtureA.m_isSensor,F=C.m_fixtureB.m_isSensor;if(!E&&!F){var G=box2d.b2World.prototype.SolveTOI.s_backup.Copy(D.m_sweep);0===(D.m_flags&box2d.b2BodyFlag.e_islandFlag)&&D.Advance(f),C.Update(this.m_contactManager.m_contactListener),C.IsEnabled()!==!1&&C.IsTouching()!==!1?(C.m_flags|=box2d.b2ContactFlag.e_islandFlag,b.AddContact(C),D.m_flags&box2d.b2BodyFlag.e_islandFlag||(D.m_flags|=box2d.b2BodyFlag.e_islandFlag,D.m_type!==box2d.b2BodyType.b2_staticBody&&D.SetAwake(!0),b.AddBody(D))):(D.m_sweep.Copy(G),D.SynchronizeTransform())}}}}}var H=box2d.b2World.prototype.SolveTOI.s_subStep;H.dt=(1-f)*a.dt,H.inv_dt=1/H.dt,H.dtRatio=1,H.positionIterations=20,H.velocityIterations=a.velocityIterations,H.warmStarting=!1,b.SolveTOI(H,j.m_islandIndex,k.m_islandIndex);for(var z=0;z0?1/a:0,e.dtRatio=this.m_inv_dt0*a,e.warmStarting=this.m_warmStarting;var f=new box2d.b2Timer;if(this.m_contactManager.Collide(),this.m_profile.collide=f.GetMilliseconds(),this.m_stepComplete&&e.dt>0){var f=new box2d.b2Timer;this.Solve(e),this.m_profile.solve=f.GetMilliseconds()}if(this.m_continuousPhysics&&e.dt>0){var f=new box2d.b2Timer;this.SolveTOI(e),this.m_profile.solveTOI=f.GetMilliseconds()}e.dt>0&&(this.m_inv_dt0=e.inv_dt),this.m_flags&box2d.b2WorldFlag.e_clearForces&&this.ClearForces(),this.m_flags&=~box2d.b2WorldFlag.e_locked,this.m_profile.step=d.GetMilliseconds()},box2d.b2World.prototype.Step.s_step=new box2d.b2TimeStep,box2d.b2World.prototype.ClearForces=function(){for(var a=this.m_bodyList;a;a=a.m_next)a.m_force.SetZero(),a.m_torque=0},box2d.b2World.prototype.QueryAABB=function(a,b){var c=this.m_contactManager.m_broadPhase,d=function(b){var d=c.GetUserData(b);box2d.ENABLE_ASSERTS&&box2d.b2Assert(d instanceof box2d.b2FixtureProxy);{var e=d.fixture;d.childIndex}return a instanceof box2d.b2QueryCallback?a.ReportFixture(e):a(e)};c.Query(d,b)},box2d.b2World.prototype.QueryShape=function(a,b,c){var d=this.m_contactManager.m_broadPhase,e=function(e){var f=d.GetUserData(e);box2d.ENABLE_ASSERTS&&box2d.b2Assert(f instanceof box2d.b2FixtureProxy);{var g=f.fixture;f.childIndex}return box2d.b2TestOverlapShape(b,0,g.GetShape(),0,c,g.GetBody().GetTransform())?a instanceof box2d.b2QueryCallback?a.ReportFixture(g):a(g):!0},f=box2d.b2World.prototype.QueryShape.s_aabb;b.ComputeAABB(f,c,0),d.Query(e,f)},box2d.b2World.prototype.QueryShape.s_aabb=new box2d.b2AABB,box2d.b2World.prototype.QueryPoint=function(a,b){var c=this.m_contactManager.m_broadPhase,d=function(d){var e=c.GetUserData(d);box2d.ENABLE_ASSERTS&&box2d.b2Assert(e instanceof box2d.b2FixtureProxy);{var f=e.fixture;e.childIndex}return f.TestPoint(b)?a instanceof box2d.b2QueryCallback?a.ReportFixture(f):a(f):!0},e=box2d.b2World.prototype.QueryPoint.s_aabb;e.lowerBound.SetXY(b.x-box2d.b2_linearSlop,b.y-box2d.b2_linearSlop),e.upperBound.SetXY(b.x+box2d.b2_linearSlop,b.y+box2d.b2_linearSlop),c.Query(d,e)},box2d.b2World.prototype.QueryPoint.s_aabb=new box2d.b2AABB,box2d.b2World.prototype.RayCast=function(a,b,c){var d=this.m_contactManager.m_broadPhase,e=function(e,f){var g=d.GetUserData(f);box2d.ENABLE_ASSERTS&&box2d.b2Assert(g instanceof box2d.b2FixtureProxy);var h=g.fixture,i=g.childIndex,j=box2d.b2World.prototype.RayCast.s_output,k=h.RayCast(j,e,i);if(k){var l=j.fraction,m=box2d.b2World.prototype.RayCast.s_point;return m.SetXY((1-l)*b.x+l*c.x,(1-l)*b.y+l*c.y),a instanceof box2d.b2RayCastCallback?a.ReportFixture(h,m,j.normal,l):a(h,m,j.normal,l)}return e.maxFraction},f=box2d.b2World.prototype.RayCast.s_input;f.maxFraction=1,f.p1.Copy(b),f.p2.Copy(c),d.RayCast(e,f)},box2d.b2World.prototype.RayCast.s_input=new box2d.b2RayCastInput,box2d.b2World.prototype.RayCast.s_output=new box2d.b2RayCastOutput,box2d.b2World.prototype.RayCast.s_point=new box2d.b2Vec2,box2d.b2World.prototype.RayCastOne=function(a,b){function c(a,b,c,f){return e>f&&(e=f,d=a),e}var d=null,e=1;return this.RayCast(c,a,b),d},box2d.b2World.prototype.RayCastAll=function(a,b,c){function d(a){return c.push(a),1}return c.length=0,this.RayCast(d,a,b),c},box2d.b2World.prototype.DrawShape=function(a,b){var c=a.GetShape();switch(c.m_type){case box2d.b2ShapeType.e_circleShape:var d=c instanceof box2d.b2CircleShape?c:null,e=d.m_p,f=d.m_radius,g=box2d.b2Vec2.UNITX;this.m_debugDraw.DrawSolidCircle(e,f,g,b);break;case box2d.b2ShapeType.e_edgeShape:var h=c instanceof box2d.b2EdgeShape?c:null,i=h.m_vertex1,j=h.m_vertex2;this.m_debugDraw.DrawSegment(i,j,b);break;case box2d.b2ShapeType.e_chainShape:for(var k=c instanceof box2d.b2ChainShape?c:null,l=k.m_count,m=k.m_vertices,i=m[0],n=0;l>n;++n){var j=m[n];this.m_debugDraw.DrawSegment(i,j,b),this.m_debugDraw.DrawCircle(j,.05,b),i=j}break;case box2d.b2ShapeType.e_polygonShape:var o=c instanceof box2d.b2PolygonShape?c:null,p=o.m_count,m=o.m_vertices;this.m_debugDraw.DrawSolidPolygon(m,p,b)}},box2d.b2World.prototype.DrawJoint=function(a){var b=a.GetBodyA(),c=a.GetBodyB(),d=b.m_xf,e=c.m_xf,f=d.p,g=e.p,h=a.GetAnchorA(box2d.b2World.prototype.DrawJoint.s_p1),i=a.GetAnchorB(box2d.b2World.prototype.DrawJoint.s_p2),j=box2d.b2World.prototype.DrawJoint.s_color.SetRGB(.5,.8,.8);switch(a.m_type){case box2d.b2JointType.e_distanceJoint:this.m_debugDraw.DrawSegment(h,i,j);break;case box2d.b2JointType.e_pulleyJoint:var k=a instanceof box2d.b2PulleyJoint?a:null,l=k.GetGroundAnchorA(box2d.b2World.prototype.DrawJoint.s_s1),m=k.GetGroundAnchorB(box2d.b2World.prototype.DrawJoint.s_s2);this.m_debugDraw.DrawSegment(l,h,j),this.m_debugDraw.DrawSegment(m,i,j),this.m_debugDraw.DrawSegment(l,m,j);break;case box2d.b2JointType.e_mouseJoint:this.m_debugDraw.DrawSegment(h,i,j);break;default:this.m_debugDraw.DrawSegment(f,h,j),this.m_debugDraw.DrawSegment(h,i,j),this.m_debugDraw.DrawSegment(g,i,j)}},box2d.b2World.prototype.DrawJoint.s_p1=new box2d.b2Vec2,box2d.b2World.prototype.DrawJoint.s_p2=new box2d.b2Vec2,box2d.b2World.prototype.DrawJoint.s_color=new box2d.b2Color(.5,.8,.8),box2d.b2World.prototype.DrawJoint.s_s1=new box2d.b2Vec2,box2d.b2World.prototype.DrawJoint.s_s2=new box2d.b2Vec2,box2d.b2World.prototype.DrawDebugData=function(){if(null!==this.m_debugDraw){var a=this.m_debugDraw.GetFlags(),b=box2d.b2World.prototype.DrawDebugData.s_color.SetRGB(0,0,0);if(a&box2d.b2DrawFlags.e_shapeBit)for(var c=this.m_bodyList;c;c=c.m_next){var d=c.m_xf;this.m_debugDraw.PushTransform(d);for(var e=c.GetFixtureList();e;e=e.m_next)c.IsActive()===!1?(b.SetRGB(.5,.5,.3),this.DrawShape(e,b)):c.GetType()===box2d.b2BodyType.b2_staticBody?(b.SetRGB(.5,.9,.5),this.DrawShape(e,b)):c.GetType()===box2d.b2BodyType.b2_kinematicBody?(b.SetRGB(.5,.5,.9),this.DrawShape(e,b)):c.IsAwake()===!1?(b.SetRGB(.6,.6,.6),this.DrawShape(e,b)):(b.SetRGB(.9,.7,.7),this.DrawShape(e,b));this.m_debugDraw.PopTransform(d)}if(a&box2d.b2DrawFlags.e_jointBit)for(var f=this.m_jointList;f;f=f.m_next)this.DrawJoint(f);if(a&box2d.b2DrawFlags.e_aabbBit){b.SetRGB(.9,.3,.9);for(var g=this.m_contactManager.m_broadPhase,h=box2d.b2World.prototype.DrawDebugData.s_vs,c=this.m_bodyList;c;c=c.m_next)if(c.IsActive()!==!1)for(var e=c.GetFixtureList();e;e=e.m_next)for(var i=0;i} */ var bodies = new Array(%d);\n",this.m_bodyCount),box2d.b2Log("/** @type {Array.} */ var joints = new Array(%d);\n",this.m_jointCount);for(var a=0,b=this.m_bodyList;b;b=b.m_next)b.m_islandIndex=a,b.Dump(),++a;a=0;for(var c=this.m_jointList;c;c=c.m_next)c.m_index=a,++a;for(var c=this.m_jointList;c;c=c.m_next)c.m_type!==box2d.b2JointType.e_gearJoint&&(box2d.b2Log("if (true)\n"),box2d.b2Log("{\n"),c.Dump(),box2d.b2Log("}\n"));for(var c=this.m_jointList;c;c=c.m_next)c.m_type===box2d.b2JointType.e_gearJoint&&(box2d.b2Log("if (true)\n"),box2d.b2Log("{\n"),c.Dump(),box2d.b2Log("}\n"))}},box2d.b2World.prototype.AddController=function(a){return box2d.ENABLE_ASSERTS&&box2d.b2Assert(null===a.m_world,"Controller can only be a member of one world"),a.m_world=this,a.m_next=this.m_controllerList,a.m_prev=null,this.m_controllerList&&(this.m_controllerList.m_prev=a),this.m_controllerList=a,++this.m_controllerCount,a},box2d.b2World.prototype.RemoveController=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.m_world===this,"Controller is not a member of this world"),a.m_prev&&(a.m_prev.m_next=a.m_next),a.m_next&&(a.m_next.m_prev=a.m_prev),this.m_controllerList===a&&(this.m_controllerList=a.m_next),--this.m_controllerCount,a.m_prev=null,a.m_next=null,a.m_world=null},goog.provide("box2d.b2AreaJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2AreaJointDef=function(){goog.base(this,box2d.b2JointType.e_areaJoint),this.bodies=new Array},goog.inherits(box2d.b2AreaJointDef,box2d.b2JointDef),box2d.b2AreaJointDef.prototype.world=null,box2d.b2AreaJointDef.prototype.bodies=null,box2d.b2AreaJointDef.prototype.frequencyHz=0,box2d.b2AreaJointDef.prototype.dampingRatio=0,box2d.b2AreaJointDef.prototype.AddBody=function(a){this.bodies.push(a),1===this.bodies.length?this.bodyA=a:2===this.bodies.length&&(this.bodyB=a)},box2d.b2AreaJoint=function(a){goog.base(this,a),box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.bodies.length>=3,"You cannot create an area joint with less than three bodies."),this.m_bodies=a.bodies,this.m_frequencyHz=a.frequencyHz,this.m_dampingRatio=a.dampingRatio,this.m_targetLengths=box2d.b2MakeNumberArray(a.bodies.length),this.m_normals=box2d.b2Vec2.MakeArray(a.bodies.length),this.m_joints=new Array(a.bodies.length),this.m_deltas=box2d.b2Vec2.MakeArray(a.bodies.length),this.m_delta=new box2d.b2Vec2;var b=new box2d.b2DistanceJointDef;b.frequencyHz=a.frequencyHz,b.dampingRatio=a.dampingRatio,this.m_targetArea=0;for(var c=0,d=this.m_bodies.length;d>c;++c){var e=this.m_bodies[c],f=this.m_bodies[(c+1)%d],g=e.GetWorldCenter(),h=f.GetWorldCenter();this.m_targetLengths[c]=box2d.b2DistanceVV(g,h),this.m_targetArea+=box2d.b2CrossVV(g,h),b.Initialize(e,f,g,h),this.m_joints[c]=a.world.CreateJoint(b)}this.m_targetArea*=.5},goog.inherits(box2d.b2AreaJoint,box2d.b2Joint),box2d.b2AreaJoint.prototype.m_bodies=null,box2d.b2AreaJoint.prototype.m_frequencyHz=0,box2d.b2AreaJoint.prototype.m_dampingRatio=0,box2d.b2AreaJoint.prototype.m_impulse=0,box2d.b2AreaJoint.prototype.m_targetLengths=null,box2d.b2AreaJoint.prototype.m_targetArea=0,box2d.b2AreaJoint.prototype.m_normals=null,box2d.b2AreaJoint.prototype.m_joints=null,box2d.b2AreaJoint.prototype.m_deltas=null,box2d.b2AreaJoint.prototype.m_delta=null,box2d.b2AreaJoint.prototype.GetAnchorA=function(a){return a.SetZero()},box2d.b2AreaJoint.prototype.GetAnchorB=function(a){return a.SetZero()},box2d.b2AreaJoint.prototype.GetReactionForce=function(a,b){return b.SetZero()},box2d.b2AreaJoint.prototype.GetReactionTorque=function(){return 0},box2d.b2AreaJoint.prototype.SetFrequency=function(a){this.m_frequencyHz=a;for(var b=0,c=this.m_joints.length;c>b;++b)this.m_joints[b].SetFrequency(a)},box2d.b2AreaJoint.prototype.GetFrequency=function(){return this.m_frequencyHz},box2d.b2AreaJoint.prototype.SetDampingRatio=function(a){this.m_dampingRatio=a;for(var b=0,c=this.m_joints.length;c>b;++b)this.m_joints[b].SetDampingRatio(a)},box2d.b2AreaJoint.prototype.GetDampingRatio=function(){return this.m_dampingRatio},box2d.b2AreaJoint.prototype.Dump=function(){box2d.DEBUG&&box2d.b2Log("Area joint dumping is not supported.\n")},box2d.b2AreaJoint.prototype.InitVelocityConstraints=function(a){for(var b=0,c=this.m_bodies.length;c>b;++b){var d=this.m_bodies[(b+c-1)%c],e=this.m_bodies[(b+1)%c],f=a.positions[d.m_islandIndex].c,g=a.positions[e.m_islandIndex].c,h=this.m_deltas[b];box2d.b2SubVV(g,f,h)}if(a.step.warmStarting){this.m_impulse*=a.step.dtRatio;for(var b=0,c=this.m_bodies.length;c>b;++b){var i=this.m_bodies[b],j=a.velocities[i.m_islandIndex].v,h=this.m_deltas[b];j.x+=i.m_invMass*h.y*.5*this.m_impulse,j.y+=i.m_invMass*-h.x*.5*this.m_impulse}}else this.m_impulse=0},box2d.b2AreaJoint.prototype.SolveVelocityConstraints=function(a){for(var b=0,c=0,d=0,e=this.m_bodies.length;e>d;++d){var f=this.m_bodies[d],g=a.velocities[f.m_islandIndex].v,h=this.m_deltas[d];b+=h.GetLengthSquared()/f.GetMass(),c+=box2d.b2CrossVV(g,h)}var i=-2*c/b;this.m_impulse+=i;for(var d=0,e=this.m_bodies.length;e>d;++d){var f=this.m_bodies[d],g=a.velocities[f.m_islandIndex].v,h=this.m_deltas[d];g.x+=f.m_invMass*h.y*.5*i,g.y+=f.m_invMass*-h.x*.5*i}},box2d.b2AreaJoint.prototype.SolvePositionConstraints=function(a){for(var b=0,c=0,d=0,e=this.m_bodies.length;e>d;++d){var f=this.m_bodies[d],g=this.m_bodies[(d+1)%e],h=a.positions[f.m_islandIndex].c,i=a.positions[g.m_islandIndex].c,j=box2d.b2SubVV(i,h,this.m_delta),k=j.GetLength();kd;++d){var f=this.m_bodies[d],h=a.positions[f.m_islandIndex].c,o=(d+1)%e,j=box2d.b2AddVV(this.m_normals[d],this.m_normals[o],this.m_delta);j.SelfMul(m);var p=j.GetLengthSquared();p>box2d.b2Sq(box2d.b2_maxLinearCorrection)&&j.SelfMul(box2d.b2_maxLinearCorrection/box2d.b2Sqrt(p)),p>box2d.b2Sq(box2d.b2_linearSlop)&&(n=!1),h.x+=j.x,h.y+=j.y}return n},goog.provide("box2d.b2BuoyancyController"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Controller"),goog.require("box2d.b2Math"),goog.require("box2d.b2WorldCallbacks"),box2d.b2BuoyancyController=function(){goog.base(this),this.normal=new box2d.b2Vec2(0,1),this.velocity=new box2d.b2Vec2(0,0),this.gravity=new box2d.b2Vec2(0,0)},goog.inherits(box2d.b2BuoyancyController,box2d.b2Controller),box2d.b2BuoyancyController.prototype.normal=null,box2d.b2BuoyancyController.prototype.offset=0,box2d.b2BuoyancyController.prototype.density=0,box2d.b2BuoyancyController.prototype.velocity=null,box2d.b2BuoyancyController.prototype.linearDrag=0,box2d.b2BuoyancyController.prototype.angularDrag=0,box2d.b2BuoyancyController.prototype.useDensity=!1,box2d.b2BuoyancyController.prototype.useWorldGravity=!0,box2d.b2BuoyancyController.prototype.gravity=null,box2d.b2BuoyancyController.prototype.Step=function(){if(this.m_bodyList){this.useWorldGravity&&this.gravity.Copy(this.GetWorld().GetGravity());for(var a=this.m_bodyList;a;a=a.nextBody){var b=a.body;if(b.IsAwake()!==!1){for(var c=new box2d.b2Vec2,d=new box2d.b2Vec2,e=0,f=0,g=b.GetFixtureList();g;g=g.m_next){var h=new box2d.b2Vec2,i=g.GetShape().ComputeSubmergedArea(this.normal,this.offset,b.GetTransform(),h);e+=i,c.x+=i*h.x,c.y+=i*h.y;var j=0;j=this.useDensity?g.GetDensity():1,f+=i*j,d.x+=i*h.x*j,d.y+=i*h.y*j}if(c.x/=e,c.y/=e,d.x/=f,d.y/=f,!(ethis.maxTimestep&&this.maxTimestep>0&&(b=this.maxTimestep);for(var c=this.m_bodyList;c;c=c.nextBody){var d=c.body;if(d.IsAwake()){var e=d.GetWorldVector(box2d.b2MulMV(this.T,d.GetLocalVector(d.GetLinearVelocity(),box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t1),box2d.b2TensorDampingController.prototype.Step.s_damping);d.SetLinearVelocity(box2d.b2AddVV(d.GetLinearVelocity(),box2d.b2MulSV(b,e,box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t1))}}}},box2d.b2TensorDampingController.prototype.Step.s_damping=new box2d.b2Vec2,box2d.b2TensorDampingController.prototype.SetAxisAligned=function(a,b){this.T.ex.x=-a,this.T.ex.y=0,this.T.ey.x=0,this.T.ey.y=-b,this.maxTimestep=a>0||b>0?1/box2d.b2Max(a,b):0},goog.provide("box2d.b2DistanceJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2DistanceJointDef=function(){goog.base(this,box2d.b2JointType.e_distanceJoint),this.localAnchorA=new box2d.b2Vec2,this.localAnchorB=new box2d.b2Vec2},goog.inherits(box2d.b2DistanceJointDef,box2d.b2JointDef),box2d.b2DistanceJointDef.prototype.localAnchorA=null,box2d.b2DistanceJointDef.prototype.localAnchorB=null,box2d.b2DistanceJointDef.prototype.length=1,box2d.b2DistanceJointDef.prototype.frequencyHz=0,box2d.b2DistanceJointDef.prototype.dampingRatio=0,box2d.b2DistanceJointDef.prototype.Initialize=function(a,b,c,d){this.bodyA=a,this.bodyB=b,this.bodyA.GetLocalPoint(c,this.localAnchorA),this.bodyB.GetLocalPoint(d,this.localAnchorB),this.length=box2d.b2DistanceVV(c,d),this.frequencyHz=0,this.dampingRatio=0},box2d.b2DistanceJoint=function(a){goog.base(this,a),this.m_u=new box2d.b2Vec2,this.m_rA=new box2d.b2Vec2,this.m_rB=new box2d.b2Vec2,this.m_localCenterA=new box2d.b2Vec2,this.m_localCenterB=new box2d.b2Vec2,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_lalcA=new box2d.b2Vec2,this.m_lalcB=new box2d.b2Vec2,this.m_frequencyHz=a.frequencyHz,this.m_dampingRatio=a.dampingRatio,this.m_localAnchorA=a.localAnchorA.Clone(),this.m_localAnchorB=a.localAnchorB.Clone(),this.m_length=a.length},goog.inherits(box2d.b2DistanceJoint,box2d.b2Joint),box2d.b2DistanceJoint.prototype.m_frequencyHz=0,box2d.b2DistanceJoint.prototype.m_dampingRatio=0,box2d.b2DistanceJoint.prototype.m_bias=0,box2d.b2DistanceJoint.prototype.m_localAnchorA=null,box2d.b2DistanceJoint.prototype.m_localAnchorB=null,box2d.b2DistanceJoint.prototype.m_gamma=0,box2d.b2DistanceJoint.prototype.m_impulse=0,box2d.b2DistanceJoint.prototype.m_length=0,box2d.b2DistanceJoint.prototype.m_indexA=0,box2d.b2DistanceJoint.prototype.m_indexB=0,box2d.b2DistanceJoint.prototype.m_u=null,box2d.b2DistanceJoint.prototype.m_rA=null,box2d.b2DistanceJoint.prototype.m_rB=null,box2d.b2DistanceJoint.prototype.m_localCenterA=null,box2d.b2DistanceJoint.prototype.m_localCenterB=null,box2d.b2DistanceJoint.prototype.m_invMassA=0,box2d.b2DistanceJoint.prototype.m_invMassB=0,box2d.b2DistanceJoint.prototype.m_invIA=0,box2d.b2DistanceJoint.prototype.m_invIB=0,box2d.b2DistanceJoint.prototype.m_mass=0,box2d.b2DistanceJoint.prototype.m_qA=null,box2d.b2DistanceJoint.prototype.m_qB=null,box2d.b2DistanceJoint.prototype.m_lalcA=null,box2d.b2DistanceJoint.prototype.m_lalcB=null,box2d.b2DistanceJoint.prototype.GetAnchorA=function(a){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,a)},box2d.b2DistanceJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,a)},box2d.b2DistanceJoint.prototype.GetReactionForce=function(a,b){return b.SetXY(a*this.m_impulse*this.m_u.x,a*this.m_impulse*this.m_u.y)},box2d.b2DistanceJoint.prototype.GetReactionTorque=function(){return 0},box2d.b2DistanceJoint.prototype.GetLocalAnchorA=function(a){return a.Copy(this.m_localAnchorA)},box2d.b2DistanceJoint.prototype.GetLocalAnchorB=function(a){return a.Copy(this.m_localAnchorB)},box2d.b2DistanceJoint.prototype.SetLength=function(a){this.m_length=a},box2d.b2DistanceJoint.prototype.GetLength=function(){return this.m_length},box2d.b2DistanceJoint.prototype.SetFrequency=function(a){this.m_frequencyHz=a},box2d.b2DistanceJoint.prototype.GetFrequency=function(){return this.m_frequencyHz},box2d.b2DistanceJoint.prototype.SetDampingRatio=function(a){this.m_dampingRatio=a},box2d.b2DistanceJoint.prototype.GetDampingRatio=function(){return this.m_dampingRatio},box2d.b2DistanceJoint.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_bodyA.m_islandIndex,b=this.m_bodyB.m_islandIndex;box2d.b2Log(" /*box2d.b2DistanceJointDef*/ var jd = new box2d.b2DistanceJointDef();\n"),box2d.b2Log(" jd.bodyA = bodies[%d];\n",a),box2d.b2Log(" jd.bodyB = bodies[%d];\n",b),box2d.b2Log(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),box2d.b2Log(" jd.localAnchorA.SetXY(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),box2d.b2Log(" jd.localAnchorB.SetXY(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),box2d.b2Log(" jd.length = %.15f;\n",this.m_length),box2d.b2Log(" jd.frequencyHz = %.15f;\n",this.m_frequencyHz),box2d.b2Log(" jd.dampingRatio = %.15f;\n",this.m_dampingRatio),box2d.b2Log(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)}},box2d.b2DistanceJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.velocities[this.m_indexA].v,e=a.velocities[this.m_indexA].w,f=a.positions[this.m_indexB].c,g=a.positions[this.m_indexB].a,h=a.velocities[this.m_indexB].v,i=a.velocities[this.m_indexB].w,j=this.m_qA.SetAngleRadians(c),k=this.m_qB.SetAngleRadians(g);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),box2d.b2MulRV(j,this.m_lalcA,this.m_rA),box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),box2d.b2MulRV(k,this.m_lalcB,this.m_rB),this.m_u.x=f.x+this.m_rB.x-b.x-this.m_rA.x,this.m_u.y=f.y+this.m_rB.y-b.y-this.m_rA.y;var l=this.m_u.GetLength();l>box2d.b2_linearSlop?this.m_u.SelfMul(1/l):this.m_u.SetZero();var m=box2d.b2CrossVV(this.m_rA,this.m_u),n=box2d.b2CrossVV(this.m_rB,this.m_u),o=this.m_invMassA+this.m_invIA*m*m+this.m_invMassB+this.m_invIB*n*n;if(this.m_mass=0!==o?1/o:0,this.m_frequencyHz>0){var p=l-this.m_length,q=2*box2d.b2_pi*this.m_frequencyHz,r=2*this.m_mass*this.m_dampingRatio*q,s=this.m_mass*q*q,t=a.step.dt;this.m_gamma=t*(r+t*s),this.m_gamma=0!==this.m_gamma?1/this.m_gamma:0,this.m_bias=p*t*s*this.m_gamma,o+=this.m_gamma,this.m_mass=0!==o?1/o:0}else this.m_gamma=0,this.m_bias=0;if(a.step.warmStarting){this.m_impulse*=a.step.dtRatio;var u=box2d.b2MulSV(this.m_impulse,this.m_u,box2d.b2DistanceJoint.prototype.InitVelocityConstraints.s_P);d.SelfMulSub(this.m_invMassA,u),e-=this.m_invIA*box2d.b2CrossVV(this.m_rA,u),h.SelfMulAdd(this.m_invMassB,u),i+=this.m_invIB*box2d.b2CrossVV(this.m_rB,u)}else this.m_impulse=0;a.velocities[this.m_indexA].w=e,a.velocities[this.m_indexB].w=i},box2d.b2DistanceJoint.prototype.InitVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2DistanceJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2DistanceJoint.prototype.SolveVelocityConstraints.s_vpA),g=box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2DistanceJoint.prototype.SolveVelocityConstraints.s_vpB),h=box2d.b2DotVV(this.m_u,box2d.b2SubVV(g,f,box2d.b2Vec2.s_t0)),i=-this.m_mass*(h+this.m_bias+this.m_gamma*this.m_impulse);this.m_impulse+=i;var j=box2d.b2MulSV(i,this.m_u,box2d.b2DistanceJoint.prototype.SolveVelocityConstraints.s_P);b.SelfMulSub(this.m_invMassA,j),c-=this.m_invIA*box2d.b2CrossVV(this.m_rA,j),d.SelfMulAdd(this.m_invMassB,j),e+=this.m_invIB*box2d.b2CrossVV(this.m_rB,j),a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2DistanceJoint.prototype.SolveVelocityConstraints.s_vpA=new box2d.b2Vec2,box2d.b2DistanceJoint.prototype.SolveVelocityConstraints.s_vpB=new box2d.b2Vec2,box2d.b2DistanceJoint.prototype.SolveVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2DistanceJoint.prototype.SolvePositionConstraints=function(a){if(this.m_frequencyHz>0)return!0;var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.positions[this.m_indexB].c,e=a.positions[this.m_indexB].a,f=(this.m_qA.SetAngleRadians(c),this.m_qB.SetAngleRadians(e),box2d.b2MulRV(this.m_qA,this.m_lalcA,this.m_rA)),g=box2d.b2MulRV(this.m_qB,this.m_lalcB,this.m_rB),h=this.m_u;h.x=d.x+g.x-b.x-f.x,h.y=d.y+g.y-b.y-f.y;var i=this.m_u.Normalize(),j=i-this.m_length;j=box2d.b2Clamp(j,-box2d.b2_maxLinearCorrection,box2d.b2_maxLinearCorrection);var k=-this.m_mass*j,l=box2d.b2MulSV(k,h,box2d.b2DistanceJoint.prototype.SolvePositionConstraints.s_P);return b.SelfMulSub(this.m_invMassA,l),c-=this.m_invIA*box2d.b2CrossVV(f,l),d.SelfMulAdd(this.m_invMassB,l),e+=this.m_invIB*box2d.b2CrossVV(g,l),a.positions[this.m_indexA].a=c,a.positions[this.m_indexB].a=e,box2d.b2Abs(j)0&&(this.m_angularMass=1/this.m_angularMass),a.step.warmStarting){this.m_linearImpulse.SelfMul(a.step.dtRatio),this.m_angularImpulse*=a.step.dtRatio;var q=this.m_linearImpulse;c.SelfMulSub(l,q),d-=n*(box2d.b2CrossVV(this.m_rA,q)+this.m_angularImpulse),f.SelfMulAdd(m,q),g+=o*(box2d.b2CrossVV(this.m_rB,q)+this.m_angularImpulse)}else this.m_linearImpulse.SetZero(),this.m_angularImpulse=0;a.velocities[this.m_indexA].w=d,a.velocities[this.m_indexB].w=g},box2d.b2FrictionJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=this.m_invMassA,g=this.m_invMassB,h=this.m_invIA,i=this.m_invIB,j=a.step.dt,k=e-c,l=-this.m_angularMass*k,m=this.m_angularImpulse,n=j*this.m_maxTorque;this.m_angularImpulse=box2d.b2Clamp(this.m_angularImpulse+l,-n,n),l=this.m_angularImpulse-m,c-=h*l,e+=i*l;var k=box2d.b2SubVV(box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2Vec2.s_t0),box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2Vec2.s_t1),box2d.b2FrictionJoint.prototype.SolveVelocityConstraints.s_Cdot),o=box2d.b2MulMV(this.m_linearMass,k,box2d.b2FrictionJoint.prototype.SolveVelocityConstraints.s_impulseV).SelfNeg(),p=box2d.b2FrictionJoint.prototype.SolveVelocityConstraints.s_oldImpulseV.Copy(this.m_linearImpulse);this.m_linearImpulse.SelfAdd(o);var n=j*this.m_maxForce;this.m_linearImpulse.GetLengthSquared()>n*n&&(this.m_linearImpulse.Normalize(),this.m_linearImpulse.SelfMul(n)),box2d.b2SubVV(this.m_linearImpulse,p,o),b.SelfMulSub(f,o),c-=h*box2d.b2CrossVV(this.m_rA,o),d.SelfMulAdd(g,o),e+=i*box2d.b2CrossVV(this.m_rB,o),a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2FrictionJoint.prototype.SolveVelocityConstraints.s_Cdot=new box2d.b2Vec2,box2d.b2FrictionJoint.prototype.SolveVelocityConstraints.s_impulseV=new box2d.b2Vec2,box2d.b2FrictionJoint.prototype.SolveVelocityConstraints.s_oldImpulseV=new box2d.b2Vec2,box2d.b2FrictionJoint.prototype.SolvePositionConstraints=function(){return!0},box2d.b2FrictionJoint.prototype.GetAnchorA=function(a){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,a)},box2d.b2FrictionJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,a)},box2d.b2FrictionJoint.prototype.GetReactionForce=function(a,b){return b.SetXY(a*this.m_linearImpulse.x,a*this.m_linearImpulse.y)},box2d.b2FrictionJoint.prototype.GetReactionTorque=function(a){return a*this.m_angularImpulse},box2d.b2FrictionJoint.prototype.GetLocalAnchorA=function(a){return a.Copy(this.m_localAnchorA)},box2d.b2FrictionJoint.prototype.GetLocalAnchorB=function(a){return a.Copy(this.m_localAnchorB)},box2d.b2FrictionJoint.prototype.SetMaxForce=function(a){this.m_maxForce=a},box2d.b2FrictionJoint.prototype.GetMaxForce=function(){return this.m_maxForce},box2d.b2FrictionJoint.prototype.SetMaxTorque=function(a){this.m_maxTorque=a},box2d.b2FrictionJoint.prototype.GetMaxTorque=function(){return this.m_maxTorque},box2d.b2FrictionJoint.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_bodyA.m_islandIndex,b=this.m_bodyB.m_islandIndex;box2d.b2Log(" /*box2d.b2FrictionJointDef*/ var jd = new box2d.b2FrictionJointDef();\n"),box2d.b2Log(" jd.bodyA = bodies[%d];\n",a),box2d.b2Log(" jd.bodyB = bodies[%d];\n",b),box2d.b2Log(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),box2d.b2Log(" jd.localAnchorA.SetXY(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),box2d.b2Log(" jd.localAnchorB.SetXY(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),box2d.b2Log(" jd.maxForce = %.15f;\n",this.m_maxForce),box2d.b2Log(" jd.maxTorque = %.15f;\n",this.m_maxTorque),box2d.b2Log(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)}},goog.provide("box2d.b2MouseJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2MouseJointDef=function(){goog.base(this,box2d.b2JointType.e_mouseJoint),this.target=new box2d.b2Vec2},goog.inherits(box2d.b2MouseJointDef,box2d.b2JointDef),box2d.b2MouseJointDef.prototype.target=null,box2d.b2MouseJointDef.prototype.maxForce=0,box2d.b2MouseJointDef.prototype.frequencyHz=5,box2d.b2MouseJointDef.prototype.dampingRatio=.7,box2d.b2MouseJoint=function(a){goog.base(this,a),this.m_localAnchorB=new box2d.b2Vec2,this.m_targetA=new box2d.b2Vec2,this.m_impulse=new box2d.b2Vec2,this.m_rB=new box2d.b2Vec2,this.m_localCenterB=new box2d.b2Vec2,this.m_mass=new box2d.b2Mat22,this.m_C=new box2d.b2Vec2,this.m_qB=new box2d.b2Rot,this.m_lalcB=new box2d.b2Vec2,this.m_K=new box2d.b2Mat22,box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.target.IsValid()),box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a.maxForce)&&a.maxForce>=0),box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a.frequencyHz)&&a.frequencyHz>=0),box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a.dampingRatio)&&a.dampingRatio>=0),this.m_targetA.Copy(a.target),box2d.b2MulTXV(this.m_bodyB.GetTransform(),this.m_targetA,this.m_localAnchorB),this.m_maxForce=a.maxForce,this.m_impulse.SetZero(),this.m_frequencyHz=a.frequencyHz,this.m_dampingRatio=a.dampingRatio,this.m_beta=0,this.m_gamma=0},goog.inherits(box2d.b2MouseJoint,box2d.b2Joint),box2d.b2MouseJoint.prototype.m_localAnchorB=null,box2d.b2MouseJoint.prototype.m_targetA=null,box2d.b2MouseJoint.prototype.m_frequencyHz=0,box2d.b2MouseJoint.prototype.m_dampingRatio=0,box2d.b2MouseJoint.prototype.m_beta=0,box2d.b2MouseJoint.prototype.m_impulse=null,box2d.b2MouseJoint.prototype.m_maxForce=0,box2d.b2MouseJoint.prototype.m_gamma=0,box2d.b2MouseJoint.prototype.m_indexA=0,box2d.b2MouseJoint.prototype.m_indexB=0,box2d.b2MouseJoint.prototype.m_rB=null,box2d.b2MouseJoint.prototype.m_localCenterB=null,box2d.b2MouseJoint.prototype.m_invMassB=0,box2d.b2MouseJoint.prototype.m_invIB=0,box2d.b2MouseJoint.prototype.m_mass=null,box2d.b2MouseJoint.prototype.m_C=null,box2d.b2MouseJoint.prototype.m_qB=null,box2d.b2MouseJoint.prototype.m_lalcB=null,box2d.b2MouseJoint.prototype.m_K=null,box2d.b2MouseJoint.prototype.SetTarget=function(a){this.m_bodyB.IsAwake()===!1&&this.m_bodyB.SetAwake(!0),this.m_targetA.Copy(a)},box2d.b2MouseJoint.prototype.GetTarget=function(a){return a.Copy(this.m_targetA)},box2d.b2MouseJoint.prototype.SetMaxForce=function(a){this.m_maxForce=a},box2d.b2MouseJoint.prototype.GetMaxForce=function(){return this.m_maxForce},box2d.b2MouseJoint.prototype.SetFrequency=function(a){this.m_frequencyHz=a},box2d.b2MouseJoint.prototype.GetFrequency=function(){return this.m_frequencyHz},box2d.b2MouseJoint.prototype.SetDampingRatio=function(a){this.m_dampingRatio=a},box2d.b2MouseJoint.prototype.GetDampingRatio=function(){return this.m_dampingRatio},box2d.b2MouseJoint.prototype.InitVelocityConstraints=function(a){this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexB].c,c=a.positions[this.m_indexB].a,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=this.m_qB.SetAngleRadians(c),g=this.m_bodyB.GetMass(),h=2*box2d.b2_pi*this.m_frequencyHz,i=2*g*this.m_dampingRatio*h,j=g*h*h,k=a.step.dt;box2d.ENABLE_ASSERTS&&box2d.b2Assert(i+k*j>box2d.b2_epsilon),this.m_gamma=k*(i+k*j),0!==this.m_gamma&&(this.m_gamma=1/this.m_gamma),this.m_beta=k*j*this.m_gamma,box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),box2d.b2MulRV(f,this.m_lalcB,this.m_rB);var l=this.m_K;l.ex.x=this.m_invMassB+this.m_invIB*this.m_rB.y*this.m_rB.y+this.m_gamma,l.ex.y=-this.m_invIB*this.m_rB.x*this.m_rB.y,l.ey.x=l.ex.y,l.ey.y=this.m_invMassB+this.m_invIB*this.m_rB.x*this.m_rB.x+this.m_gamma,l.GetInverse(this.m_mass),this.m_C.x=b.x+this.m_rB.x-this.m_targetA.x,this.m_C.y=b.y+this.m_rB.y-this.m_targetA.y,this.m_C.SelfMul(this.m_beta),e*=.98,a.step.warmStarting?(this.m_impulse.SelfMul(a.step.dtRatio),d.x+=this.m_invMassB*this.m_impulse.x,d.y+=this.m_invMassB*this.m_impulse.y,e+=this.m_invIB*box2d.b2CrossVV(this.m_rB,this.m_impulse)):this.m_impulse.SetZero(),a.velocities[this.m_indexB].w=e},box2d.b2MouseJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexB].v,c=a.velocities[this.m_indexB].w,d=box2d.b2AddVCrossSV(b,c,this.m_rB,box2d.b2MouseJoint.prototype.SolveVelocityConstraints.s_Cdot),e=box2d.b2MulMV(this.m_mass,box2d.b2AddVV(d,box2d.b2AddVV(this.m_C,box2d.b2MulSV(this.m_gamma,this.m_impulse,box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0).SelfNeg(),box2d.b2MouseJoint.prototype.SolveVelocityConstraints.s_impulse),f=box2d.b2MouseJoint.prototype.SolveVelocityConstraints.s_oldImpulse.Copy(this.m_impulse);this.m_impulse.SelfAdd(e);var g=a.step.dt*this.m_maxForce;this.m_impulse.GetLengthSquared()>g*g&&this.m_impulse.SelfMul(g/this.m_impulse.GetLength()),box2d.b2SubVV(this.m_impulse,f,e),b.SelfMulAdd(this.m_invMassB,e),c+=this.m_invIB*box2d.b2CrossVV(this.m_rB,e),a.velocities[this.m_indexB].w=c},box2d.b2MouseJoint.prototype.SolveVelocityConstraints.s_Cdot=new box2d.b2Vec2,box2d.b2MouseJoint.prototype.SolveVelocityConstraints.s_impulse=new box2d.b2Vec2,box2d.b2MouseJoint.prototype.SolveVelocityConstraints.s_oldImpulse=new box2d.b2Vec2,box2d.b2MouseJoint.prototype.SolvePositionConstraints=function(){return!0},box2d.b2MouseJoint.prototype.GetAnchorA=function(a){return a.Copy(this.m_targetA)},box2d.b2MouseJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,a)},box2d.b2MouseJoint.prototype.GetReactionForce=function(a,b){return box2d.b2MulSV(a,this.m_impulse,b)},box2d.b2MouseJoint.prototype.GetReactionTorque=function(){return 0},box2d.b2MouseJoint.prototype.Dump=function(){box2d.DEBUG&&box2d.b2Log("Mouse joint dumping is not supported.\n")},box2d.b2MouseJoint.prototype.ShiftOrigin=function(a){this.m_targetA.SelfSub(a)},goog.provide("box2d.b2ConstantForceController"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Controller"),goog.require("box2d.b2Math"),box2d.b2ConstantForceController=function(){goog.base(this),this.F=new box2d.b2Vec2(0,0)},goog.inherits(box2d.b2ConstantForceController,box2d.b2Controller),box2d.b2ConstantAccelController.prototype.F=null,box2d.b2ConstantForceController.prototype.Step=function(){for(var a=this.m_bodyList;a;a=a.nextBody){var b=a.body;b.IsAwake()&&b.ApplyForce(this.F,b.GetWorldCenter())}},goog.provide("box2d.b2PulleyJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Joint"),goog.require("box2d.b2Math"),box2d.b2_minPulleyLength=2,box2d.b2PulleyJointDef=function(){goog.base(this,box2d.b2JointType.e_pulleyJoint),this.collideConnected=!0,this.groundAnchorA=new box2d.b2Vec2(-1,1),this.groundAnchorB=new box2d.b2Vec2(1,1),this.localAnchorA=new box2d.b2Vec2(-1,0),this.localAnchorB=new box2d.b2Vec2(1,0)},goog.inherits(box2d.b2PulleyJointDef,box2d.b2JointDef),box2d.b2PulleyJointDef.prototype.groundAnchorA=null,box2d.b2PulleyJointDef.prototype.groundAnchorB=null,box2d.b2PulleyJointDef.prototype.localAnchorA=null,box2d.b2PulleyJointDef.prototype.localAnchorB=null,box2d.b2PulleyJointDef.prototype.lengthA=0,box2d.b2PulleyJointDef.prototype.lengthB=0,box2d.b2PulleyJointDef.prototype.ratio=1,box2d.b2PulleyJointDef.prototype.Initialize=function(a,b,c,d,e,f,g){this.bodyA=a,this.bodyB=b,this.groundAnchorA.Copy(c),this.groundAnchorB.Copy(d),this.bodyA.GetLocalPoint(e,this.localAnchorA),this.bodyB.GetLocalPoint(f,this.localAnchorB),this.lengthA=box2d.b2DistanceVV(e,c),this.lengthB=box2d.b2DistanceVV(f,d),this.ratio=g,box2d.ENABLE_ASSERTS&&box2d.b2Assert(this.ratio>box2d.b2_epsilon)},box2d.b2PulleyJoint=function(a){goog.base(this,a),this.m_groundAnchorA=new box2d.b2Vec2,this.m_groundAnchorB=new box2d.b2Vec2,this.m_localAnchorA=new box2d.b2Vec2,this.m_localAnchorB=new box2d.b2Vec2,this.m_uA=new box2d.b2Vec2,this.m_uB=new box2d.b2Vec2,this.m_rA=new box2d.b2Vec2,this.m_rB=new box2d.b2Vec2,this.m_localCenterA=new box2d.b2Vec2,this.m_localCenterB=new box2d.b2Vec2,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_lalcA=new box2d.b2Vec2,this.m_lalcB=new box2d.b2Vec2,this.m_groundAnchorA.Copy(a.groundAnchorA),this.m_groundAnchorB.Copy(a.groundAnchorB),this.m_localAnchorA.Copy(a.localAnchorA),this.m_localAnchorB.Copy(a.localAnchorB),this.m_lengthA=a.lengthA,this.m_lengthB=a.lengthB,box2d.ENABLE_ASSERTS&&box2d.b2Assert(0!==a.ratio),this.m_ratio=a.ratio,this.m_constant=a.lengthA+this.m_ratio*a.lengthB,this.m_impulse=0},goog.inherits(box2d.b2PulleyJoint,box2d.b2Joint),box2d.b2PulleyJoint.prototype.m_groundAnchorA=null,box2d.b2PulleyJoint.prototype.m_groundAnchorB=null,box2d.b2PulleyJoint.prototype.m_lengthA=0,box2d.b2PulleyJoint.prototype.m_lengthB=0,box2d.b2PulleyJoint.prototype.m_localAnchorA=null,box2d.b2PulleyJoint.prototype.m_localAnchorB=null,box2d.b2PulleyJoint.prototype.m_constant=0,box2d.b2PulleyJoint.prototype.m_ratio=0,box2d.b2PulleyJoint.prototype.m_impulse=0,box2d.b2PulleyJoint.prototype.m_indexA=0,box2d.b2PulleyJoint.prototype.m_indexB=0,box2d.b2PulleyJoint.prototype.m_uA=null,box2d.b2PulleyJoint.prototype.m_uB=null,box2d.b2PulleyJoint.prototype.m_rA=null,box2d.b2PulleyJoint.prototype.m_rB=null,box2d.b2PulleyJoint.prototype.m_localCenterA=null,box2d.b2PulleyJoint.prototype.m_localCenterB=null,box2d.b2PulleyJoint.prototype.m_invMassA=0,box2d.b2PulleyJoint.prototype.m_invMassB=0,box2d.b2PulleyJoint.prototype.m_invIA=0,box2d.b2PulleyJoint.prototype.m_invIB=0,box2d.b2PulleyJoint.prototype.m_mass=0,box2d.b2PulleyJoint.prototype.m_qA=null,box2d.b2PulleyJoint.prototype.m_qB=null,box2d.b2PulleyJoint.prototype.m_lalcA=null,box2d.b2PulleyJoint.prototype.m_lalcB=null,box2d.b2PulleyJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.velocities[this.m_indexA].v,e=a.velocities[this.m_indexA].w,f=a.positions[this.m_indexB].c,g=a.positions[this.m_indexB].a,h=a.velocities[this.m_indexB].v,i=a.velocities[this.m_indexB].w,j=this.m_qA.SetAngleRadians(c),k=this.m_qB.SetAngleRadians(g);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),box2d.b2MulRV(j,this.m_lalcA,this.m_rA),box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),box2d.b2MulRV(k,this.m_lalcB,this.m_rB),this.m_uA.Copy(b).SelfAdd(this.m_rA).SelfSub(this.m_groundAnchorA),this.m_uB.Copy(f).SelfAdd(this.m_rB).SelfSub(this.m_groundAnchorB);var l=this.m_uA.GetLength(),m=this.m_uB.GetLength();l>10*box2d.b2_linearSlop?this.m_uA.SelfMul(1/l):this.m_uA.SetZero(),m>10*box2d.b2_linearSlop?this.m_uB.SelfMul(1/m):this.m_uB.SetZero();var n=box2d.b2CrossVV(this.m_rA,this.m_uA),o=box2d.b2CrossVV(this.m_rB,this.m_uB),p=this.m_invMassA+this.m_invIA*n*n,q=this.m_invMassB+this.m_invIB*o*o;if(this.m_mass=p+this.m_ratio*this.m_ratio*q,this.m_mass>0&&(this.m_mass=1/this.m_mass),a.step.warmStarting){this.m_impulse*=a.step.dtRatio;var r=box2d.b2MulSV(-this.m_impulse,this.m_uA,box2d.b2PulleyJoint.prototype.InitVelocityConstraints.s_PA),s=box2d.b2MulSV(-this.m_ratio*this.m_impulse,this.m_uB,box2d.b2PulleyJoint.prototype.InitVelocityConstraints.s_PB);d.SelfMulAdd(this.m_invMassA,r),e+=this.m_invIA*box2d.b2CrossVV(this.m_rA,r),h.SelfMulAdd(this.m_invMassB,s),i+=this.m_invIB*box2d.b2CrossVV(this.m_rB,s)}else this.m_impulse=0;a.velocities[this.m_indexA].w=e,a.velocities[this.m_indexB].w=i},box2d.b2PulleyJoint.prototype.InitVelocityConstraints.s_PA=new box2d.b2Vec2,box2d.b2PulleyJoint.prototype.InitVelocityConstraints.s_PB=new box2d.b2Vec2,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=box2d.b2AddVCrossSV(b,c,this.m_rA,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_vpA),g=box2d.b2AddVCrossSV(d,e,this.m_rB,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_vpB),h=-box2d.b2DotVV(this.m_uA,f)-this.m_ratio*box2d.b2DotVV(this.m_uB,g),i=-this.m_mass*h;this.m_impulse+=i;var j=box2d.b2MulSV(-i,this.m_uA,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_PA),k=box2d.b2MulSV(-this.m_ratio*i,this.m_uB,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_PB);b.SelfMulAdd(this.m_invMassA,j),c+=this.m_invIA*box2d.b2CrossVV(this.m_rA,j),d.SelfMulAdd(this.m_invMassB,k),e+=this.m_invIB*box2d.b2CrossVV(this.m_rB,k),a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_vpA=new box2d.b2Vec2,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_vpB=new box2d.b2Vec2,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_PA=new box2d.b2Vec2,box2d.b2PulleyJoint.prototype.SolveVelocityConstraints.s_PB=new box2d.b2Vec2,box2d.b2PulleyJoint.prototype.SolvePositionConstraints=function(a){var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.positions[this.m_indexB].c,e=a.positions[this.m_indexB].a,f=this.m_qA.SetAngleRadians(c),g=this.m_qB.SetAngleRadians(e);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var h=box2d.b2MulRV(f,this.m_lalcA,this.m_rA);box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var i=box2d.b2MulRV(g,this.m_lalcB,this.m_rB),j=this.m_uA.Copy(b).SelfAdd(h).SelfSub(this.m_groundAnchorA),k=this.m_uB.Copy(d).SelfAdd(i).SelfSub(this.m_groundAnchorB),l=j.GetLength(),m=k.GetLength();l>10*box2d.b2_linearSlop?j.SelfMul(1/l):j.SetZero(),m>10*box2d.b2_linearSlop?k.SelfMul(1/m):k.SetZero();var n=box2d.b2CrossVV(h,j),o=box2d.b2CrossVV(i,k),p=this.m_invMassA+this.m_invIA*n*n,q=this.m_invMassB+this.m_invIB*o*o,r=p+this.m_ratio*this.m_ratio*q;r>0&&(r=1/r);var s=this.m_constant-l-this.m_ratio*m,t=box2d.b2Abs(s),u=-r*s,v=box2d.b2MulSV(-u,j,box2d.b2PulleyJoint.prototype.SolvePositionConstraints.s_PA),w=box2d.b2MulSV(-this.m_ratio*u,k,box2d.b2PulleyJoint.prototype.SolvePositionConstraints.s_PB);return b.SelfMulAdd(this.m_invMassA,v),c+=this.m_invIA*box2d.b2CrossVV(h,v),d.SelfMulAdd(this.m_invMassB,w),e+=this.m_invIB*box2d.b2CrossVV(i,w),a.positions[this.m_indexA].a=c,a.positions[this.m_indexB].a=e,tj||i=0&&k<=b.maxFraction*i?(k/=i,a.fraction=k,box2d.b2AddVMulSV(e,k,g,a.normal).SelfNormalize(),!0):!1},box2d.b2CircleShape.prototype.RayCast.s_position=new box2d.b2Vec2,box2d.b2CircleShape.prototype.RayCast.s_s=new box2d.b2Vec2,box2d.b2CircleShape.prototype.RayCast.s_r=new box2d.b2Vec2,box2d.b2CircleShape.prototype.ComputeAABB=function(a,b){var c=box2d.b2MulXV(b,this.m_p,box2d.b2CircleShape.prototype.ComputeAABB.s_p);a.lowerBound.SetXY(c.x-this.m_radius,c.y-this.m_radius),a.upperBound.SetXY(c.x+this.m_radius,c.y+this.m_radius)},box2d.b2CircleShape.prototype.ComputeAABB.s_p=new box2d.b2Vec2,box2d.b2CircleShape.prototype.ComputeMass=function(a,b){var c=box2d.b2Sq(this.m_radius);a.mass=b*box2d.b2_pi*c,a.center.Copy(this.m_p),a.I=a.mass*(.5*c+box2d.b2DotVV(this.m_p,this.m_p))},box2d.b2CircleShape.prototype.SetupDistanceProxy=function(a){a.m_vertices=new Array(1,!0),a.m_vertices[0]=this.m_p,a.m_count=1,a.m_radius=this.m_radius},box2d.b2CircleShape.prototype.ComputeSubmergedArea=function(a,b,c,d){var e=box2d.b2MulXV(c,this.m_p,new box2d.b2Vec2),f=-(box2d.b2DotVV(a,e)-b);if(f<-this.m_radius+box2d.b2_epsilon)return 0;if(f>this.m_radius)return d.Copy(e),box2d.b2_pi*this.m_radius*this.m_radius;var g=this.m_radius*this.m_radius,h=f*f,i=g*(box2d.b2Asin(f/this.m_radius)+box2d.b2_pi/2)+f*box2d.b2Sqrt(g-h),j=-2/3*box2d.b2Pow(g-h,1.5)/i;return d.x=e.x+a.x*j,d.y=e.y+a.y*j,i},box2d.b2CircleShape.prototype.Dump=function(){box2d.b2Log(" /*box2d.b2CircleShape*/ var shape = new box2d.b2CircleShape();\n"),box2d.b2Log(" shape.m_radius = %.15f;\n",this.m_radius),box2d.b2Log(" shape.m_p.SetXY(%.15f, %.15f);\n",this.m_p.x,this.m_p.y)},goog.provide("box2d.b2Rope"),goog.require("box2d.b2Math"),goog.require("box2d.b2Draw"),box2d.b2RopeDef=function(){this.vertices=new Array,this.masses=new Array,this.gravity=new box2d.b2Vec2},box2d.b2RopeDef.prototype.vertices=null,box2d.b2RopeDef.prototype.count=0,box2d.b2RopeDef.prototype.masses=null,box2d.b2RopeDef.prototype.gravity=null,box2d.b2RopeDef.prototype.damping=.1,box2d.b2RopeDef.prototype.k2=.9,box2d.b2RopeDef.prototype.k3=.1,box2d.b2Rope=function(){this.m_gravity=new box2d.b2Vec2},box2d.b2Rope.prototype.m_count=0,box2d.b2Rope.prototype.m_ps=null,box2d.b2Rope.prototype.m_p0s=null,box2d.b2Rope.prototype.m_vs=null,box2d.b2Rope.prototype.m_ims=null,box2d.b2Rope.prototype.m_Ls=null,box2d.b2Rope.prototype.m_as=null,box2d.b2Rope.prototype.m_gravity=null,box2d.b2Rope.prototype.m_damping=0,box2d.b2Rope.prototype.m_k2=1,box2d.b2Rope.prototype.m_k3=.1,box2d.b2Rope.prototype.GetVertexCount=function(){return this.m_count},box2d.b2Rope.prototype.GetVertices=function(){return this.m_ps},box2d.b2Rope.prototype.Initialize=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(a.count>=3),this.m_count=a.count,this.m_ps=box2d.b2Vec2.MakeArray(this.m_count),this.m_p0s=box2d.b2Vec2.MakeArray(this.m_count),this.m_vs=box2d.b2Vec2.MakeArray(this.m_count),this.m_ims=box2d.b2MakeNumberArray(this.m_count);for(var b=0;b0?1/c:0}var d=this.m_count-1,e=this.m_count-2;this.m_Ls=box2d.b2MakeNumberArray(d),this.m_as=box2d.b2MakeNumberArray(e);for(var b=0;d>b;++b){var f=this.m_ps[b],g=this.m_ps[b+1];this.m_Ls[b]=box2d.b2DistanceVV(f,g)}for(var b=0;e>b;++b){var f=this.m_ps[b],g=this.m_ps[b+1],h=this.m_ps[b+2],i=box2d.b2SubVV(g,f,box2d.b2Vec2.s_t0),j=box2d.b2SubVV(h,g,box2d.b2Vec2.s_t1),k=box2d.b2CrossVV(i,j),l=box2d.b2DotVV(i,j);this.m_as[b]=box2d.b2Atan2(k,l)}this.m_gravity.Copy(a.gravity),this.m_damping=a.damping,this.m_k2=a.k2,this.m_k3=a.k3},box2d.b2Rope.prototype.Step=function(a,b){if(0!==a){for(var c=Math.exp(-a*this.m_damping),d=0;d0&&this.m_vs[d].SelfMulAdd(a,this.m_gravity),this.m_vs[d].SelfMul(c),this.m_ps[d].SelfMulAdd(a,this.m_vs[d]);for(var d=0;b>d;++d)this.SolveC2(),this.SolveC3(),this.SolveC2();for(var e=1/a,d=0;db;++b){var c=this.m_ps[b],d=this.m_ps[b+1],e=box2d.b2SubVV(d,c,box2d.b2Rope.s_d),f=e.Normalize(),g=this.m_ims[b],h=this.m_ims[b+1];if(g+h!==0){var i=g/(g+h),j=h/(g+h);c.SelfMulSub(this.m_k2*i*(this.m_Ls[b]-f),e),d.SelfMulAdd(this.m_k2*j*(this.m_Ls[b]-f),e)}}},box2d.b2Rope.s_d=new box2d.b2Vec2,box2d.b2Rope.prototype.SetAngleRadians=function(a){for(var b=this.m_count-2,c=0;b>c;++c)this.m_as[c]=a},box2d.b2Rope.prototype.SolveC3=function(){for(var a=this.m_count-2,b=0;a>b;++b){var c=this.m_ps[b],d=this.m_ps[b+1],e=this.m_ps[b+2],f=this.m_ims[b],g=this.m_ims[b+1],h=this.m_ims[b+2],i=box2d.b2SubVV(d,c,box2d.b2Rope.s_d1),j=box2d.b2SubVV(e,d,box2d.b2Rope.s_d2),k=i.GetLengthSquared(),l=j.GetLengthSquared();if(k*l!==0){var m=box2d.b2CrossVV(i,j),n=box2d.b2DotVV(i,j),o=box2d.b2Atan2(m,n),p=box2d.b2MulSV(-1/k,i.SelfSkew(),box2d.b2Rope.s_Jd1),q=box2d.b2MulSV(1/l,j.SelfSkew(),box2d.b2Rope.s_Jd2),r=box2d.b2NegV(p,box2d.b2Rope.s_J1),s=box2d.b2SubVV(p,q,box2d.b2Rope.s_J2),t=q,u=f*box2d.b2DotVV(r,r)+g*box2d.b2DotVV(s,s)+h*box2d.b2DotVV(t,t);if(0!==u){u=1/u;for(var v=o-this.m_as[b];v>box2d.b2_pi;)o-=2*box2d.b2_pi,v=o-this.m_as[b];for(;v<-box2d.b2_pi;)o+=2*box2d.b2_pi,v=o-this.m_as[b];var w=-this.m_k3*u*v;c.SelfMulAdd(f*w,r),d.SelfMulAdd(g*w,s),e.SelfMulAdd(h*w,t)}}}},box2d.b2Rope.s_d1=new box2d.b2Vec2,box2d.b2Rope.s_d2=new box2d.b2Vec2,box2d.b2Rope.s_Jd1=new box2d.b2Vec2,box2d.b2Rope.s_Jd2=new box2d.b2Vec2,box2d.b2Rope.s_J1=new box2d.b2Vec2,box2d.b2Rope.s_J2=new box2d.b2Vec2,box2d.b2Rope.prototype.Draw=function(a){for(var b=new box2d.b2Color(.4,.5,.7),c=0;c0&&(this.m_mass=1/this.m_mass),this.m_springMass=0,this.m_bias=0,this.m_gamma=0,this.m_frequencyHz>0){box2d.b2MulRV(n,this.m_localXAxisA,this.m_ax),this.m_sAx=box2d.b2CrossVV(box2d.b2AddVV(r,p,box2d.b2Vec2.s_t0),this.m_ax),this.m_sBx=box2d.b2CrossVV(q,this.m_ax);var s=b+c+d*this.m_sAx*this.m_sAx+e*this.m_sBx*this.m_sBx;if(s>0){this.m_springMass=1/s;var t=box2d.b2DotVV(r,this.m_ax),u=2*box2d.b2_pi*this.m_frequencyHz,v=2*this.m_springMass*this.m_dampingRatio*u,w=this.m_springMass*u*u,x=a.step.dt;this.m_gamma=x*(v+x*w),this.m_gamma>0&&(this.m_gamma=1/this.m_gamma),this.m_bias=t*x*w*this.m_gamma,this.m_springMass=s+this.m_gamma,this.m_springMass>0&&(this.m_springMass=1/this.m_springMass)}}else this.m_springImpulse=0;if(this.m_enableMotor?(this.m_motorMass=d+e,this.m_motorMass>0&&(this.m_motorMass=1/this.m_motorMass)):(this.m_motorMass=0,this.m_motorImpulse=0),a.step.warmStarting){this.m_impulse*=a.step.dtRatio,this.m_springImpulse*=a.step.dtRatio,this.m_motorImpulse*=a.step.dtRatio;var y=box2d.b2AddVV(box2d.b2MulSV(this.m_impulse,this.m_ay,box2d.b2Vec2.s_t0),box2d.b2MulSV(this.m_springImpulse,this.m_ax,box2d.b2Vec2.s_t1),box2d.b2WheelJoint.prototype.InitVelocityConstraints.s_P),z=this.m_impulse*this.m_sAy+this.m_springImpulse*this.m_sAx+this.m_motorImpulse,A=this.m_impulse*this.m_sBy+this.m_springImpulse*this.m_sBx+this.m_motorImpulse;h.SelfMulSub(this.m_invMassA,y),i-=this.m_invIA*z,l.SelfMulAdd(this.m_invMassB,y),m+=this.m_invIB*A}else this.m_impulse=0,this.m_springImpulse=0,this.m_motorImpulse=0;a.velocities[this.m_indexA].w=i,a.velocities[this.m_indexB].w=m},box2d.b2WheelJoint.prototype.InitVelocityConstraints.s_d=new box2d.b2Vec2,box2d.b2WheelJoint.prototype.InitVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2WheelJoint.prototype.SolveVelocityConstraints=function(a){var b=this.m_invMassA,c=this.m_invMassB,d=this.m_invIA,e=this.m_invIB,f=a.velocities[this.m_indexA].v,g=a.velocities[this.m_indexA].w,h=a.velocities[this.m_indexB].v,i=a.velocities[this.m_indexB].w,j=box2d.b2DotVV(this.m_ax,box2d.b2SubVV(h,f,box2d.b2Vec2.s_t0))+this.m_sBx*i-this.m_sAx*g,k=-this.m_springMass*(j+this.m_bias+this.m_gamma*this.m_springImpulse);this.m_springImpulse+=k;var l=box2d.b2MulSV(k,this.m_ax,box2d.b2WheelJoint.prototype.SolveVelocityConstraints.s_P),m=k*this.m_sAx,n=k*this.m_sBx;f.SelfMulSub(b,l),g-=d*m,h.SelfMulAdd(c,l),i+=e*n;var j=i-g-this.m_motorSpeed,k=-this.m_motorMass*j,o=this.m_motorImpulse,p=a.step.dt*this.m_maxMotorTorque;this.m_motorImpulse=box2d.b2Clamp(this.m_motorImpulse+k,-p,p),k=this.m_motorImpulse-o,g-=d*k,i+=e*k;var j=box2d.b2DotVV(this.m_ay,box2d.b2SubVV(h,f,box2d.b2Vec2.s_t0))+this.m_sBy*i-this.m_sAy*g,k=-this.m_mass*j;this.m_impulse+=k;var l=box2d.b2MulSV(k,this.m_ay,box2d.b2WheelJoint.prototype.SolveVelocityConstraints.s_P),m=k*this.m_sAy,n=k*this.m_sBy;f.SelfMulSub(b,l),g-=d*m,h.SelfMulAdd(c,l),i+=e*n,a.velocities[this.m_indexA].w=g,a.velocities[this.m_indexB].w=i},box2d.b2WheelJoint.prototype.SolveVelocityConstraints.s_P=new box2d.b2Vec2,box2d.b2WheelJoint.prototype.SolvePositionConstraints=function(a){var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.positions[this.m_indexB].c,e=a.positions[this.m_indexB].a,f=this.m_qA.SetAngleRadians(c),g=this.m_qB.SetAngleRadians(e);box2d.b2SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var h=box2d.b2MulRV(f,this.m_lalcA,this.m_rA);box2d.b2SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var i,j=box2d.b2MulRV(g,this.m_lalcB,this.m_rB),k=box2d.b2AddVV(box2d.b2SubVV(d,b,box2d.b2Vec2.s_t0),box2d.b2SubVV(j,h,box2d.b2Vec2.s_t1),box2d.b2WheelJoint.prototype.SolvePositionConstraints.s_d),l=box2d.b2MulRV(f,this.m_localYAxisA,this.m_ay),m=box2d.b2CrossVV(box2d.b2AddVV(k,h,box2d.b2Vec2.s_t0),l),n=box2d.b2CrossVV(j,l),o=box2d.b2DotVV(k,this.m_ay),p=this.m_invMassA+this.m_invMassB+this.m_invIA*this.m_sAy*this.m_sAy+this.m_invIB*this.m_sBy*this.m_sBy;i=0!==p?-o/p:0;var q=box2d.b2MulSV(i,l,box2d.b2WheelJoint.prototype.SolvePositionConstraints.s_P),r=i*m,s=i*n;return b.SelfMulSub(this.m_invMassA,q),c-=this.m_invIA*r,d.SelfMulAdd(this.m_invMassB,q),e+=this.m_invIB*s,a.positions[this.m_indexA].a=c,a.positions[this.m_indexB].a=e,box2d.b2Abs(o)<=box2d.b2_linearSlop},box2d.b2WheelJoint.prototype.SolvePositionConstraints.s_d=new box2d.b2Vec2,box2d.b2WheelJoint.prototype.SolvePositionConstraints.s_P=new box2d.b2Vec2,box2d.b2WheelJoint.prototype.GetDefinition=function(a){return box2d.ENABLE_ASSERTS&&box2d.b2Assert(!1),a},box2d.b2WheelJoint.prototype.GetAnchorA=function(a){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,a)},box2d.b2WheelJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,a)},box2d.b2WheelJoint.prototype.GetReactionForce=function(a,b){return b.x=a*(this.m_impulse*this.m_ay.x+this.m_springImpulse*this.m_ax.x),b.y=a*(this.m_impulse*this.m_ay.y+this.m_springImpulse*this.m_ax.y),b},box2d.b2WheelJoint.prototype.GetReactionTorque=function(a){return a*this.m_motorImpulse},box2d.b2WheelJoint.prototype.GetLocalAnchorA=function(a){return a.Copy(this.m_localAnchorA)},box2d.b2WheelJoint.prototype.GetLocalAnchorB=function(a){return a.Copy(this.m_localAnchorB)},box2d.b2WheelJoint.prototype.GetLocalAxisA=function(a){return a.Copy(this.m_localXAxisA)},box2d.b2WheelJoint.prototype.GetJointTranslation=function(){var a=this.m_bodyA,b=this.m_bodyB,c=a.GetWorldPoint(this.m_localAnchorA,new box2d.b2Vec2),d=b.GetWorldPoint(this.m_localAnchorB,new box2d.b2Vec2),e=box2d.b2SubVV(d,c,new box2d.b2Vec2),f=a.GetWorldVector(this.m_localXAxisA,new box2d.b2Vec2),g=box2d.b2DotVV(e,f);return g},box2d.b2WheelJoint.prototype.GetJointSpeed=function(){var a=this.m_bodyA.m_angularVelocity,b=this.m_bodyB.m_angularVelocity;return b-a},box2d.b2WheelJoint.prototype.IsMotorEnabled=function(){return this.m_enableMotor},box2d.b2WheelJoint.prototype.EnableMotor=function(a){this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableMotor=a},box2d.b2WheelJoint.prototype.SetMotorSpeed=function(a){this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_motorSpeed=a},box2d.b2WheelJoint.prototype.SetMaxMotorTorque=function(a){this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_maxMotorTorque=a},box2d.b2WheelJoint.prototype.GetMotorTorque=function(a){return a*this.m_motorImpulse},box2d.b2WheelJoint.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_bodyA.m_islandIndex,b=this.m_bodyB.m_islandIndex;box2d.b2Log(" /*box2d.b2WheelJointDef*/ var jd = new box2d.b2WheelJointDef();\n"),box2d.b2Log(" jd.bodyA = bodies[%d];\n",a),box2d.b2Log(" jd.bodyB = bodies[%d];\n",b),box2d.b2Log(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),box2d.b2Log(" jd.localAnchorA.SetXY(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),box2d.b2Log(" jd.localAnchorB.SetXY(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),box2d.b2Log(" jd.localAxisA.Set(%.15f, %.15f);\n",this.m_localXAxisA.x,this.m_localXAxisA.y),box2d.b2Log(" jd.enableMotor = %s;\n",this.m_enableMotor?"true":"false"),box2d.b2Log(" jd.motorSpeed = %.15f;\n",this.m_motorSpeed),box2d.b2Log(" jd.maxMotorTorque = %.15f;\n",this.m_maxMotorTorque),box2d.b2Log(" jd.frequencyHz = %.15f;\n",this.m_frequencyHz),box2d.b2Log(" jd.dampingRatio = %.15f;\n",this.m_dampingRatio),box2d.b2Log(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)}},goog.provide("box2d.b2MotorJoint"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Math"),box2d.b2MotorJointDef=function(){goog.base(this,box2d.b2JointType.e_motorJoint),this.linearOffset=new box2d.b2Vec2(0,0)},goog.inherits(box2d.b2MotorJointDef,box2d.b2JointDef),box2d.b2MotorJointDef.prototype.linearOffset=null,box2d.b2MotorJointDef.prototype.angularOffset=0,box2d.b2MotorJointDef.prototype.maxForce=1,box2d.b2MotorJointDef.prototype.maxTorque=1,box2d.b2MotorJointDef.prototype.correctionFactor=.3,box2d.b2MotorJointDef.prototype.Initialize=function(a,b){this.bodyA=a,this.bodyB=b,this.bodyA.GetLocalPoint(this.bodyB.GetPosition(),this.linearOffset);var c=this.bodyA.GetAngleRadians(),d=this.bodyB.GetAngleRadians();this.angularOffset=d-c},box2d.b2MotorJoint=function(a){goog.base(this,a),this.m_linearOffset=a.linearOffset.Clone(),this.m_linearImpulse=new box2d.b2Vec2(0,0),this.m_maxForce=a.maxForce,this.m_maxTorque=a.maxTorque,this.m_correctionFactor=a.correctionFactor,this.m_rA=new box2d.b2Vec2(0,0),this.m_rB=new box2d.b2Vec2(0,0),this.m_localCenterA=new box2d.b2Vec2(0,0),this.m_localCenterB=new box2d.b2Vec2(0,0),this.m_linearError=new box2d.b2Vec2(0,0),this.m_linearMass=new box2d.b2Mat22,this.m_qA=new box2d.b2Rot,this.m_qB=new box2d.b2Rot,this.m_K=new box2d.b2Mat22},goog.inherits(box2d.b2MotorJoint,box2d.b2Joint),box2d.b2MotorJoint.prototype.m_linearOffset=null,box2d.b2MotorJoint.prototype.m_angularOffset=0,box2d.b2MotorJoint.prototype.m_linearImpulse=null,box2d.b2MotorJoint.prototype.m_angularImpulse=0,box2d.b2MotorJoint.prototype.m_maxForce=0,box2d.b2MotorJoint.prototype.m_maxTorque=0,box2d.b2MotorJoint.prototype.m_correctionFactor=.3,box2d.b2MotorJoint.prototype.m_indexA=0,box2d.b2MotorJoint.prototype.m_indexB=0,box2d.b2MotorJoint.prototype.m_rA=null,box2d.b2MotorJoint.prototype.m_rB=null,box2d.b2MotorJoint.prototype.m_localCenterA=null,box2d.b2MotorJoint.prototype.m_localCenterB=null,box2d.b2MotorJoint.prototype.m_linearError=null,box2d.b2MotorJoint.prototype.m_angularError=0,box2d.b2MotorJoint.prototype.m_invMassA=0,box2d.b2MotorJoint.prototype.m_invMassB=0,box2d.b2MotorJoint.prototype.m_invIA=0,box2d.b2MotorJoint.prototype.m_invIB=0,box2d.b2MotorJoint.prototype.m_linearMass=null,box2d.b2MotorJoint.prototype.m_angularMass=0,box2d.b2MotorJoint.prototype.m_qA=null,box2d.b2MotorJoint.prototype.m_qB=null,box2d.b2MotorJoint.prototype.m_K=null,box2d.b2MotorJoint.prototype.GetAnchorA=function(a){return this.m_bodyA.GetPosition(a)},box2d.b2MotorJoint.prototype.GetAnchorB=function(a){return this.m_bodyB.GetPosition(a)},box2d.b2MotorJoint.prototype.GetReactionForce=function(a,b){return box2d.b2MulSV(a,this.m_linearImpulse,b)},box2d.b2MotorJoint.prototype.GetReactionTorque=function(a){return a*this.m_angularImpulse},box2d.b2MotorJoint.prototype.SetCorrectionFactor=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a)&&a>=0&&1>=a),this._correctionFactor=a},box2d.b2MotorJoint.prototype.GetCorrectionFactor=function(){return this.m_correctionFactor},box2d.b2MotorJoint.prototype.SetLinearOffset=function(a){box2d.b2IsEqualToV(a,this.m_linearOffset)||(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_linearOffset.Copy(a))},box2d.b2MotorJoint.prototype.GetLinearOffset=function(a){return a.Copy(this.m_linearOffset)},box2d.b2MotorJoint.prototype.SetAngularOffset=function(a){a!==this.m_angularOffset&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_angularOffset=a)},box2d.b2MotorJoint.prototype.GetAngularOffset=function(){return this.m_angularOffset},box2d.b2MotorJoint.prototype.SetMaxForce=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a)&&a>=0),this.m_maxForce=a},box2d.b2MotorJoint.prototype.GetMaxForce=function(){return this.m_maxForce},box2d.b2MotorJoint.prototype.SetMaxTorque=function(a){box2d.ENABLE_ASSERTS&&box2d.b2Assert(box2d.b2IsValid(a)&&a>=0),this.m_maxTorque=a},box2d.b2MotorJoint.prototype.GetMaxTorque=function(){return this.m_maxTorque},box2d.b2MotorJoint.prototype.InitVelocityConstraints=function(a){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var b=a.positions[this.m_indexA].c,c=a.positions[this.m_indexA].a,d=a.velocities[this.m_indexA].v,e=a.velocities[this.m_indexA].w,f=a.positions[this.m_indexB].c,g=a.positions[this.m_indexB].a,h=a.velocities[this.m_indexB].v,i=a.velocities[this.m_indexB].w,j=this.m_qA.SetAngleRadians(c),k=this.m_qB.SetAngleRadians(g),l=box2d.b2MulRV(j,box2d.b2NegV(this.m_localCenterA,box2d.b2Vec2.s_t0),this.m_rA),m=box2d.b2MulRV(k,box2d.b2NegV(this.m_localCenterB,box2d.b2Vec2.s_t0),this.m_rB),n=this.m_invMassA,o=this.m_invMassB,p=this.m_invIA,q=this.m_invIB,r=this.m_K;if(r.ex.x=n+o+p*l.y*l.y+q*m.y*m.y,r.ex.y=-p*l.x*l.y-q*m.x*m.y,r.ey.x=r.ex.y,r.ey.y=n+o+p*l.x*l.x+q*m.x*m.x,r.GetInverse(this.m_linearMass),this.m_angularMass=p+q,this.m_angularMass>0&&(this.m_angularMass=1/this.m_angularMass),box2d.b2SubVV(box2d.b2SubVV(box2d.b2AddVV(f,m,box2d.b2Vec2.s_t0),box2d.b2AddVV(b,l,box2d.b2Vec2.s_t1),box2d.b2Vec2.s_t2),box2d.b2MulRV(j,this.m_linearOffset,box2d.b2Vec2.s_t3),this.m_linearError),this.m_angularError=g-c-this.m_angularOffset,a.step.warmStarting){this.m_linearImpulse.SelfMul(a.step.dtRatio),this.m_angularImpulse*=a.step.dtRatio;var s=this.m_linearImpulse;d.SelfMulSub(n,s),e-=p*(box2d.b2CrossVV(l,s)+this.m_angularImpulse),h.SelfMulAdd(o,s),i+=q*(box2d.b2CrossVV(m,s)+this.m_angularImpulse)}else this.m_linearImpulse.SetZero(),this.m_angularImpulse=0;a.velocities[this.m_indexA].w=e,a.velocities[this.m_indexB].w=i},box2d.b2MotorJoint.prototype.SolveVelocityConstraints=function(a){var b=a.velocities[this.m_indexA].v,c=a.velocities[this.m_indexA].w,d=a.velocities[this.m_indexB].v,e=a.velocities[this.m_indexB].w,f=this.m_invMassA,g=this.m_invMassB,h=this.m_invIA,i=this.m_invIB,j=a.step.dt,k=a.step.inv_dt,l=e-c+k*this.m_correctionFactor*this.m_angularError,m=-this.m_angularMass*l,n=this.m_angularImpulse,o=j*this.m_maxTorque;this.m_angularImpulse=box2d.b2Clamp(this.m_angularImpulse+m,-o,o),m=this.m_angularImpulse-n,c-=h*m,e+=i*m;var p=this.m_rA,q=this.m_rB,l=box2d.b2AddVV(box2d.b2SubVV(box2d.b2AddVV(d,box2d.b2CrossSV(e,q,box2d.b2Vec2.s_t0),box2d.b2Vec2.s_t0),box2d.b2AddVV(b,box2d.b2CrossSV(c,p,box2d.b2Vec2.s_t1),box2d.b2Vec2.s_t1),box2d.b2Vec2.s_t2),box2d.b2MulSV(k*this.m_correctionFactor,this.m_linearError,box2d.b2Vec2.s_t3),box2d.b2MotorJoint.prototype.SolveVelocityConstraints.s_Cdot),m=box2d.b2MulMV(this.m_linearMass,l,box2d.b2MotorJoint.prototype.SolveVelocityConstraints.s_impulse).SelfNeg(),n=box2d.b2MotorJoint.prototype.SolveVelocityConstraints.s_oldImpulse.Copy(this.m_linearImpulse);this.m_linearImpulse.SelfAdd(m);var o=j*this.m_maxForce;this.m_linearImpulse.GetLengthSquared()>o*o&&(this.m_linearImpulse.Normalize(),this.m_linearImpulse.SelfMul(o)),box2d.b2SubVV(this.m_linearImpulse,n,m),b.SelfMulSub(f,m),c-=h*box2d.b2CrossVV(p,m),d.SelfMulAdd(g,m),e+=i*box2d.b2CrossVV(q,m),a.velocities[this.m_indexA].w=c,a.velocities[this.m_indexB].w=e},box2d.b2MotorJoint.prototype.SolveVelocityConstraints.s_Cdot=new box2d.b2Vec2,box2d.b2MotorJoint.prototype.SolveVelocityConstraints.s_impulse=new box2d.b2Vec2,box2d.b2MotorJoint.prototype.SolveVelocityConstraints.s_oldImpulse=new box2d.b2Vec2,box2d.b2MotorJoint.prototype.SolvePositionConstraints=function(){return!0},box2d.b2MotorJoint.prototype.Dump=function(){if(box2d.DEBUG){var a=this.m_bodyA.m_islandIndex,b=this.m_bodyB.m_islandIndex;box2d.b2Log(" /*box2d.b2MotorJointDef*/ var jd = new box2d.b2MotorJointDef();\n"),box2d.b2Log(" jd.bodyA = bodies[%d];\n",a),box2d.b2Log(" jd.bodyB = bodies[%d];\n",b),box2d.b2Log(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),box2d.b2Log(" jd.linearOffset.SetXY(%.15f, %.15f);\n",this.m_linearOffset.x,this.m_linearOffset.y),box2d.b2Log(" jd.angularOffset = %.15f;\n",this.m_angularOffset),box2d.b2Log(" jd.maxForce = %.15f;\n",this.m_maxForce),box2d.b2Log(" jd.maxTorque = %.15f;\n",this.m_maxTorque),box2d.b2Log(" jd.correctionFactor = %.15f;\n",this.m_correctionFactor),box2d.b2Log(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)}},goog.provide("box2d"),goog.require("box2d.b2Settings"),goog.require("box2d.b2Draw"),goog.require("box2d.b2Timer"),goog.require("box2d.b2CircleShape"),goog.require("box2d.b2EdgeShape"),goog.require("box2d.b2ChainShape"),goog.require("box2d.b2PolygonShape"),goog.require("box2d.b2BroadPhase"),goog.require("box2d.b2Distance"),goog.require("box2d.b2DynamicTree"),goog.require("box2d.b2TimeOfImpact"),goog.require("box2d.b2Body"),goog.require("box2d.b2Fixture"),goog.require("box2d.b2WorldCallbacks"),goog.require("box2d.b2TimeStep"),goog.require("box2d.b2World"),goog.require("box2d.b2Contact"),goog.require("box2d.b2AreaJoint"),goog.require("box2d.b2DistanceJoint"),goog.require("box2d.b2FrictionJoint"),goog.require("box2d.b2GearJoint"),goog.require("box2d.b2MotorJoint"),goog.require("box2d.b2MouseJoint"),goog.require("box2d.b2PrismaticJoint"),goog.require("box2d.b2PulleyJoint"),goog.require("box2d.b2RevoluteJoint"),goog.require("box2d.b2RopeJoint"),goog.require("box2d.b2WeldJoint"),goog.require("box2d.b2WheelJoint"),goog.require("box2d.b2Rope"),goog.require("box2d.b2BuoyancyController"),goog.require("box2d.b2ConstantAccelController"),goog.require("box2d.b2ConstantForceController"),goog.require("box2d.b2GravityController"),goog.require("box2d.b2TensorDampingController"),Phaser.Physics.Box2D=function(a,b){this.game=a,this.version="1.0.2",this.ptmRatio=50,this.world=new box2d.b2World(new box2d.b2Vec2(0,0)),this.debugDraw=new Phaser.Physics.Box2D.DefaultDebugDraw(this.mpx(1)),this.world.SetDebugDraw(this.debugDraw),this.contactListener=new Phaser.Physics.Box2D.DefaultContactListener,this.world.SetContactListener(this.contactListener),this.nextBodyId=0,this.nextFixtureId=0,this.gravity=new Phaser.Physics.Box2D.PointProxy(this,this.world,this.world.GetGravity,this.world.SetGravity),this.friction=.2,this.restitution=0,this.density=1,this.frameRate=1/100,this.velocityIterations=3,this.positionIterations=3,this.useElapsedTime=!1,this.paused=!1,this.particleSystem=null;var c=new box2d.b2BodyDef;this.mouseJointBody=this.world.CreateBody(c),this.mouseJoint=null,b.hasOwnProperty("mpx")&&b.hasOwnProperty("pxm")&&(this.mpx=b.mpx,this.pxm=b.pxm),this.walls={left:null,right:null,top:null,bottom:null},this.onBodyAdded=new Phaser.Signal,this.onBodyRemoved=new Phaser.Signal,this._toRemove=[]},Phaser.Physics.Box2D.worldBoundsFilterCategory=32768,Phaser.Physics.Box2D.prototype={getNextBodyId:function(){var a=this.nextBodyId;return this.nextBodyId+=1,a},getNextFixtureId:function(){var a=this.nextFixtureId;return this.nextFixtureId+=1,a},removeBodyNextStep:function(a){this._toRemove.push(a)},preUpdate:function(){for(var a=this._toRemove.length;a--;)this.removeBody(this._toRemove[a]);this._toRemove.length=0},enable:function(a,b){"undefined"==typeof b&&(b=!0);var c=1;if(Array.isArray(a))for(c=a.length;c--;)a[c]instanceof Phaser.Group?this.enable(a[c].children,b):(this.enableBody(a[c]),b&&a[c].hasOwnProperty("children")&&a[c].children.length>0&&this.enable(a[c],!0));else a instanceof Phaser.Group?this.enable(a.children,b):(this.enableBody(a),b&&a.hasOwnProperty("children")&&a.children.length>0&&this.enable(a.children,!0))},enableBody:function(a){a.hasOwnProperty("body")&&null===a.body&&(a.body=new Phaser.Physics.Box2D.Body(this.game,a,a.x,a.y,2),a.anchor.set(.5))},setBoundsToWorld:function(a,b,c,d,e,f){"undefined"==typeof a&&(a=!0),"undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=!0),"undefined"==typeof d&&(d=!0),"undefined"==typeof e&&(e=1),"undefined"==typeof f&&(e=4294967295),this.setBounds(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,a,b,c,d,e,f)},setBounds:function(a,b,c,d,e,f,g,h,i,j){"undefined"==typeof e&&(e=!0),"undefined"==typeof f&&(f=!0),"undefined"==typeof g&&(g=!0),"undefined"==typeof h&&(h=!0),"undefined"==typeof i&&(i=1),"undefined"==typeof j&&(j=4294967295),this.walls.left&&this.removeBody(this.walls.left),this.walls.right&&this.removeBody(this.walls.right),this.walls.top&&this.removeBody(this.walls.top),this.walls.bottom&&this.removeBody(this.walls.bottom);var k=new box2d.b2PolygonShape,l=new box2d.b2FixtureDef;l.shape=k,l.filter.categoryBits=Phaser.Physics.Box2D.worldBoundsFilterCategory,l.filter.maskBits=65535;var m=this.pxm(100),n=this.game.world.bounds;if(e){this.walls.left=this.createBody(0,0,0),k.SetAsOrientedBox(m,this.pxm(n.height)+m,new box2d.b2Vec2(m,0),0);var o=this.walls.left.data.CreateFixture(l);o.id=this.getNextFixtureId()}if(f){this.walls.right=this.createBody(0,0,0),k.SetAsOrientedBox(m,this.pxm(n.height)+m,new box2d.b2Vec2(this.pxm(-n.width)-m,0),0);var o=this.walls.right.data.CreateFixture(l);o.id=this.getNextFixtureId()}if(g){this.walls.top=this.createBody(0,0,0),k.SetAsOrientedBox(this.pxm(n.width)+m,m,new box2d.b2Vec2(0,m),0);var o=this.walls.top.data.CreateFixture(l);o.id=this.getNextFixtureId()}if(h){this.walls.bottom=this.createBody(0,0,0),k.SetAsOrientedBox(this.pxm(n.width)+m,m,new box2d.b2Vec2(0,this.pxm(-n.height)-m),0);var o=this.walls.bottom.data.CreateFixture(l);o.id=this.getNextFixtureId()}},pause:function(){this.paused=!0},resume:function(){this.paused=!1},update:function(){this.paused||(this.useElapsedTime?this.world.Step(this.game.time.physicsElapsed,this.velocityIterations,this.positionIterations):this.world.Step(this.frameRate,this.velocityIterations,this.positionIterations))},reset:function(){this.clear()},clear:function(){var a=this.world.GetGravity().Clone();this.world=new box2d.b2World(a),this.world.SetDebugDraw(this.debugDraw),this.world.SetContactListener(this.contactListener),this._toRemove=[]},destroy:function(){this.clear(),this.gravity=null,this.world=null,this.game=null},createBody:function(a,b,c){var d=new Phaser.Physics.Box2D.Body(this.game,null,a,b,c,this);return d},createCircle:function(a,b,c,d,e){var f=this.createBody(a,b,2);return f.setCircle(c,d,e)},createRectangle:function(a,b,c,d,e,f,g){var h=this.createBody(a,b,2);return h.setRectangle(c,d,e,f,g)},createPolygon:function(a,b,c,d,e){var f=this.createBody(a,b,2);return f.setPolygon(c,d,e)},addBody:function(a){return a.data.world?!1:(a.data=this.world.CreateBody(a.bodyDef),a.data.world=this.world,a.data.parent=a,this.onBodyAdded.dispatch(a),!0)},removeBody:function(a){return a.data.world==this.world&&(this.world.DestroyBody(a.data),this.onBodyRemoved.dispatch(a)),a},getBodies:function(){for(var a=[],b=this.world.GetBodyList();b;b=b.GetNext())a.push(b);return a},getBody:function(a){return a instanceof box2d.b2Body?a:a instanceof Phaser.Physics.Box2D.Body?a.data:a.body&&a.body.type===Phaser.Physics.BOX2D?a.body.data:null},toJSON:function(){return this.world.toJSON()},mpx:function(a){return a*=this.ptmRatio},pxm:function(a){return a/this.ptmRatio},renderDebugDraw:function(a){if(this.game.physics.box2d){var b=this.game.physics.box2d;b.debugDraw.start(a),b.world.DrawDebugData(),b.debugDraw.stop()}},renderBodyInfo:function(a,b){a.line("Position: x: "+b.x.toFixed(3)+" y: "+b.y.toFixed(3)),a.line("Rotation: "+b.rotation.toFixed(3)+" degrees"),a.line("Velocity: x: "+b.velocity.x.toFixed(3)+" y: "+b.velocity.y.toFixed(3)),a.line("Angular velocity: "+b.angularVelocity.toFixed(3)+" degrees/sec")},getFixturesAtPoint:function(a,b,c,d){"undefined"==typeof c&&(c=!1),"undefined"==typeof d&&(d=!1);var e=this.pxm(-a),f=this.pxm(-b),g=new box2d.b2Vec2(e,f),h=new box2d.b2AABB,i=new box2d.b2Vec2;i.SetXY(.001,.001),box2d.b2SubVV(g,i,h.lowerBound),box2d.b2AddVV(g,i,h.upperBound);var j=[],k=function(a){return d&&a.GetBody().GetType()!==box2d.b2BodyType.b2_dynamicBody?!0:a.TestPoint(g)?(j.push(a),!c):!0};return this.world.QueryAABB(k,h),j},getBodiesAtPoint:function(a,b,c,d){"undefined"==typeof c&&(c=!1),"undefined"==typeof d&&(d=!1);var e=this.getFixturesAtPoint(a,b,c,d);if(e.length<1)return e;for(var f=[],g=0;gh;h++){e=0;for(var j=0,k=a.layers[b].width;k>j;j++){var l=a.layers[b].data[h][j];if(l&&l.index>-1&&l.collides)if(d){var m=a.getTileRight(b,j,h);if(0===e&&(f=l.x*l.width,g=l.y*l.height,e=l.width),m&&m.collides)e+=l.width;else{var n=new Phaser.Physics.Box2D.Body(this.game,null,f,g,0);n.addRectangle(e,l.height,e/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n),e=0}}else{var n=this.createBody(l.x*l.width,l.y*l.height,0,!1);n.addRectangle(l.width,l.height,l.width/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n)}}}return a.layers[b].bodies},raycast:function(a,b,c,d,e,f){"undefined"==typeof e&&(e=!0),"undefined"==typeof f&&(f=null),a=this.pxm(-a),b=this.pxm(-b),c=this.pxm(-c),d=this.pxm(-d);var g=new box2d.b2Vec2(a,b),h=new box2d.b2Vec2(c,d),i=[],j=new Phaser.Physics.Box2D.RayCastCallback(this,e,f);this.world.RayCast(j,g,h);for(var k=0;k-1&&(null===b?(delete this._bodyContactCallbacks[d],delete this._bodyContactCallbackContext[d]):(this._bodyContactCallbacks[d]=b,this._bodyContactCallbackContext[d]=c))},setFixtureContactCallback:function(a,b,c){var d=a.id;d>-1&&(null===b?(delete this._fixtureContactCallbacks[d],delete this._fixtureContactCallbackContext[d]):(this._fixtureContactCallbacks[d]=b,this._fixtureContactCallbackContext[d]=c))},setCategoryContactCallback:function(a,b,c){null===b?(delete this._categoryContactCallbacks[a],delete this._categoryContactCallbacksContext[a]):(this._categoryContactCallbacks[a]=b,this._categoryContactCallbackContext[a]=c)},setBodyPresolveCallback:function(a,b,c){var d=-1;a.id?d=a.id:a.body&&(d=a.body.id),d>-1&&(null===b?(delete this._bodyPresolveCallbacks[d],delete this._bodyPresolveCallbackContext[d]):(this._bodyPresolveCallbacks[d]=b,this._bodyPresolveCallbackContext[d]=c))},setFixturePresolveCallback:function(a,b,c){var d=a.id;d>-1&&(null===b?(delete this._fixturePresolveCallbacks[d],delete this._fixturePresolveCallbackContext[d]):(this._fixturePresolveCallbacks[d]=b,this._fixturePresolveCallbackContext[d]=c))},setCategoryPresolveCallback:function(a,b,c){null===b?(delete this._categoryPresolveCallbacks[a],delete this._categoryPresolveCallbacksContext[a]):(this._categoryPresolveCallbacks[a]=b,this._categoryPresolveCallbackContext[a]=c)},setBodyPostsolveCallback:function(a,b,c){var d=-1;a.id?d=a.id:a.body&&(d=a.body.id),d>-1&&(null===b?(delete this._bodyPostsolveCallbacks[d],delete this._bodyPostsolveCallbackContext[d]):(this._bodyPostsolveCallbacks[d]=b,this._bodyPostsolveCallbackContext[d]=c))},setFixturePostsolveCallback:function(a,b,c){var d=a.id;d>-1&&(null===b?(delete this._fixturePostsolveCallbacks[d],delete this._fixturePostsolveCallbackContext[d]):(this._fixturePostsolveCallbacks[d]=b,this._fixturePostsolveCallbackContext[d]=c))},setCategoryPostsolveCallback:function(a,b,c){null===b?(delete this._categoryPostsolveCallbacks[a],delete this._categoryPostsolveCallbacksContext[a]):(this._categoryPostsolveCallbacks[a]=b,this._categoryPostsolveCallbackContext[a]=c)},setCollisionCategory:function(a,b){if("undefined"==typeof b)for(var c=this.data.GetFixtureList();c;c=c.GetNext()){var d=c.GetFilterData();d.categoryBits=a}else{var d=b.GetFilterData();d.categoryBits=a}},setCollisionMask:function(a,b){if("undefined"==typeof b)for(var c=this.data.GetFixtureList();c;c=c.GetNext()){var d=c.GetFilterData();d.maskBits=a}else{var d=b.GetFilterData();d.maskBits=a}},applyForce:function(a,b){this.data.ApplyForce(new box2d.b2Vec2(-a,-b),this.data.GetWorldCenter(),!0)},setZeroRotation:function(){this.data.SetAngularVelocity(0)},setZeroVelocity:function(){this.data.SetLinearVelocity(box2d.b2Vec2.ZERO)},setZeroDamping:function(){this.data.SetLinearDamping(0),this.data.SetAngularDamping(0)},toLocalPoint:function(a,b){return a.x=this.world.pxm(-b.x),a.y=this.world.pxm(-b.y),this.data.GetLocalPoint(a,a),a.x=this.world.mpx(-a.x),a.y=this.world.mpx(-a.y),a},toWorldPoint:function(a,b){return a.x=this.world.pxm(-b.x),a.y=this.world.pxm(-b.y),this.data.GetWorldPoint(a,a),a.x=this.world.mpx(-a.x),a.y=this.world.mpx(-a.y),a},toLocalVector:function(a,b){return a.x=this.world.pxm(-b.x),a.y=this.world.pxm(-b.y),this.data.GetLocalVector(a,a),a.x=this.world.mpx(-a.x),a.y=this.world.mpx(-a.y),a},toWorldVector:function(a,b){a.x=this.world.pxm(-b.x),a.y=this.world.pxm(-b.y),this.data.GetWorldVector(a,a),a.x=this.world.mpx(-a.x),a.y=this.world.mpx(-a.y)},rotateLeft:function(a){this.data.SetAngularVelocity(this.world.pxm(-a))},rotateRight:function(a){this.data.SetAngularVelocity(this.world.pxm(a))},moveForward:function(a){var b=this.world.pxm(a),c=new box2d.b2Vec2;this.toWorldVector(c,{x:0,y:b}),this.data.SetLinearVelocity(c)},moveBackward:function(a){var b=this.world.pxm(-a),c=new box2d.b2Vec2;this.toWorldVector(c,{x:0,y:b}),this.data.SetLinearVelocity(c)},thrust:function(a){var b=this.world.pxm(a)*this.data.GetMass(),c=new box2d.b2Vec2;this.toWorldVector(c,{x:0,y:b}),this.data.ApplyForce(c,this.data.GetWorldCenter(),!0)},reverse:function(a){var b=-this.world.pxm(a)*this.data.GetMass(),c=new box2d.b2Vec2;this.toWorldVector(c,{x:0,y:b}),this.data.ApplyForce(c,this.data.GetWorldCenter(),!0)},moveLeft:function(a){this.velocity.x=-a},moveRight:function(a){this.velocity.x=a},moveUp:function(a){this.velocity.y=-a},moveDown:function(a){this.velocity.y=a},preUpdate:function(){this.removeNextStep&&(this.removeFromWorld(),this.removeNextStep=!1)},postUpdate:function(){this.sprite&&(this.sprite.x=this.world.mpx(-this.data.GetPosition().x),this.sprite.y=this.world.mpx(-this.data.GetPosition().y),this.sprite.rotation=this.data.GetAngle())},kill:function(){this.data.SetActive(!1)},reset:function(a,b){this.data.SetPositionXY(this.world.pxm(-a),this.world.pxm(-b)),this.data.SetActive(!0)},removeFromWorld:function(){this.data.world===this.game.physics.box2d.world&&this.game.physics.box2d.removeBodyNextStep(this)},destroy:function(){this.removeFromWorld(),this._bodyCallbacks={},this._bodyCallbackContext={},this._categoryCallbacks={},this._categoryCallbackContext={},this.sprite=null},clearFixtures:function(){for(var a=[],b=this.data.GetFixtureList();b;b=b.GetNext())a.push(b);for(var c=a.length;c--;)this.data.DestroyFixture(a[c])},addCircle:function(a,b,c){var d=new box2d.b2CircleShape(this.world.pxm(a));d.m_p.SetXY(this.world.pxm(-b),this.world.pxm(-c));var e=new box2d.b2FixtureDef;e.shape=d,e.friction=this.world.friction,e.restitution=this.world.restitution,e.density=this.world.density;var f=this.data.CreateFixture(e);return f.id=this.world.getNextFixtureId(),f},addRectangle:function(a,b,c,d,e){"undefined"==typeof a&&(a=16),"undefined"==typeof b&&(b=16),"undefined"==typeof c&&(c=0),"undefined"==typeof d&&(d=0),"undefined"==typeof e&&(e=0),a=this.world.pxm(a),b=this.world.pxm(b);var f=new box2d.b2PolygonShape;f.SetAsOrientedBox(.5*a,.5*b,new box2d.b2Vec2(this.world.pxm(-c),this.world.pxm(-d)),e);var g=new box2d.b2FixtureDef;g.shape=f,g.friction=this.world.friction,g.restitution=this.world.restitution,g.density=this.world.density;var h=this.data.CreateFixture(g);return h.id=this.world.getNextFixtureId(),h},addEdge:function(a,b,c,d){var e=new box2d.b2EdgeShape;e.Set(new box2d.b2Vec2(this.world.pxm(-a),this.world.pxm(-b)),new box2d.b2Vec2(this.world.pxm(-c),this.world.pxm(-d)));var f=new box2d.b2FixtureDef;f.shape=e,f.friction=this.world.friction,f.restitution=this.world.restitution,f.density=this.world.density;var g=this.data.CreateFixture(f);return g.id=this.world.getNextFixtureId(),g},addChain:function(a,b,c,d){if("undefined"==typeof a)return null;if(a.length<4)return null;"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=(a.length-b)/2);for(var e=[],f=b;b+c>f;f++)e.push(new box2d.b2Vec2(this.world.pxm(-a[2*f]),this.world.pxm(-a[2*f+1])));var g=new box2d.b2ChainShape;d?g.CreateLoop(e,e.length):g.CreateChain(e,e.length);var h=new box2d.b2FixtureDef;h.shape=g,h.friction=this.world.friction,h.restitution=this.world.restitution,h.density=this.world.density;var i=this.data.CreateFixture(h);return i.id=this.world.getNextFixtureId(),i},addLoop:function(a,b,c){return this.addChain(a,b,c,!0)},addPolygon:function(a,b,c){if("undefined"==typeof a)return null;if(a.length<6)return null;"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=(a.length-b)/2);for(var d=[],e=b;b+c>e;e++)d.push({x:this.world.pxm(-a[2*e]),y:this.world.pxm(-a[2*e+1])});var f=new Phaser.Physics.Box2D.Polygon;f.setFromXYObjects(d);for(var g=f.decompose(d),h=null,e=0;ee;e++)d.lineTo(a[e].x,a[e].y);d.closePath(),d.strokeStyle=c.MakeStyleString(1),d.stroke()}},Phaser.Physics.Box2D.DefaultDebugDraw.prototype.DrawSolidPolygon=function(a,b,c){if(b){var d=this.context;d.lineWidth=1/this.pixelsPerMeter,d.beginPath(),d.moveTo(a[0].x,a[0].y);for(var e=1;b>e;e++)d.lineTo(a[e].x,a[e].y);d.closePath(),d.fillStyle=c.MakeStyleString(.5),d.fill(),d.strokeStyle=c.MakeStyleString(1),d.stroke()}},Phaser.Physics.Box2D.DefaultDebugDraw.prototype.DrawCircle=function(a,b,c){if(b){var d=this.context;d.beginPath(),d.arc(a.x,a.y,b,0,2*Math.PI,!0),d.strokeStyle=c.MakeStyleString(1),d.stroke()}},Phaser.Physics.Box2D.DefaultDebugDraw.prototype.DrawSolidCircle=function(a,b,c,d){if(b){var e=this.context;e.lineWidth=1/this.pixelsPerMeter;var f=a.x,g=a.y;e.beginPath(),e.arc(f,g,b,0,2*Math.PI,!0),e.moveTo(f,g),e.lineTo(f+c.x*b,g+c.y*b),e.fillStyle=d.MakeStyleString(.5),e.fill(),e.strokeStyle=d.MakeStyleString(1),e.stroke()}},Phaser.Physics.Box2D.DefaultDebugDraw.prototype.DrawSegment=function(a,b,c){var d=this.context;d.lineWidth=1/this.pixelsPerMeter,d.beginPath(),d.moveTo(a.x,a.y),d.lineTo(b.x,b.y),d.strokeStyle=c.MakeStyleString(1),d.stroke()},Phaser.Physics.Box2D.DefaultDebugDraw.prototype.DrawTransform=function(a){var b=this.context;b.lineWidth=1/this.pixelsPerMeter,this.PushTransform(a),b.beginPath(),b.moveTo(0,0),b.lineTo(1,0),b.strokeStyle=box2d.b2Color.RED.MakeStyleString(1),b.stroke(),b.beginPath(),b.moveTo(0,0),b.lineTo(0,1),b.strokeStyle=box2d.b2Color.GREEN.MakeStyleString(1),b.stroke(),this.PopTransform(a)},Phaser.Physics.Box2D.DefaultDebugDraw.prototype.DrawPoint=function(a,b,c){var d=this.context;d.fillStyle=c.MakeStyleString();var e=b/2;d.fillRect(a.x-e,a.y-e,b,b)},Phaser.Physics.Box2D.DefaultDebugDraw.prototype.DrawAABB=function(a,b){var c=this.context;c.strokeStyle=b.MakeStyleString();var d=a.lowerBound.x,e=a.lowerBound.y,f=a.upperBound.x-a.lowerBound.x,g=a.upperBound.y-a.lowerBound.y;c.strokeRect(d,e,f,g)},Object.defineProperty(Phaser.Physics.Box2D.DefaultDebugDraw.prototype,"shapes",{get:function(){return this.flags&box2d.b2DrawFlags.e_shapeBit},set:function(a){a?this.flags|=box2d.b2DrawFlags.e_shapeBit:this.flags&=~box2d.b2DrawFlags.e_shapeBit}}),Object.defineProperty(Phaser.Physics.Box2D.DefaultDebugDraw.prototype,"joints",{get:function(){return this.flags&box2d.b2DrawFlags.e_jointBit},set:function(a){a?this.flags|=box2d.b2DrawFlags.e_jointBit:this.flags&=~box2d.b2DrawFlags.e_jointBit}}),Object.defineProperty(Phaser.Physics.Box2D.DefaultDebugDraw.prototype,"aabbs",{get:function(){return this.flags&box2d.b2DrawFlags.e_aabbBit},set:function(a){a?this.flags|=box2d.b2DrawFlags.e_aabbBit:this.flags&=~box2d.b2DrawFlags.e_aabbBit}}),Object.defineProperty(Phaser.Physics.Box2D.DefaultDebugDraw.prototype,"pairs",{get:function(){return this.flags&box2d.b2DrawFlags.e_pairBit},set:function(a){a?this.flags|=box2d.b2DrawFlags.e_pairBit:this.flags&=~box2d.b2DrawFlags.e_pairBit}}),Object.defineProperty(Phaser.Physics.Box2D.DefaultDebugDraw.prototype,"centerOfMass",{get:function(){return this.flags&box2d.b2DrawFlags.e_centerOfMassBit},set:function(a){a?this.flags|=box2d.b2DrawFlags.e_centerOfMassBit:this.flags&=~box2d.b2DrawFlags.e_centerOfMassBit}}),Phaser.Physics.Box2D.DefaultContactListener=function(){},Phaser.Physics.Box2D.DefaultContactListener.prototype.BeginContact=function(a){this.handleContactBeginOrEnd(a,!0)},Phaser.Physics.Box2D.DefaultContactListener.prototype.EndContact=function(a){this.handleContactBeginOrEnd(a,!1)},Phaser.Physics.Box2D.DefaultContactListener.prototype.handleContactBeginOrEnd=function(a,b){var c=a.GetFixtureA(),d=a.GetFixtureB(),e=c.GetBody(),f=d.GetBody(),g=c.GetFilterData().categoryBits,h=d.GetFilterData().categoryBits,i=e.parent,j=f.parent;if(void 0!==i&&void 0!==j){var k=i.id,l=j.id;i._bodyContactCallbacks[l]&&i._bodyContactCallbacks[l].call(i._bodyContactCallbackContext[l],i,j,c,d,b,a),j._bodyContactCallbacks[k]&&j._bodyContactCallbacks[k].call(j._bodyContactCallbackContext[k],j,i,d,c,b,a),i._fixtureContactCallbacks[d.id]&&i._fixtureContactCallbacks[d.id].call(i._fixtureContactCallbackContext[d.id],i,j,c,d,b,a),j._fixtureContactCallbacks[c.id]&&j._fixtureContactCallbacks[c.id].call(j._fixtureContactCallbackContext[c.id],j,i,d,c,b,a),i._fixtureContactCallbacks[c.id]&&i._fixtureContactCallbacks[c.id].call(i._fixtureContactCallbackContext[c.id],i,j,c,d,b,a),j._fixtureContactCallbacks[d.id]&&j._fixtureContactCallbacks[d.id].call(j._fixtureContactCallbackContext[d.id],j,i,d,c,b,a),i._categoryContactCallbacks[h]&&i._categoryContactCallbacks[h].call(i._categoryContactCallbackContext[h],i,j,c,d,b,a),j._categoryContactCallbacks[g]&&j._categoryContactCallbacks[g].call(j._categoryContactCallbackContext[g],j,i,d,c,b,a),i._categoryContactCallbacks[g]&&i._categoryContactCallbacks[g].call(i._categoryContactCallbackContext[g],i,j,c,d,b,a),j._categoryContactCallbacks[h]&&j._categoryContactCallbacks[h].call(j._categoryContactCallbackContext[h],j,i,d,c,b,a)}},Phaser.Physics.Box2D.DefaultContactListener.prototype.PreSolve=function(a,b){var c=a.GetFixtureA(),d=a.GetFixtureB(),e=c.GetBody(),f=d.GetBody(),g=c.GetFilterData().categoryBits,h=d.GetFilterData().categoryBits,i=e.parent,j=f.parent;if(void 0!==i&&void 0!==j){var k=i.id,l=j.id;i._bodyPresolveCallbacks[l]&&i._bodyPresolveCallbacks[l].call(i._bodyPresolveCallbackContext[l],i,j,c,d,a,b),j._bodyPresolveCallbacks[k]&&j._bodyPresolveCallbacks[k].call(j._bodyPresolveCallbackContext[k],j,i,d,c,a,b),i._fixturePresolveCallbacks[d.id]&&i._fixturePresolveCallbacks[d.id].call(i._fixturePresolveCallbackContext[d.id],i,j,c,d,a,b),j._fixturePresolveCallbacks[c.id]&&j._fixturePresolveCallbacks[c.id].call(j._fixturePresolveCallbackContext[c.id],j,i,d,c,a,b),i._categoryPresolveCallbacks[h]&&i._categoryPresolveCallbacks[h].call(i._categoryPresolveCallbackContext[h],i,j,c,d,a,b),j._categoryPresolveCallbacks[g]&&j._categoryPresolveCallbacks[g].call(j._categoryPresolveCallbackContext[g],j,i,d,c,a,b)}},Phaser.Physics.Box2D.DefaultContactListener.prototype.PostSolve=function(a,b){var c=a.GetFixtureA(),d=a.GetFixtureB(),e=c.GetBody(),f=d.GetBody(),g=c.GetFilterData().categoryBits,h=d.GetFilterData().categoryBits,i=e.parent,j=f.parent;if(void 0!==i&&void 0!==j){var k=i.id,l=j.id;i._bodyPostsolveCallbacks[l]&&i._bodyPostsolveCallbacks[l].call(i._bodyPostsolveCallbackContext[l],i,j,c,d,a,b),j._bodyPostsolveCallbacks[k]&&j._bodyPostsolveCallbacks[k].call(j._bodyPostsolveCallbackContext[k],j,i,d,c,a,b),i._fixturePostsolveCallbacks[d.id]&&i._fixturePostsolveCallbacks[d.id].call(i._fixturePostsolveCallbackContext[d.id],i,j,c,d,a,b),j._fixturePostsolveCallbacks[c.id]&&j._fixturePostsolveCallbacks[c.id].call(j._fixturePostsolveCallbackContext[c.id],j,i,d,c,a,b),i._categoryPostsolveCallbacks[h]&&i._categoryPostsolveCallbacks[h].call(i._categoryPostsolveCallbackContext[h],i,j,c,d,a,b),j._categoryPostsolveCallbacks[g]&&j._categoryPostsolveCallbacks[g].call(j._categoryPostsolveCallbackContext[g],j,i,d,c,a,b)}},Phaser.Physics.Box2D.Polygon=function(){this.vertices=[]},Phaser.Physics.Box2D.Polygon.prototype.setFromFlatXYCoords=function(a){this.vertices=[];for(var b=0;ba?a%b+b:a%b]},Phaser.Physics.Box2D.Polygon.prototype.indicesAreAdjacent=function(a,b){if(a%=this.vertices.length,b%=this.vertices.length,a==b)return!0;var c=Math.abs(a-b);return 2>c?!0:c==this.vertices.length-1?!0:!1},Phaser.Physics.Box2D.Polygon.prototype.areaInTriangle=function(a,b,c){return a=this.at(a),b=this.at(b),c=this.at(c),.5*((b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y))},Phaser.Physics.Box2D.Polygon.prototype.left=function(a,b,c){return this.areaInTriangle(a,b,c)>0},Phaser.Physics.Box2D.Polygon.prototype.leftOn=function(a,b,c){return this.areaInTriangle(a,b,c)>=0},Phaser.Physics.Box2D.Polygon.prototype.right=function(a,b,c){return this.areaInTriangle(a,b,c)<0},Phaser.Physics.Box2D.Polygon.prototype.rightOn=function(a,b,c){return this.areaInTriangle(a,b,c)<=0},Phaser.Physics.Box2D.Polygon.sqdist=function(a,b){var c=b.x-a.x,d=b.y-a.y;return c*c+d*d},Phaser.Physics.Box2D.Polygon.prototype.makeCCW=function(){for(var a=0,b=1,c=this.vertices.length;c>b;b++)(this.at(b).ythis.at(a).x)&&(a=b);return this.left(a-1,a,a+1)?!1:(this.vertices.reverse(),!0)},Phaser.Physics.Box2D.Polygon.prototype.isConvex=function(){for(var a=!1,b=!1,c=0,d=this.vertices.length;d>c;c++){var e=c,f=(c+1)%d,g=(c+2)%d;this.areaInTriangle(this.vertices[e],this.vertices[f],this.vertices[g])>0?a=!0:b=!0}return b^a},Phaser.Physics.Box2D.Polygon.prototype.isReflex=function(a){return this.right(a-1,a,a+1)},Phaser.Physics.Box2D.Polygon.areVecsEqual=function(a,b){return a.x==b.x&&a.y==b.y},Phaser.Physics.Box2D.Polygon.linesCross=function(a,b,c,d){if(Phaser.Physics.Box2D.Polygon.areVecsEqual(b,c)||Phaser.Physics.Box2D.Polygon.areVecsEqual(a,c)||Phaser.Physics.Box2D.Polygon.areVecsEqual(b,d)||Phaser.Physics.Box2D.Polygon.areVecsEqual(a,d))return null;var e={};box2d.b2SubVV(b,a,e),box2d.b2CrossVS(e,1,e);var f=box2d.b2DotVV(e,a),g=box2d.b2DotVV(e,c),h=box2d.b2DotVV(e,d);if(g>f&&h>f)return null;if(f>g&&f>h)return null;var i={};box2d.b2SubVV(d,c,i),box2d.b2CrossVS(i,1,i);var g=box2d.b2DotVV(i,c),f=box2d.b2DotVV(i,a),j=box2d.b2DotVV(i,b);if(f>g&&j>g)return null;if(g>f&&g>j)return null;var k=(g-f)/(j-f),l={x:a.x+k*(b.x-a.x),y:a.y+k*(b.y-a.y)};return l},Phaser.Physics.Box2D.Polygon.prototype.canSee=function(a,b){if(this.indicesAreAdjacent(a,b))return!1;if(this.leftOn(a+1,a,b)&&this.rightOn(a-1,a,b))return!1;for(var c=0;ca)for(var d=a;b+1>d;d++)c.addVertex(this.at(d));else{for(var d=a;dd;d++)c.addVertex(this.at(d))}return c},Phaser.Physics.Box2D.Polygon.prototype.decomposeOptimal=function(a){if("undefined"==typeof a&&(a=0),a>1)return this.vertices;this.makeCCW();for(var b=[],c=[],d=[],e=Number.MAX_VALUE,f=0;fm&&(b=g,c=i,e=m)}}if(!f&&this.vertices.length>8&&(b=0,c=Math.floor(this.vertices.length/2),f=!0),f){var n=this.subPolygon(b,c).decompose(a+1),o=this.subPolygon(c,b).decompose(a+1);d=n.concat(o)}return 0===d.length&&d.push(this.vertices),d}; \ No newline at end of file diff --git a/jellytruck/js/lib/phaser.min.js b/jellytruck/js/lib/phaser.min.js new file mode 100644 index 0000000000000000000000000000000000000000..c187df5bee8d41bab512c8223c1febd6d16eee47 --- /dev/null +++ b/jellytruck/js/lib/phaser.min.js @@ -0,0 +1,17583 @@ +/* Phaser v2.6.2 - http://phaser.io - @photonstorm - (c) 2016 Photon Storm Ltd. */ ! function(a) { + if ("object" == typeof exports) module.exports = a(); + else if ("function" == typeof define, 1) { + var b; + "undefined" != typeof window ? b = window : "undefined" != typeof global ? b = global : "undefined" != typeof self && (b = self), b.p2 = a() + } else define(a) +}(function() { + return function a(b, c, d) { + function e(g, h) { + if (!c[g]) { + if (!b[g]) { + var i = "function" == typeof require && require; + if (!h && i) return i(g, !0); + if (f) return f(g, !0); + throw new Error("Cannot find module '" + g + "'") + } + var j = c[g] = { + exports: {} + }; + b[g][0].call(j.exports, function(a) { + var c = b[g][1][a]; + return e(c ? c : a) + }, j, j.exports, a, b, c, d) + } + return c[g].exports + } + for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]); + return e + }({ + 1: [function(a, b, c) { + function d() {} + var e = a("./Scalar"); + b.exports = d, d.lineInt = function(a, b, c) { + c = c || 0; + var d, f, g, h, i, j, k, l = [0, 0]; + return d = a[1][1] - a[0][1], f = a[0][0] - a[1][0], g = d * a[0][0] + f * a[0][1], h = b[1][1] - b[0][1], i = b[0][0] - b[1][0], j = h * b[0][0] + i * b[0][1], k = d * i - h * f, e.eq(k, 0, c) || (l[0] = (i * g - f * j) / k, l[1] = (d * j - h * g) / k), l + }, d.segmentsIntersect = function(a, b, c, d) { + var e = b[0] - a[0], + f = b[1] - a[1], + g = d[0] - c[0], + h = d[1] - c[1]; + if (g * f - h * e == 0) return !1; + var i = (e * (c[1] - a[1]) + f * (a[0] - c[0])) / (g * f - h * e), + j = (g * (a[1] - c[1]) + h * (c[0] - a[0])) / (h * e - g * f); + return i >= 0 && i <= 1 && j >= 0 && j <= 1 + } + }, { + "./Scalar": 4 + }], + 2: [function(a, b, c) { + function d() {} + b.exports = d, d.area = function(a, b, c) { + return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]) + }, d.left = function(a, b, c) { + return d.area(a, b, c) > 0 + }, d.leftOn = function(a, b, c) { + return d.area(a, b, c) >= 0 + }, d.right = function(a, b, c) { + return d.area(a, b, c) < 0 + }, d.rightOn = function(a, b, c) { + return d.area(a, b, c) <= 0 + }; + var e = [], + f = []; + d.collinear = function(a, b, c, g) { + if (g) { + var h = e, + i = f; + h[0] = b[0] - a[0], h[1] = b[1] - a[1], i[0] = c[0] - b[0], i[1] = c[1] - b[1]; + var j = h[0] * i[0] + h[1] * i[1], + k = Math.sqrt(h[0] * h[0] + h[1] * h[1]), + l = Math.sqrt(i[0] * i[0] + i[1] * i[1]), + m = Math.acos(j / (k * l)); + return m < g + } + return 0 == d.area(a, b, c) + }, d.sqdist = function(a, b) { + var c = b[0] - a[0], + d = b[1] - a[1]; + return c * c + d * d + } + }, {}], + 3: [function(a, b, c) { + function d() { + this.vertices = [] + } + + function e(a, b, c, d, e) { + e = e || 0; + var f = b[1] - a[1], + g = a[0] - b[0], + i = f * a[0] + g * a[1], + j = d[1] - c[1], + k = c[0] - d[0], + l = j * c[0] + k * c[1], + m = f * k - j * g; + return h.eq(m, 0, e) ? [0, 0] : [(k * i - g * l) / m, (f * l - j * i) / m] + } + var f = a("./Line"), + g = a("./Point"), + h = a("./Scalar"); + b.exports = d, d.prototype.at = function(a) { + var b = this.vertices, + c = b.length; + return b[a < 0 ? a % c + c : a % c] + }, d.prototype.first = function() { + return this.vertices[0] + }, d.prototype.last = function() { + return this.vertices[this.vertices.length - 1] + }, d.prototype.clear = function() { + this.vertices.length = 0 + }, d.prototype.append = function(a, b, c) { + if ("undefined" == typeof b) throw new Error("From is not given!"); + if ("undefined" == typeof c) throw new Error("To is not given!"); + if (c - 1 < b) throw new Error("lol1"); + if (c > a.vertices.length) throw new Error("lol2"); + if (b < 0) throw new Error("lol3"); + for (var d = b; d < c; d++) this.vertices.push(a.vertices[d]) + }, d.prototype.makeCCW = function() { + for (var a = 0, b = this.vertices, c = 1; c < this.vertices.length; ++c)(b[c][1] < b[a][1] || b[c][1] == b[a][1] && b[c][0] > b[a][0]) && (a = c); + g.left(this.at(a - 1), this.at(a), this.at(a + 1)) || this.reverse() + }, d.prototype.reverse = function() { + for (var a = [], b = 0, c = this.vertices.length; b !== c; b++) a.push(this.vertices.pop()); + this.vertices = a + }, d.prototype.isReflex = function(a) { + return g.right(this.at(a - 1), this.at(a), this.at(a + 1)) + }; + var i = [], + j = []; + d.prototype.canSee = function(a, b) { + var c, d, e = i, + h = j; + if (g.leftOn(this.at(a + 1), this.at(a), this.at(b)) && g.rightOn(this.at(a - 1), this.at(a), this.at(b))) return !1; + d = g.sqdist(this.at(a), this.at(b)); + for (var k = 0; k !== this.vertices.length; ++k) + if ((k + 1) % this.vertices.length !== a && k !== a && g.leftOn(this.at(a), this.at(b), this.at(k + 1)) && g.rightOn(this.at(a), this.at(b), this.at(k)) && (e[0] = this.at(a), e[1] = this.at(b), h[0] = this.at(k), h[1] = this.at(k + 1), c = f.lineInt(e, h), g.sqdist(this.at(a), c) < d)) return !1; + return !0 + }, d.prototype.copy = function(a, b, c) { + var e = c || new d; + if (e.clear(), a < b) + for (var f = a; f <= b; f++) e.vertices.push(this.vertices[f]); + else { + for (var f = 0; f <= b; f++) e.vertices.push(this.vertices[f]); + for (var f = a; f < this.vertices.length; f++) e.vertices.push(this.vertices[f]) + } + return e + }, d.prototype.getCutEdges = function() { + for (var a = [], b = [], c = [], e = new d, f = Number.MAX_VALUE, g = 0; g < this.vertices.length; ++g) + if (this.isReflex(g)) + for (var h = 0; h < this.vertices.length; ++h) + if (this.canSee(g, h)) { + b = this.copy(g, h, e).getCutEdges(), c = this.copy(h, g, e).getCutEdges(); + for (var i = 0; i < c.length; i++) b.push(c[i]); + b.length < f && (a = b, f = b.length, a.push([this.at(g), this.at(h)])) + } return a + }, d.prototype.decomp = function() { + var a = this.getCutEdges(); + return a.length > 0 ? this.slice(a) : [this] + }, d.prototype.slice = function(a) { + if (0 == a.length) return [this]; + if (a instanceof Array && a.length && a[0] instanceof Array && 2 == a[0].length && a[0][0] instanceof Array) { + for (var b = [this], c = 0; c < a.length; c++) + for (var d = a[c], e = 0; e < b.length; e++) { + var f = b[e], + g = f.slice(d); + if (g) { + b.splice(e, 1), b.push(g[0], g[1]); + break + } + } + return b + } + var d = a, + c = this.vertices.indexOf(d[0]), + e = this.vertices.indexOf(d[1]); + return c != -1 && e != -1 && [this.copy(c, e), this.copy(e, c)] + }, d.prototype.isSimple = function() { + for (var a = this.vertices, b = 0; b < a.length - 1; b++) + for (var c = 0; c < b - 1; c++) + if (f.segmentsIntersect(a[b], a[b + 1], a[c], a[c + 1])) return !1; + for (var b = 1; b < a.length - 2; b++) + if (f.segmentsIntersect(a[0], a[a.length - 1], a[b], a[b + 1])) return !1; + return !0 + }, d.prototype.quickDecomp = function(a, b, c, f, h, i) { + h = h || 100, i = i || 0, f = f || 25, a = "undefined" != typeof a ? a : [], b = b || [], c = c || []; + var j = [0, 0], + k = [0, 0], + l = [0, 0], + m = 0, + n = 0, + o = 0, + p = 0, + q = 0, + r = 0, + s = 0, + t = new d, + u = new d, + v = this, + w = this.vertices; + if (w.length < 3) return a; + if (i++, i > h) return console.warn("quickDecomp: max level (" + h + ") reached."), a; + for (var x = 0; x < this.vertices.length; ++x) + if (v.isReflex(x)) { + b.push(v.vertices[x]), m = n = Number.MAX_VALUE; + for (var y = 0; y < this.vertices.length; ++y) g.left(v.at(x - 1), v.at(x), v.at(y)) && g.rightOn(v.at(x - 1), v.at(x), v.at(y - 1)) && (l = e(v.at(x - 1), v.at(x), v.at(y), v.at(y - 1)), g.right(v.at(x + 1), v.at(x), l) && (o = g.sqdist(v.vertices[x], l), o < n && (n = o, k = l, r = y))), g.left(v.at(x + 1), v.at(x), v.at(y + 1)) && g.rightOn(v.at(x + 1), v.at(x), v.at(y)) && (l = e(v.at(x + 1), v.at(x), v.at(y), v.at(y + 1)), g.left(v.at(x - 1), v.at(x), l) && (o = g.sqdist(v.vertices[x], l), o < m && (m = o, j = l, q = y))); + if (r == (q + 1) % this.vertices.length) l[0] = (k[0] + j[0]) / 2, l[1] = (k[1] + j[1]) / 2, c.push(l), x < q ? (t.append(v, x, q + 1), t.vertices.push(l), u.vertices.push(l), 0 != r && u.append(v, r, v.vertices.length), u.append(v, 0, x + 1)) : (0 != x && t.append(v, x, v.vertices.length), t.append(v, 0, q + 1), t.vertices.push(l), u.vertices.push(l), u.append(v, r, x + 1)); + else { + if (r > q && (q += this.vertices.length), p = Number.MAX_VALUE, q < r) return a; + for (var y = r; y <= q; ++y) g.leftOn(v.at(x - 1), v.at(x), v.at(y)) && g.rightOn(v.at(x + 1), v.at(x), v.at(y)) && (o = g.sqdist(v.at(x), v.at(y)), o < p && (p = o, s = y % this.vertices.length)); + x < s ? (t.append(v, x, s + 1), 0 != s && u.append(v, s, w.length), u.append(v, 0, x + 1)) : (0 != x && t.append(v, x, w.length), t.append(v, 0, s + 1), u.append(v, s, x + 1)) + } + return t.vertices.length < u.vertices.length ? (t.quickDecomp(a, b, c, f, h, i), u.quickDecomp(a, b, c, f, h, i)) : (u.quickDecomp(a, b, c, f, h, i), t.quickDecomp(a, b, c, f, h, i)), a + } return a.push(this), a + }, d.prototype.removeCollinearPoints = function(a) { + for (var b = 0, c = this.vertices.length - 1; this.vertices.length > 3 && c >= 0; --c) g.collinear(this.at(c - 1), this.at(c), this.at(c + 1), a) && (this.vertices.splice(c % this.vertices.length, 1), c--, b++); + return b + } + }, { + "./Line": 1, + "./Point": 2, + "./Scalar": 4 + }], + 4: [function(a, b, c) { + function d() {} + b.exports = d, d.eq = function(a, b, c) { + return c = c || 0, Math.abs(a - b) < c + } + }, {}], + 5: [function(a, b, c) { + b.exports = { + Polygon: a("./Polygon"), + Point: a("./Point") + } + }, { + "./Point": 2, + "./Polygon": 3 + }], + 6: [function(a, b, c) { + b.exports = { + name: "p2", + version: "0.7.0", + description: "A JavaScript 2D physics engine.", + author: "Stefan Hedman (http://steffe.se)", + keywords: ["p2.js", "p2", "physics", "engine", "2d"], + main: "./src/p2.js", + engines: { + node: "*" + }, + repository: { + type: "git", + url: "https://github.com/schteppe/p2.js.git" + }, + bugs: { + url: "https://github.com/schteppe/p2.js/issues" + }, + licenses: [{ + type: "MIT" + }], + devDependencies: { + grunt: "^0.4.5", + "grunt-contrib-jshint": "^0.11.2", + "grunt-contrib-nodeunit": "^0.4.1", + "grunt-contrib-uglify": "~0.4.0", + "grunt-contrib-watch": "~0.5.0", + "grunt-browserify": "~2.0.1", + "grunt-contrib-concat": "^0.4.0" + }, + dependencies: { + "poly-decomp": "0.1.0" + } + } + }, {}], + 7: [function(a, b, c) { + function d(a) { + this.lowerBound = e.create(), a && a.lowerBound && e.copy(this.lowerBound, a.lowerBound), this.upperBound = e.create(), a && a.upperBound && e.copy(this.upperBound, a.upperBound) + } + var e = a("../math/vec2"); + a("../utils/Utils"); + b.exports = d; + var f = e.create(); + d.prototype.setFromPoints = function(a, b, c, d) { + var g = this.lowerBound, + h = this.upperBound; + "number" != typeof c && (c = 0), 0 !== c ? e.rotate(g, a[0], c) : e.copy(g, a[0]), e.copy(h, g); + for (var i = Math.cos(c), j = Math.sin(c), k = 1; k < a.length; k++) { + var l = a[k]; + if (0 !== c) { + var m = l[0], + n = l[1]; + f[0] = i * m - j * n, f[1] = j * m + i * n, l = f + } + for (var o = 0; o < 2; o++) l[o] > h[o] && (h[o] = l[o]), l[o] < g[o] && (g[o] = l[o]) + } + b && (e.add(this.lowerBound, this.lowerBound, b), e.add(this.upperBound, this.upperBound, b)), d && (this.lowerBound[0] -= d, this.lowerBound[1] -= d, this.upperBound[0] += d, this.upperBound[1] += d) + }, d.prototype.copy = function(a) { + e.copy(this.lowerBound, a.lowerBound), e.copy(this.upperBound, a.upperBound) + }, d.prototype.extend = function(a) { + for (var b = 2; b--;) { + var c = a.lowerBound[b]; + this.lowerBound[b] > c && (this.lowerBound[b] = c); + var d = a.upperBound[b]; + this.upperBound[b] < d && (this.upperBound[b] = d) + } + }, d.prototype.overlaps = function(a) { + var b = this.lowerBound, + c = this.upperBound, + d = a.lowerBound, + e = a.upperBound; + return (d[0] <= c[0] && c[0] <= e[0] || b[0] <= e[0] && e[0] <= c[0]) && (d[1] <= c[1] && c[1] <= e[1] || b[1] <= e[1] && e[1] <= c[1]) + }, d.prototype.containsPoint = function(a) { + var b = this.lowerBound, + c = this.upperBound; + return b[0] <= a[0] && a[0] <= c[0] && b[1] <= a[1] && a[1] <= c[1] + }, d.prototype.overlapsRay = function(a) { + var b = 1 / a.direction[0], + c = 1 / a.direction[1], + d = (this.lowerBound[0] - a.from[0]) * b, + e = (this.upperBound[0] - a.from[0]) * b, + f = (this.lowerBound[1] - a.from[1]) * c, + g = (this.upperBound[1] - a.from[1]) * c, + h = Math.max(Math.max(Math.min(d, e), Math.min(f, g))), + i = Math.min(Math.min(Math.max(d, e), Math.max(f, g))); + return i < 0 ? -1 : h > i ? -1 : h + } + }, { + "../math/vec2": 30, + "../utils/Utils": 57 + }], + 8: [function(a, b, c) { + function d(a) { + this.type = a, this.result = [], this.world = null, this.boundingVolumeType = d.AABB + } + var e = a("../math/vec2"), + f = a("../objects/Body"); + b.exports = d, d.AABB = 1, d.BOUNDING_CIRCLE = 2, d.prototype.setWorld = function(a) { + this.world = a + }, d.prototype.getCollisionPairs = function(a) {}; + var g = e.create(); + d.boundingRadiusCheck = function(a, b) { + e.sub(g, a.position, b.position); + var c = e.squaredLength(g), + d = a.boundingRadius + b.boundingRadius; + return c <= d * d + }, d.aabbCheck = function(a, b) { + return a.getAABB().overlaps(b.getAABB()) + }, d.prototype.boundingVolumeCheck = function(a, b) { + var c; + switch (this.boundingVolumeType) { + case d.BOUNDING_CIRCLE: + c = d.boundingRadiusCheck(a, b); + break; + case d.AABB: + c = d.aabbCheck(a, b); + break; + default: + throw new Error("Bounding volume type not recognized: " + this.boundingVolumeType) + } + return c + }, d.canCollide = function(a, b) { + var c = f.KINEMATIC, + d = f.STATIC; + return (a.type !== d || b.type !== d) && (!(a.type === c && b.type === d || a.type === d && b.type === c) && ((a.type !== c || b.type !== c) && ((a.sleepState !== f.SLEEPING || b.sleepState !== f.SLEEPING) && !(a.sleepState === f.SLEEPING && b.type === d || b.sleepState === f.SLEEPING && a.type === d)))) + }, d.NAIVE = 1, d.SAP = 2 + }, { + "../math/vec2": 30, + "../objects/Body": 31 + }], + 9: [function(a, b, c) { + function d() { + e.call(this, e.NAIVE) + } + var e = (a("../shapes/Circle"), a("../shapes/Plane"), a("../shapes/Shape"), a("../shapes/Particle"), a("../collision/Broadphase")); + a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.getCollisionPairs = function(a) { + var b = a.bodies, + c = this.result; + c.length = 0; + for (var d = 0, f = b.length; d !== f; d++) + for (var g = b[d], h = 0; h < d; h++) { + var i = b[h]; + e.canCollide(g, i) && this.boundingVolumeCheck(g, i) && c.push(g, i) + } + return c + }, d.prototype.aabbQuery = function(a, b, c) { + c = c || []; + for (var d = a.bodies, e = 0; e < d.length; e++) { + var f = d[e]; + f.aabbNeedsUpdate && f.updateAABB(), f.aabb.overlaps(b) && c.push(f) + } + return c + } + }, { + "../collision/Broadphase": 8, + "../math/vec2": 30, + "../shapes/Circle": 39, + "../shapes/Particle": 43, + "../shapes/Plane": 44, + "../shapes/Shape": 45 + }], + 10: [function(a, b, c) { + function d() { + this.contactEquations = [], this.frictionEquations = [], this.enableFriction = !0, this.enabledEquations = !0, this.slipForce = 10, this.frictionCoefficient = .3, this.surfaceVelocity = 0, this.contactEquationPool = new k({ + size: 32 + }), this.frictionEquationPool = new l({ + size: 64 + }), this.restitution = 0, this.stiffness = n.DEFAULT_STIFFNESS, this.relaxation = n.DEFAULT_RELAXATION, this.frictionStiffness = n.DEFAULT_STIFFNESS, this.frictionRelaxation = n.DEFAULT_RELAXATION, this.enableFrictionReduction = !0, this.collidingBodiesLastStep = new m, this.contactSkinSize = .01 + } + + function e(a, b) { + g.set(a.vertices[0], .5 * -b.length, -b.radius), g.set(a.vertices[1], .5 * b.length, -b.radius), g.set(a.vertices[2], .5 * b.length, b.radius), g.set(a.vertices[3], .5 * -b.length, b.radius) + } + + function f(a, b, c, d) { + for (var e = T, f = U, j = V, k = W, l = a, m = b.vertices, n = null, o = 0; o !== m.length + 1; o++) { + var p = m[o % m.length], + q = m[(o + 1) % m.length]; + g.rotate(e, p, d), g.rotate(f, q, d), i(e, e, c), i(f, f, c), h(j, e, l), h(k, f, l); + var r = g.crossLength(j, k); + if (null === n && (n = r), r * n <= 0) return !1; + n = r + } + return !0 + } + var g = a("../math/vec2"), + h = g.sub, + i = g.add, + j = g.dot, + k = (a("../utils/Utils"), a("../utils/ContactEquationPool")), + l = a("../utils/FrictionEquationPool"), + m = a("../utils/TupleDictionary"), + n = a("../equations/Equation"), + o = (a("../equations/ContactEquation"), a("../equations/FrictionEquation"), a("../shapes/Circle")), + p = a("../shapes/Convex"), + q = a("../shapes/Shape"), + r = (a("../objects/Body"), a("../shapes/Box")); + b.exports = d; + var s = g.fromValues(0, 1), + t = g.fromValues(0, 0), + u = g.fromValues(0, 0), + v = g.fromValues(0, 0), + w = g.fromValues(0, 0), + x = g.fromValues(0, 0), + y = g.fromValues(0, 0), + z = g.fromValues(0, 0), + A = g.fromValues(0, 0), + B = g.fromValues(0, 0), + C = g.fromValues(0, 0), + D = g.fromValues(0, 0), + E = g.fromValues(0, 0), + F = g.fromValues(0, 0), + G = g.fromValues(0, 0), + H = g.fromValues(0, 0), + I = g.fromValues(0, 0), + J = g.fromValues(0, 0), + K = g.fromValues(0, 0), + L = [], + M = g.create(), + N = g.create(); + d.prototype.bodiesOverlap = function(a, b) { + for (var c = M, d = N, e = 0, f = a.shapes.length; e !== f; e++) { + var g = a.shapes[e]; + a.toWorldFrame(c, g.position); + for (var h = 0, i = b.shapes.length; h !== i; h++) { + var j = b.shapes[h]; + if (b.toWorldFrame(d, j.position), this[g.type | j.type](a, g, c, g.angle + a.angle, b, j, d, j.angle + b.angle, !0)) return !0 + } + } + return !1 + }, d.prototype.collidedLastStep = function(a, b) { + var c = 0 | a.id, + d = 0 | b.id; + return !!this.collidingBodiesLastStep.get(c, d) + }, d.prototype.reset = function() { + this.collidingBodiesLastStep.reset(); + for (var a = this.contactEquations, b = a.length; b--;) { + var c = a[b], + d = c.bodyA.id, + e = c.bodyB.id; + this.collidingBodiesLastStep.set(d, e, !0) + } + for (var f = this.contactEquations, g = this.frictionEquations, h = 0; h < f.length; h++) this.contactEquationPool.release(f[h]); + for (var h = 0; h < g.length; h++) this.frictionEquationPool.release(g[h]); + this.contactEquations.length = this.frictionEquations.length = 0 + }, d.prototype.createContactEquation = function(a, b, c, d) { + var e = this.contactEquationPool.get(); + return e.bodyA = a, e.bodyB = b, e.shapeA = c, e.shapeB = d, e.restitution = this.restitution, e.firstImpact = !this.collidedLastStep(a, b), e.stiffness = this.stiffness, e.relaxation = this.relaxation, e.needsUpdate = !0, e.enabled = this.enabledEquations, e.offset = this.contactSkinSize, e + }, d.prototype.createFrictionEquation = function(a, b, c, d) { + var e = this.frictionEquationPool.get(); + return e.bodyA = a, e.bodyB = b, e.shapeA = c, e.shapeB = d, e.setSlipForce(this.slipForce), e.frictionCoefficient = this.frictionCoefficient, e.relativeVelocity = this.surfaceVelocity, e.enabled = this.enabledEquations, e.needsUpdate = !0, e.stiffness = this.frictionStiffness, e.relaxation = this.frictionRelaxation, e.contactEquations.length = 0, e + }, d.prototype.createFrictionFromContact = function(a) { + var b = this.createFrictionEquation(a.bodyA, a.bodyB, a.shapeA, a.shapeB); + return g.copy(b.contactPointA, a.contactPointA), g.copy(b.contactPointB, a.contactPointB), g.rotate90cw(b.t, a.normalA), b.contactEquations.push(a), b + }, d.prototype.createFrictionFromAverage = function(a) { + var b = this.contactEquations[this.contactEquations.length - 1], + c = this.createFrictionEquation(b.bodyA, b.bodyB, b.shapeA, b.shapeB), + d = b.bodyA; + b.bodyB; + g.set(c.contactPointA, 0, 0), g.set(c.contactPointB, 0, 0), g.set(c.t, 0, 0); + for (var e = 0; e !== a; e++) b = this.contactEquations[this.contactEquations.length - 1 - e], b.bodyA === d ? (g.add(c.t, c.t, b.normalA), g.add(c.contactPointA, c.contactPointA, b.contactPointA), g.add(c.contactPointB, c.contactPointB, b.contactPointB)) : (g.sub(c.t, c.t, b.normalA), g.add(c.contactPointA, c.contactPointA, b.contactPointB), g.add(c.contactPointB, c.contactPointB, b.contactPointA)), c.contactEquations.push(b); + var f = 1 / a; + return g.scale(c.contactPointA, c.contactPointA, f), g.scale(c.contactPointB, c.contactPointB, f), g.normalize(c.t, c.t), g.rotate90cw(c.t, c.t), c + }, d.prototype[q.LINE | q.CONVEX] = d.prototype.convexLine = function(a, b, c, d, e, f, g, h, i) { + return !i && 0 + }, d.prototype[q.LINE | q.BOX] = d.prototype.lineBox = function(a, b, c, d, e, f, g, h, i) { + return !i && 0 + }; + var O = new r({ + width: 1, + height: 1 + }), + P = g.create(); + d.prototype[q.CAPSULE | q.CONVEX] = d.prototype[q.CAPSULE | q.BOX] = d.prototype.convexCapsule = function(a, b, c, d, f, h, i, j, k) { + var l = P; + g.set(l, h.length / 2, 0), g.rotate(l, l, j), g.add(l, l, i); + var m = this.circleConvex(f, h, l, j, a, b, c, d, k, h.radius); + g.set(l, -h.length / 2, 0), g.rotate(l, l, j), g.add(l, l, i); + var n = this.circleConvex(f, h, l, j, a, b, c, d, k, h.radius); + if (k && (m || n)) return !0; + var o = O; + e(o, h); + var p = this.convexConvex(a, b, c, d, f, o, i, j, k); + return p + m + n + }, d.prototype[q.CAPSULE | q.LINE] = d.prototype.lineCapsule = function(a, b, c, d, e, f, g, h, i) { + return !i && 0 + }; + var Q = g.create(), + R = g.create(), + S = new r({ + width: 1, + height: 1 + }); + d.prototype[q.CAPSULE | q.CAPSULE] = d.prototype.capsuleCapsule = function(a, b, c, d, f, h, i, j, k) { + for (var l, m = Q, n = R, o = 0, p = 0; p < 2; p++) { + g.set(m, (0 === p ? -1 : 1) * b.length / 2, 0), g.rotate(m, m, d), g.add(m, m, c); + for (var q = 0; q < 2; q++) { + g.set(n, (0 === q ? -1 : 1) * h.length / 2, 0), g.rotate(n, n, j), g.add(n, n, i), this.enableFrictionReduction && (l = this.enableFriction, this.enableFriction = !1); + var r = this.circleCircle(a, b, m, d, f, h, n, j, k, b.radius, h.radius); + if (this.enableFrictionReduction && (this.enableFriction = l), k && r) return !0; + o += r + } + } + this.enableFrictionReduction && (l = this.enableFriction, this.enableFriction = !1); + var s = S; + e(s, b); + var t = this.convexCapsule(a, s, c, d, f, h, i, j, k); + if (this.enableFrictionReduction && (this.enableFriction = l), k && t) return !0; + if (o += t, this.enableFrictionReduction) { + var l = this.enableFriction; + this.enableFriction = !1 + } + e(s, h); + var u = this.convexCapsule(f, s, i, j, a, b, c, d, k); + return this.enableFrictionReduction && (this.enableFriction = l), !(!k || !u) || (o += u, this.enableFrictionReduction && o && this.enableFriction && this.frictionEquations.push(this.createFrictionFromAverage(o)), o) + }, d.prototype[q.LINE | q.LINE] = d.prototype.lineLine = function(a, b, c, d, e, f, g, h, i) { + return !i && 0 + }, d.prototype[q.PLANE | q.LINE] = d.prototype.planeLine = function(a, b, c, d, e, f, k, l, m) { + var n = t, + o = u, + p = v, + q = w, + r = x, + C = y, + D = z, + E = A, + F = B, + G = L, + H = 0; + g.set(n, -f.length / 2, 0), g.set(o, f.length / 2, 0), g.rotate(p, n, l), g.rotate(q, o, l), i(p, p, k), i(q, q, k), g.copy(n, p), g.copy(o, q), h(r, o, n), g.normalize(C, r), g.rotate90cw(F, C), g.rotate(E, s, d), G[0] = n, G[1] = o; + for (var I = 0; I < G.length; I++) { + var J = G[I]; + h(D, J, c); + var K = j(D, E); + if (K < 0) { + if (m) return !0; + var M = this.createContactEquation(a, e, b, f); + H++, g.copy(M.normalA, E), g.normalize(M.normalA, M.normalA), g.scale(D, E, K), h(M.contactPointA, J, D), h(M.contactPointA, M.contactPointA, a.position), h(M.contactPointB, J, k), i(M.contactPointB, M.contactPointB, k), h(M.contactPointB, M.contactPointB, e.position), this.contactEquations.push(M), this.enableFrictionReduction || this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(M)) + } + } + return !m && (this.enableFrictionReduction || H && this.enableFriction && this.frictionEquations.push(this.createFrictionFromAverage(H)), H) + }, d.prototype[q.PARTICLE | q.CAPSULE] = d.prototype.particleCapsule = function(a, b, c, d, e, f, g, h, i) { + return this.circleLine(a, b, c, d, e, f, g, h, i, f.radius, 0) + }, d.prototype[q.CIRCLE | q.LINE] = d.prototype.circleLine = function(a, b, c, d, e, f, k, l, m, n, o) { + var n = n || 0, + o = "undefined" != typeof o ? o : b.radius, + p = t, + q = u, + r = v, + s = w, + H = x, + I = y, + J = z, + K = A, + M = B, + N = C, + O = D, + P = E, + Q = F, + R = G, + S = L; + g.set(K, -f.length / 2, 0), g.set(M, f.length / 2, 0), g.rotate(N, K, l), g.rotate(O, M, l), i(N, N, k), i(O, O, k), g.copy(K, N), g.copy(M, O), h(I, M, K), g.normalize(J, I), g.rotate90cw(H, J), h(P, c, K); + var T = j(P, H); + h(s, K, k), h(Q, c, k); + var U = o + n; + if (Math.abs(T) < U) { + g.scale(p, H, T), h(r, c, p), g.scale(q, H, j(H, Q)), g.normalize(q, q), g.scale(q, q, n), i(r, r, q); + var V = j(J, r), + W = j(J, K), + X = j(J, M); + if (V > W && V < X) { + if (m) return !0; + var Y = this.createContactEquation(a, e, b, f); + return g.scale(Y.normalA, p, -1), g.normalize(Y.normalA, Y.normalA), g.scale(Y.contactPointA, Y.normalA, o), i(Y.contactPointA, Y.contactPointA, c), h(Y.contactPointA, Y.contactPointA, a.position), h(Y.contactPointB, r, k), i(Y.contactPointB, Y.contactPointB, k), h(Y.contactPointB, Y.contactPointB, e.position), this.contactEquations.push(Y), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(Y)), 1 + } + } + S[0] = K, S[1] = M; + for (var Z = 0; Z < S.length; Z++) { + var $ = S[Z]; + if (h(P, $, c), g.squaredLength(P) < Math.pow(U, 2)) { + if (m) return !0; + var Y = this.createContactEquation(a, e, b, f); + return g.copy(Y.normalA, P), g.normalize(Y.normalA, Y.normalA), g.scale(Y.contactPointA, Y.normalA, o), i(Y.contactPointA, Y.contactPointA, c), h(Y.contactPointA, Y.contactPointA, a.position), h(Y.contactPointB, $, k), g.scale(R, Y.normalA, -n), i(Y.contactPointB, Y.contactPointB, R), i(Y.contactPointB, Y.contactPointB, k), h(Y.contactPointB, Y.contactPointB, e.position), this.contactEquations.push(Y), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(Y)), 1 + } + } + return 0 + }, d.prototype[q.CIRCLE | q.CAPSULE] = d.prototype.circleCapsule = function(a, b, c, d, e, f, g, h, i) { + return this.circleLine(a, b, c, d, e, f, g, h, i, f.radius) + }, d.prototype[q.CIRCLE | q.CONVEX] = d.prototype[q.CIRCLE | q.BOX] = d.prototype.circleConvex = function(a, b, c, d, e, j, k, l, m, n) { + for (var n = "number" == typeof n ? n : b.radius, o = t, p = u, q = v, r = w, s = x, y = C, z = D, A = F, B = G, E = H, J = I, K = !1, L = Number.MAX_VALUE, M = j.vertices, N = 0; N !== M.length + 1; N++) { + var O = M[N % M.length], + P = M[(N + 1) % M.length]; + if (g.rotate(o, O, l), g.rotate(p, P, l), i(o, o, k), i(p, p, k), h(q, p, o), g.normalize(r, q), g.rotate90cw(s, r), g.scale(B, s, -b.radius), i(B, B, c), f(B, j, k, l)) { + g.sub(E, o, B); + var Q = Math.abs(g.dot(E, s)); + Q < L && (g.copy(J, B), L = Q, g.scale(A, s, Q), g.add(A, A, B), K = !0) + } + } + if (K) { + if (m) return !0; + var R = this.createContactEquation(a, e, b, j); + return g.sub(R.normalA, J, c), g.normalize(R.normalA, R.normalA), g.scale(R.contactPointA, R.normalA, n), i(R.contactPointA, R.contactPointA, c), h(R.contactPointA, R.contactPointA, a.position), h(R.contactPointB, A, k), i(R.contactPointB, R.contactPointB, k), h(R.contactPointB, R.contactPointB, e.position), this.contactEquations.push(R), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(R)), 1 + } + if (n > 0) + for (var N = 0; N < M.length; N++) { + var S = M[N]; + if (g.rotate(z, S, l), i(z, z, k), h(y, z, c), g.squaredLength(y) < Math.pow(n, 2)) { + if (m) return !0; + var R = this.createContactEquation(a, e, b, j); + return g.copy(R.normalA, y), g.normalize(R.normalA, R.normalA), g.scale(R.contactPointA, R.normalA, n), i(R.contactPointA, R.contactPointA, c), h(R.contactPointA, R.contactPointA, a.position), h(R.contactPointB, z, k), i(R.contactPointB, R.contactPointB, k), h(R.contactPointB, R.contactPointB, e.position), this.contactEquations.push(R), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(R)), 1 + } + } + return 0 + }; + var T = g.create(), + U = g.create(), + V = g.create(), + W = g.create(); + d.prototype[q.PARTICLE | q.CONVEX] = d.prototype[q.PARTICLE | q.BOX] = d.prototype.particleConvex = function(a, b, c, d, e, k, l, m, n) { + var o = t, + p = u, + q = v, + r = w, + s = x, + A = y, + B = z, + D = C, + E = F, + G = J, + H = K, + I = Number.MAX_VALUE, + L = !1, + M = k.vertices; + if (!f(c, k, l, m)) return 0; + if (n) return !0; + for (var N = 0; N !== M.length + 1; N++) { + var O = M[N % M.length], + P = M[(N + 1) % M.length]; + g.rotate(o, O, m), g.rotate(p, P, m), i(o, o, l), i(p, p, l), h(q, p, o), g.normalize(r, q), g.rotate90cw(s, r), h(D, c, o); + j(D, s); + h(A, o, l), h(B, c, l), g.sub(G, o, c); + var Q = Math.abs(g.dot(G, s)); + Q < I && (I = Q, g.scale(E, s, Q), g.add(E, E, c), g.copy(H, s), L = !0) + } + if (L) { + var R = this.createContactEquation(a, e, b, k); + return g.scale(R.normalA, H, -1), g.normalize(R.normalA, R.normalA), g.set(R.contactPointA, 0, 0), i(R.contactPointA, R.contactPointA, c), h(R.contactPointA, R.contactPointA, a.position), h(R.contactPointB, E, l), i(R.contactPointB, R.contactPointB, l), h(R.contactPointB, R.contactPointB, e.position), this.contactEquations.push(R), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(R)), 1 + } + return 0 + }, d.prototype[q.CIRCLE] = d.prototype.circleCircle = function(a, b, c, d, e, f, j, k, l, m, n) { + var o = t, + m = m || b.radius, + n = n || f.radius; + h(o, c, j); + var p = m + n; + if (g.squaredLength(o) > Math.pow(p, 2)) return 0; + if (l) return !0; + var q = this.createContactEquation(a, e, b, f); + return h(q.normalA, j, c), g.normalize(q.normalA, q.normalA), g.scale(q.contactPointA, q.normalA, m), g.scale(q.contactPointB, q.normalA, -n), i(q.contactPointA, q.contactPointA, c), h(q.contactPointA, q.contactPointA, a.position), i(q.contactPointB, q.contactPointB, j), h(q.contactPointB, q.contactPointB, e.position), this.contactEquations.push(q), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(q)), 1 + }, d.prototype[q.PLANE | q.CONVEX] = d.prototype[q.PLANE | q.BOX] = d.prototype.planeConvex = function(a, b, c, d, e, f, k, l, m) { + var n = t, + o = u, + p = v, + q = 0; + g.rotate(o, s, d); + for (var r = 0; r !== f.vertices.length; r++) { + var w = f.vertices[r]; + if (g.rotate(n, w, l), i(n, n, k), h(p, n, c), j(p, o) <= 0) { + if (m) return !0; + q++; + var x = this.createContactEquation(a, e, b, f); + h(p, n, c), g.copy(x.normalA, o); + var y = j(p, x.normalA); + g.scale(p, x.normalA, y), h(x.contactPointB, n, e.position), h(x.contactPointA, n, p), h(x.contactPointA, x.contactPointA, a.position), this.contactEquations.push(x), this.enableFrictionReduction || this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(x)) + } + } + return this.enableFrictionReduction && this.enableFriction && q && this.frictionEquations.push(this.createFrictionFromAverage(q)), q + }, d.prototype[q.PARTICLE | q.PLANE] = d.prototype.particlePlane = function(a, b, c, d, e, f, i, k, l) { + var m = t, + n = u; + k = k || 0, h(m, c, i), g.rotate(n, s, k); + var o = j(m, n); + if (o > 0) return 0; + if (l) return !0; + var p = this.createContactEquation(e, a, f, b); + return g.copy(p.normalA, n), g.scale(m, p.normalA, o), h(p.contactPointA, c, m), h(p.contactPointA, p.contactPointA, e.position), h(p.contactPointB, c, a.position), this.contactEquations.push(p), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(p)), 1 + }, d.prototype[q.CIRCLE | q.PARTICLE] = d.prototype.circleParticle = function(a, b, c, d, e, f, j, k, l) { + var m = t; + if (h(m, j, c), g.squaredLength(m) > Math.pow(b.radius, 2)) return 0; + if (l) return !0; + var n = this.createContactEquation(a, e, b, f); + return g.copy(n.normalA, m), g.normalize(n.normalA, n.normalA), g.scale(n.contactPointA, n.normalA, b.radius), i(n.contactPointA, n.contactPointA, c), h(n.contactPointA, n.contactPointA, a.position), h(n.contactPointB, j, e.position), this.contactEquations.push(n), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(n)), 1 + }; + var X = new o({ + radius: 1 + }), + Y = g.create(), + Z = g.create(); + g.create(); + d.prototype[q.PLANE | q.CAPSULE] = d.prototype.planeCapsule = function(a, b, c, d, e, f, h, j, k) { + var l = Y, + m = Z, + n = X; + g.set(l, -f.length / 2, 0), g.rotate(l, l, j), i(l, l, h), g.set(m, f.length / 2, 0), g.rotate(m, m, j), i(m, m, h), n.radius = f.radius; + var o; + this.enableFrictionReduction && (o = this.enableFriction, this.enableFriction = !1); + var p = this.circlePlane(e, n, l, 0, a, b, c, d, k), + q = this.circlePlane(e, n, m, 0, a, b, c, d, k); + if (this.enableFrictionReduction && (this.enableFriction = o), k) return p || q; + var r = p + q; + return this.enableFrictionReduction && r && this.frictionEquations.push(this.createFrictionFromAverage(r)), r + }, d.prototype[q.CIRCLE | q.PLANE] = d.prototype.circlePlane = function(a, b, c, d, e, f, k, l, m) { + var n = a, + o = b, + p = c, + q = e, + r = k, + w = l; + w = w || 0; + var x = t, + y = u, + z = v; + h(x, p, r), g.rotate(y, s, w); + var A = j(y, x); + if (A > o.radius) return 0; + if (m) return !0; + var B = this.createContactEquation(q, n, f, b); + return g.copy(B.normalA, y), g.scale(B.contactPointB, B.normalA, -o.radius), i(B.contactPointB, B.contactPointB, p), h(B.contactPointB, B.contactPointB, n.position), g.scale(z, B.normalA, A), h(B.contactPointA, x, z), i(B.contactPointA, B.contactPointA, r), h(B.contactPointA, B.contactPointA, q.position), this.contactEquations.push(B), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(B)), 1 + }, d.prototype[q.CONVEX] = d.prototype[q.CONVEX | q.BOX] = d.prototype[q.BOX] = d.prototype.convexConvex = function(a, b, c, e, f, k, l, m, n, o) { + var p = t, + q = u, + r = v, + s = w, + y = x, + C = z, + D = A, + E = B, + F = 0, + o = "number" == typeof o ? o : 0, + G = d.findSeparatingAxis(b, c, e, k, l, m, p); + if (!G) return 0; + h(D, l, c), j(p, D) > 0 && g.scale(p, p, -1); + var H = d.getClosestEdge(b, e, p, !0), + I = d.getClosestEdge(k, m, p); + if (H === -1 || I === -1) return 0; + for (var J = 0; J < 2; J++) { + var K = H, + L = I, + M = b, + N = k, + O = c, + P = l, + Q = e, + R = m, + S = a, + T = f; + if (0 === J) { + var U; + U = K, K = L, L = U, U = M, M = N, N = U, U = O, O = P, P = U, U = Q, Q = R, R = U, U = S, S = T, T = U + } + for (var V = L; V < L + 2; V++) { + var W = N.vertices[(V + N.vertices.length) % N.vertices.length]; + g.rotate(q, W, R), i(q, q, P); + for (var X = 0, Y = K - 1; Y < K + 2; Y++) { + var Z = M.vertices[(Y + M.vertices.length) % M.vertices.length], + $ = M.vertices[(Y + 1 + M.vertices.length) % M.vertices.length]; + g.rotate(r, Z, Q), g.rotate(s, $, Q), i(r, r, O), i(s, s, O), h(y, s, r), g.rotate90cw(E, y), g.normalize(E, E), h(D, q, r); + var _ = j(E, D); + (Y === K && _ <= o || Y !== K && _ <= 0) && X++ + } + if (X >= 3) { + if (n) return !0; + var aa = this.createContactEquation(S, T, M, N); + F++; + var Z = M.vertices[K % M.vertices.length], + $ = M.vertices[(K + 1) % M.vertices.length]; + g.rotate(r, Z, Q), g.rotate(s, $, Q), i(r, r, O), i(s, s, O), h(y, s, r), g.rotate90cw(aa.normalA, y), g.normalize(aa.normalA, aa.normalA), h(D, q, r); + var _ = j(aa.normalA, D); + g.scale(C, aa.normalA, _), h(aa.contactPointA, q, O), h(aa.contactPointA, aa.contactPointA, C), i(aa.contactPointA, aa.contactPointA, O), h(aa.contactPointA, aa.contactPointA, S.position), h(aa.contactPointB, q, P), i(aa.contactPointB, aa.contactPointB, P), h(aa.contactPointB, aa.contactPointB, T.position), this.contactEquations.push(aa), this.enableFrictionReduction || this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(aa)) + } + } + } + return this.enableFrictionReduction && this.enableFriction && F && this.frictionEquations.push(this.createFrictionFromAverage(F)), F + }; + var $ = g.fromValues(0, 0); + d.projectConvexOntoAxis = function(a, b, c, d, e) { + var f, h, i = null, + k = null, + l = $; + g.rotate(l, d, -c); + for (var m = 0; m < a.vertices.length; m++) f = a.vertices[m], h = j(f, l), (null === i || h > i) && (i = h), (null === k || h < k) && (k = h); + if (k > i) { + var n = k; + k = i, i = n + } + var o = j(b, d); + g.set(e, k + o, i + o) + }; + var _ = g.fromValues(0, 0), + aa = g.fromValues(0, 0), + ba = g.fromValues(0, 0), + ca = g.fromValues(0, 0), + da = g.fromValues(0, 0), + ea = g.fromValues(0, 0); + d.findSeparatingAxis = function(a, b, c, e, f, i, j) { + var k = null, + l = !1, + m = !1, + n = _, + o = aa, + p = ba, + q = ca, + s = da, + t = ea; + if (a instanceof r && e instanceof r) + for (var u = 0; 2 !== u; u++) { + var v = a, + w = c; + 1 === u && (v = e, w = i); + for (var x = 0; 2 !== x; x++) { + 0 === x ? g.set(q, 0, 1) : 1 === x && g.set(q, 1, 0), 0 !== w && g.rotate(q, q, w), d.projectConvexOntoAxis(a, b, c, q, s), d.projectConvexOntoAxis(e, f, i, q, t); + var y = s, + z = t, + A = !1; + s[0] > t[0] && (z = s, y = t, A = !0); + var B = z[0] - y[1]; + l = B <= 0, (null === k || B > k) && (g.copy(j, q), k = B, m = l) + } + } else + for (var u = 0; 2 !== u; u++) { + var v = a, + w = c; + 1 === u && (v = e, w = i); + for (var x = 0; x !== v.vertices.length; x++) { + g.rotate(o, v.vertices[x], w), g.rotate(p, v.vertices[(x + 1) % v.vertices.length], w), h(n, p, o), g.rotate90cw(q, n), g.normalize(q, q), d.projectConvexOntoAxis(a, b, c, q, s), d.projectConvexOntoAxis(e, f, i, q, t); + var y = s, + z = t, + A = !1; + s[0] > t[0] && (z = s, y = t, A = !0); + var B = z[0] - y[1]; + l = B <= 0, (null === k || B > k) && (g.copy(j, q), k = B, m = l) + } + } + return m + }; + var fa = g.fromValues(0, 0), + ga = g.fromValues(0, 0), + ha = g.fromValues(0, 0); + d.getClosestEdge = function(a, b, c, d) { + var e = fa, + f = ga, + i = ha; + g.rotate(e, c, -b), d && g.scale(e, e, -1); + for (var k = -1, l = a.vertices.length, m = -1, n = 0; n !== l; n++) { + h(f, a.vertices[(n + 1) % l], a.vertices[n % l]), g.rotate90cw(i, f), g.normalize(i, i); + var o = j(i, e); + (k === -1 || o > m) && (k = n % l, m = o) + } + return k + }; + var ia = g.create(), + ja = g.create(), + ka = g.create(), + la = g.create(), + ma = g.create(), + na = g.create(), + oa = g.create(); + d.prototype[q.CIRCLE | q.HEIGHTFIELD] = d.prototype.circleHeightfield = function(a, b, c, d, e, f, j, k, l, m) { + var n = f.heights, + m = m || b.radius, + o = f.elementWidth, + p = ja, + q = ia, + r = ma, + s = oa, + t = na, + u = ka, + v = la, + w = Math.floor((c[0] - m - j[0]) / o), + x = Math.ceil((c[0] + m - j[0]) / o); + w < 0 && (w = 0), x >= n.length && (x = n.length - 1); + for (var y = n[w], z = n[x], A = w; A < x; A++) n[A] < z && (z = n[A]), n[A] > y && (y = n[A]); + if (c[1] - m > y) return !l && 0; + for (var B = !1, A = w; A < x; A++) { + g.set(u, A * o, n[A]), g.set(v, (A + 1) * o, n[A + 1]), g.add(u, u, j), g.add(v, v, j), g.sub(t, v, u), g.rotate(t, t, Math.PI / 2), g.normalize(t, t), g.scale(q, t, -m), g.add(q, q, c), g.sub(p, q, u); + var C = g.dot(p, t); + if (q[0] >= u[0] && q[0] < v[0] && C <= 0) { + if (l) return !0; + B = !0, g.scale(p, t, -C), g.add(r, q, p), g.copy(s, t); + var D = this.createContactEquation(e, a, f, b); + g.copy(D.normalA, s), g.scale(D.contactPointB, D.normalA, -m), i(D.contactPointB, D.contactPointB, c), h(D.contactPointB, D.contactPointB, a.position), g.copy(D.contactPointA, r), g.sub(D.contactPointA, D.contactPointA, e.position), this.contactEquations.push(D), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(D)) + } + } + if (B = !1, m > 0) + for (var A = w; A <= x; A++) + if (g.set(u, A * o, n[A]), g.add(u, u, j), g.sub(p, c, u), g.squaredLength(p) < Math.pow(m, 2)) { + if (l) return !0; + B = !0; + var D = this.createContactEquation(e, a, f, b); + g.copy(D.normalA, p), g.normalize(D.normalA, D.normalA), g.scale(D.contactPointB, D.normalA, -m), i(D.contactPointB, D.contactPointB, c), h(D.contactPointB, D.contactPointB, a.position), h(D.contactPointA, u, j), i(D.contactPointA, D.contactPointA, j), h(D.contactPointA, D.contactPointA, e.position), this.contactEquations.push(D), this.enableFriction && this.frictionEquations.push(this.createFrictionFromContact(D)) + } return B ? 1 : 0 + }; + var pa = g.create(), + qa = g.create(), + ra = g.create(), + sa = new p({ + vertices: [g.create(), g.create(), g.create(), g.create()] + }); + d.prototype[q.BOX | q.HEIGHTFIELD] = d.prototype[q.CONVEX | q.HEIGHTFIELD] = d.prototype.convexHeightfield = function(a, b, c, d, e, f, h, i, j) { + var k = f.heights, + l = f.elementWidth, + m = pa, + n = qa, + o = ra, + p = sa, + q = Math.floor((a.aabb.lowerBound[0] - h[0]) / l), + r = Math.ceil((a.aabb.upperBound[0] - h[0]) / l); + q < 0 && (q = 0), r >= k.length && (r = k.length - 1); + for (var s = k[q], t = k[r], u = q; u < r; u++) k[u] < t && (t = k[u]), k[u] > s && (s = k[u]); + if (a.aabb.lowerBound[1] > s) return !j && 0; + for (var v = 0, u = q; u < r; u++) { + g.set(m, u * l, k[u]), g.set(n, (u + 1) * l, k[u + 1]), g.add(m, m, h), g.add(n, n, h); + var w = 100; + g.set(o, .5 * (n[0] + m[0]), .5 * (n[1] + m[1] - w)), g.sub(p.vertices[0], n, o), g.sub(p.vertices[1], m, o), g.copy(p.vertices[2], p.vertices[1]), g.copy(p.vertices[3], p.vertices[0]), p.vertices[2][1] -= w, p.vertices[3][1] -= w, v += this.convexConvex(a, b, c, d, e, p, o, 0, j) + } + return v + } + }, { + "../equations/ContactEquation": 21, + "../equations/Equation": 22, + "../equations/FrictionEquation": 23, + "../math/vec2": 30, + "../objects/Body": 31, + "../shapes/Box": 37, + "../shapes/Circle": 39, + "../shapes/Convex": 40, + "../shapes/Shape": 45, + "../utils/ContactEquationPool": 48, + "../utils/FrictionEquationPool": 49, + "../utils/TupleDictionary": 56, + "../utils/Utils": 57 + }], + 11: [function(a, b, c) { + function d(a) { + a = a || {}, this.from = a.from ? f.fromValues(a.from[0], a.from[1]) : f.create(), this.to = a.to ? f.fromValues(a.to[0], a.to[1]) : f.create(), this.checkCollisionResponse = void 0 === a.checkCollisionResponse || a.checkCollisionResponse, this.skipBackfaces = !!a.skipBackfaces, this.collisionMask = void 0 !== a.collisionMask ? a.collisionMask : -1, this.collisionGroup = void 0 !== a.collisionGroup ? a.collisionGroup : -1, this.mode = void 0 !== a.mode ? a.mode : d.ANY, this.callback = a.callback || function(a) {}, this.direction = f.create(), this.length = 1, this.update() + } + + function e(a, b, c) { + f.sub(h, c, a); + var d = f.dot(h, b); + return f.scale(i, b, d), f.add(i, i, a), f.squaredDistance(c, i) + } + b.exports = d; + var f = a("../math/vec2"); + a("../collision/RaycastResult"), a("../shapes/Shape"), a("../collision/AABB"); + d.prototype.constructor = d, d.CLOSEST = 1, d.ANY = 2, d.ALL = 4, d.prototype.update = function() { + var a = this.direction; + f.sub(a, this.to, this.from), this.length = f.length(a), f.normalize(a, a) + }, d.prototype.intersectBodies = function(a, b) { + for (var c = 0, d = b.length; !a.shouldStop(this) && c < d; c++) { + var e = b[c], + f = e.getAABB(); + (f.overlapsRay(this) >= 0 || f.containsPoint(this.from)) && this.intersectBody(a, e) + } + }; + var g = f.create(); + d.prototype.intersectBody = function(a, b) { + var c = this.checkCollisionResponse; + if (!c || b.collisionResponse) + for (var d = g, e = 0, h = b.shapes.length; e < h; e++) { + var i = b.shapes[e]; + if ((!c || i.collisionResponse) && 0 !== (this.collisionGroup & i.collisionMask) && 0 !== (i.collisionGroup & this.collisionMask)) { + f.rotate(d, i.position, b.angle), f.add(d, d, b.position); + var j = i.angle + b.angle; + if (this.intersectShape(a, i, j, d, b), a.shouldStop(this)) break + } + } + }, d.prototype.intersectShape = function(a, b, c, d, f) { + var g = this.from, + h = e(g, this.direction, d); + h > b.boundingRadius * b.boundingRadius || (this._currentBody = f, this._currentShape = b, b.raycast(a, this, d, c), this._currentBody = this._currentShape = null) + }, d.prototype.getAABB = function(a) { + var b = this.to, + c = this.from; + f.set(a.lowerBound, Math.min(b[0], c[0]), Math.min(b[1], c[1])), f.set(a.upperBound, Math.max(b[0], c[0]), Math.max(b[1], c[1])) + }; + f.create(); + d.prototype.reportIntersection = function(a, b, c, e) { + var g = (this.from, this.to, this._currentShape), + h = this._currentBody; + if (!(this.skipBackfaces && f.dot(c, this.direction) > 0)) switch (this.mode) { + case d.ALL: + a.set(c, g, h, b, e), this.callback(a); + break; + case d.CLOSEST: + (b < a.fraction || !a.hasHit()) && a.set(c, g, h, b, e); + break; + case d.ANY: + a.set(c, g, h, b, e) + } + }; + var h = f.create(), + i = f.create() + }, { + "../collision/AABB": 7, + "../collision/RaycastResult": 12, + "../math/vec2": 30, + "../shapes/Shape": 45 + }], + 12: [function(a, b, c) { + function d() { + this.normal = e.create(), this.shape = null, this.body = null, this.faceIndex = -1, this.fraction = -1, this.isStopped = !1 + } + var e = a("../math/vec2"), + f = a("../collision/Ray"); + b.exports = d, d.prototype.reset = function() { + e.set(this.normal, 0, 0), this.shape = null, this.body = null, this.faceIndex = -1, this.fraction = -1, this.isStopped = !1 + }, d.prototype.getHitDistance = function(a) { + return e.distance(a.from, a.to) * this.fraction + }, d.prototype.hasHit = function() { + return this.fraction !== -1 + }, d.prototype.getHitPoint = function(a, b) { + e.lerp(a, b.from, b.to, this.fraction) + }, d.prototype.stop = function() { + this.isStopped = !0 + }, d.prototype.shouldStop = function(a) { + return this.isStopped || this.fraction !== -1 && a.mode === f.ANY + }, d.prototype.set = function(a, b, c, d, f) { + e.copy(this.normal, a), this.shape = b, this.body = c, this.fraction = d, this.faceIndex = f + } + }, { + "../collision/Ray": 11, + "../math/vec2": 30 + }], + 13: [function(a, b, c) { + function d() { + f.call(this, f.SAP), this.axisList = [], this.axisIndex = 0; + var a = this; + this._addBodyHandler = function(b) { + a.axisList.push(b.body) + }, this._removeBodyHandler = function(b) { + var c = a.axisList.indexOf(b.body); + c !== -1 && a.axisList.splice(c, 1) + } + } + var e = a("../utils/Utils"), + f = a("../collision/Broadphase"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.setWorld = function(a) { + this.axisList.length = 0, e.appendArray(this.axisList, a.bodies), a.off("addBody", this._addBodyHandler).off("removeBody", this._removeBodyHandler), a.on("addBody", this._addBodyHandler).on("removeBody", this._removeBodyHandler), this.world = a + }, d.sortAxisList = function(a, b) { + b = 0 | b; + for (var c = 1, d = a.length; c < d; c++) { + for (var e = a[c], f = c - 1; f >= 0 && !(a[f].aabb.lowerBound[b] <= e.aabb.lowerBound[b]); f--) a[f + 1] = a[f]; + a[f + 1] = e + } + return a + }, d.prototype.sortList = function() { + var a = this.axisList, + b = this.axisIndex; + d.sortAxisList(a, b) + }, d.prototype.getCollisionPairs = function(a) { + var b = this.axisList, + c = this.result, + d = this.axisIndex; + c.length = 0; + for (var e = b.length; e--;) { + var g = b[e]; + g.aabbNeedsUpdate && g.updateAABB() + } + this.sortList(); + for (var h = 0, i = 0 | b.length; h !== i; h++) + for (var j = b[h], k = h + 1; k < i; k++) { + var l = b[k], + m = l.aabb.lowerBound[d] <= j.aabb.upperBound[d]; + if (!m) break; + f.canCollide(j, l) && this.boundingVolumeCheck(j, l) && c.push(j, l) + } + return c + }, d.prototype.aabbQuery = function(a, b, c) { + c = c || [], this.sortList(); + var d = this.axisIndex, + e = "x"; + 1 === d && (e = "y"), 2 === d && (e = "z"); + for (var f = this.axisList, g = (b.lowerBound[e], b.upperBound[e], 0); g < f.length; g++) { + var h = f[g]; + h.aabbNeedsUpdate && h.updateAABB(), h.aabb.overlaps(b) && c.push(h) + } + return c + } + }, { + "../collision/Broadphase": 8, + "../utils/Utils": 57 + }], + 14: [function(a, b, c) { + function d(a, b, c, d) { + this.type = c, d = e.defaults(d, { + collideConnected: !0, + wakeUpBodies: !0 + }), this.equations = [], this.bodyA = a, this.bodyB = b, this.collideConnected = d.collideConnected, d.wakeUpBodies && (a && a.wakeUp(), b && b.wakeUp()) + } + b.exports = d; + var e = a("../utils/Utils"); + d.prototype.update = function() { + throw new Error("method update() not implmemented in this Constraint subclass!") + }, d.DISTANCE = 1, d.GEAR = 2, d.LOCK = 3, d.PRISMATIC = 4, d.REVOLUTE = 5, d.prototype.setStiffness = function(a) { + for (var b = this.equations, c = 0; c !== b.length; c++) { + var d = b[c]; + d.stiffness = a, d.needsUpdate = !0 + } + }, d.prototype.setRelaxation = function(a) { + for (var b = this.equations, c = 0; c !== b.length; c++) { + var d = b[c]; + d.relaxation = a, d.needsUpdate = !0 + } + } + }, { + "../utils/Utils": 57 + }], + 15: [function(a, b, c) { + function d(a, b, c) { + c = h.defaults(c, { + localAnchorA: [0, 0], + localAnchorB: [0, 0] + }), e.call(this, a, b, e.DISTANCE, c), this.localAnchorA = g.fromValues(c.localAnchorA[0], c.localAnchorA[1]), this.localAnchorB = g.fromValues(c.localAnchorB[0], c.localAnchorB[1]); + var d = this.localAnchorA, + i = this.localAnchorB; + if (this.distance = 0, "number" == typeof c.distance) this.distance = c.distance; + else { + var j = g.create(), + k = g.create(), + l = g.create(); + g.rotate(j, d, a.angle), g.rotate(k, i, b.angle), g.add(l, b.position, k), g.sub(l, l, j), g.sub(l, l, a.position), this.distance = g.length(l) + } + var m; + m = "undefined" == typeof c.maxForce ? Number.MAX_VALUE : c.maxForce; + var n = new f(a, b, (-m), m); + this.equations = [n], this.maxForce = m; + var l = g.create(), + o = g.create(), + p = g.create(), + q = this; + n.computeGq = function() { + var a = this.bodyA, + b = this.bodyB, + c = a.position, + e = b.position; + return g.rotate(o, d, a.angle), g.rotate(p, i, b.angle), g.add(l, e, p), g.sub(l, l, o), g.sub(l, l, c), g.length(l) - q.distance + }, this.setMaxForce(m), this.upperLimitEnabled = !1, this.upperLimit = 1, this.lowerLimitEnabled = !1, this.lowerLimit = 0, this.position = 0 + } + var e = a("./Constraint"), + f = a("../equations/Equation"), + g = a("../math/vec2"), + h = a("../utils/Utils"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d; + var i = g.create(), + j = g.create(), + k = g.create(); + d.prototype.update = function() { + var a = this.equations[0], + b = this.bodyA, + c = this.bodyB, + d = (this.distance, b.position), + e = c.position, + f = this.equations[0], + h = a.G; + g.rotate(j, this.localAnchorA, b.angle), g.rotate(k, this.localAnchorB, c.angle), g.add(i, e, k), g.sub(i, i, j), g.sub(i, i, d), this.position = g.length(i); + var l = !1; + if (this.upperLimitEnabled && this.position > this.upperLimit && (f.maxForce = 0, f.minForce = -this.maxForce, this.distance = this.upperLimit, l = !0), this.lowerLimitEnabled && this.position < this.lowerLimit && (f.maxForce = this.maxForce, f.minForce = 0, this.distance = this.lowerLimit, l = !0), (this.lowerLimitEnabled || this.upperLimitEnabled) && !l) return void(f.enabled = !1); + f.enabled = !0, g.normalize(i, i); + var m = g.crossLength(j, i), + n = g.crossLength(k, i); + h[0] = -i[0], h[1] = -i[1], h[2] = -m, h[3] = i[0], h[4] = i[1], h[5] = n + }, d.prototype.setMaxForce = function(a) { + var b = this.equations[0]; + b.minForce = -a, b.maxForce = a + }, d.prototype.getMaxForce = function() { + var a = this.equations[0]; + return a.maxForce + } + }, { + "../equations/Equation": 22, + "../math/vec2": 30, + "../utils/Utils": 57, + "./Constraint": 14 + }], + 16: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, e.call(this, a, b, e.GEAR, c), this.ratio = void 0 !== c.ratio ? c.ratio : 1, this.angle = void 0 !== c.angle ? c.angle : b.angle - this.ratio * a.angle, c.angle = this.angle, c.ratio = this.ratio, this.equations = [new f(a, b, c)], void 0 !== c.maxTorque && this.setMaxTorque(c.maxTorque) + } + var e = a("./Constraint"), + f = (a("../equations/Equation"), a("../equations/AngleLockEquation")); + a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.update = function() { + var a = this.equations[0]; + a.ratio !== this.ratio && a.setRatio(this.ratio), a.angle = this.angle + }, d.prototype.setMaxTorque = function(a) { + this.equations[0].setMaxTorque(a) + }, d.prototype.getMaxTorque = function(a) { + return this.equations[0].maxForce + } + }, { + "../equations/AngleLockEquation": 20, + "../equations/Equation": 22, + "../math/vec2": 30, + "./Constraint": 14 + }], + 17: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, e.call(this, a, b, e.LOCK, c); + var d = "undefined" == typeof c.maxForce ? Number.MAX_VALUE : c.maxForce, + h = (c.localAngleB || 0, new g(a, b, (-d), d)), + i = new g(a, b, (-d), d), + j = new g(a, b, (-d), d), + k = f.create(), + l = f.create(), + m = this; + h.computeGq = function() { + return f.rotate(k, m.localOffsetB, a.angle), f.sub(l, b.position, a.position), f.sub(l, l, k), l[0] + }, i.computeGq = function() { + return f.rotate(k, m.localOffsetB, a.angle), f.sub(l, b.position, a.position), f.sub(l, l, k), l[1] + }; + var n = f.create(), + o = f.create(); + j.computeGq = function() { + return f.rotate(n, m.localOffsetB, b.angle - m.localAngleB), f.scale(n, n, -1), f.sub(l, a.position, b.position), f.add(l, l, n), f.rotate(o, n, -Math.PI / 2), f.normalize(o, o), f.dot(l, o) + }, this.localOffsetB = f.create(), c.localOffsetB ? f.copy(this.localOffsetB, c.localOffsetB) : (f.sub(this.localOffsetB, b.position, a.position), f.rotate(this.localOffsetB, this.localOffsetB, -a.angle)), this.localAngleB = 0, "number" == typeof c.localAngleB ? this.localAngleB = c.localAngleB : this.localAngleB = b.angle - a.angle, this.equations.push(h, i, j), this.setMaxForce(d) + } + var e = a("./Constraint"), + f = a("../math/vec2"), + g = a("../equations/Equation"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.setMaxForce = function(a) { + for (var b = this.equations, c = 0; c < this.equations.length; c++) b[c].maxForce = a, b[c].minForce = -a + }, d.prototype.getMaxForce = function() { + return this.equations[0].maxForce + }; + var h = f.create(), + i = f.create(), + j = f.create(), + k = f.fromValues(1, 0), + l = f.fromValues(0, 1); + d.prototype.update = function() { + var a = this.equations[0], + b = this.equations[1], + c = this.equations[2], + d = this.bodyA, + e = this.bodyB; + f.rotate(h, this.localOffsetB, d.angle), f.rotate(i, this.localOffsetB, e.angle - this.localAngleB), f.scale(i, i, -1), f.rotate(j, i, Math.PI / 2), f.normalize(j, j), a.G[0] = -1, a.G[1] = 0, a.G[2] = -f.crossLength(h, k), a.G[3] = 1, b.G[0] = 0, b.G[1] = -1, b.G[2] = -f.crossLength(h, l), b.G[4] = 1, c.G[0] = -j[0], c.G[1] = -j[1], c.G[3] = j[0], c.G[4] = j[1], c.G[5] = f.crossLength(i, j) + } + }, { + "../equations/Equation": 22, + "../math/vec2": 30, + "./Constraint": 14 + }], + 18: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, e.call(this, a, b, e.PRISMATIC, c); + var d = h.fromValues(0, 0), + j = h.fromValues(1, 0), + k = h.fromValues(0, 0); + c.localAnchorA && h.copy(d, c.localAnchorA), c.localAxisA && h.copy(j, c.localAxisA), c.localAnchorB && h.copy(k, c.localAnchorB), this.localAnchorA = d, this.localAnchorB = k, this.localAxisA = j; + var l = this.maxForce = "undefined" != typeof c.maxForce ? c.maxForce : Number.MAX_VALUE, + m = new g(a, b, (-l), l), + n = new h.create, + o = new h.create, + p = new h.create, + q = new h.create; + if (m.computeGq = function() { + return h.dot(p, q) + }, m.updateJacobian = function() { + var c = this.G, + e = a.position, + f = b.position; + h.rotate(n, d, a.angle), h.rotate(o, k, b.angle), h.add(p, f, o), h.sub(p, p, e), h.sub(p, p, n), h.rotate(q, j, a.angle + Math.PI / 2), c[0] = -q[0], c[1] = -q[1], c[2] = -h.crossLength(n, q) + h.crossLength(q, p), c[3] = q[0], c[4] = q[1], c[5] = h.crossLength(o, q) + }, this.equations.push(m), !c.disableRotationalLock) { + var r = new i(a, b, (-l), l); + this.equations.push(r) + } + this.position = 0, this.velocity = 0, this.lowerLimitEnabled = "undefined" != typeof c.lowerLimit, this.upperLimitEnabled = "undefined" != typeof c.upperLimit, this.lowerLimit = "undefined" != typeof c.lowerLimit ? c.lowerLimit : 0, this.upperLimit = "undefined" != typeof c.upperLimit ? c.upperLimit : 1, this.upperLimitEquation = new f(a, b), this.lowerLimitEquation = new f(a, b), this.upperLimitEquation.minForce = this.lowerLimitEquation.minForce = 0, this.upperLimitEquation.maxForce = this.lowerLimitEquation.maxForce = l, this.motorEquation = new g(a, b), this.motorEnabled = !1, this.motorSpeed = 0; + var s = this, + t = this.motorEquation; + t.computeGW; + t.computeGq = function() { + return 0 + }, t.computeGW = function() { + var a = this.G, + b = this.bodyA, + c = this.bodyB, + d = b.velocity, + e = c.velocity, + f = b.angularVelocity, + g = c.angularVelocity; + return this.gmult(a, d, f, e, g) + s.motorSpeed + } + } + var e = a("./Constraint"), + f = a("../equations/ContactEquation"), + g = a("../equations/Equation"), + h = a("../math/vec2"), + i = a("../equations/RotationalLockEquation"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d; + var j = h.create(), + k = h.create(), + l = h.create(), + m = h.create(), + n = h.create(), + o = h.create(); + d.prototype.update = function() { + var a = this.equations, + b = a[0], + c = this.upperLimit, + d = this.lowerLimit, + e = this.upperLimitEquation, + f = this.lowerLimitEquation, + g = this.bodyA, + i = this.bodyB, + p = this.localAxisA, + q = this.localAnchorA, + r = this.localAnchorB; + b.updateJacobian(), h.rotate(j, p, g.angle), h.rotate(m, q, g.angle), h.add(k, m, g.position), h.rotate(n, r, i.angle), h.add(l, n, i.position); + var s = this.position = h.dot(l, j) - h.dot(k, j); + if (this.motorEnabled) { + var t = this.motorEquation.G; + t[0] = j[0], t[1] = j[1], t[2] = h.crossLength(j, n), t[3] = -j[0], t[4] = -j[1], t[5] = -h.crossLength(j, m) + } + if (this.upperLimitEnabled && s > c) h.scale(e.normalA, j, -1), h.sub(e.contactPointA, k, g.position), h.sub(e.contactPointB, l, i.position), h.scale(o, j, c), h.add(e.contactPointA, e.contactPointA, o), a.indexOf(e) === -1 && a.push(e); + else { + var u = a.indexOf(e); + u !== -1 && a.splice(u, 1) + } + if (this.lowerLimitEnabled && s < d) h.scale(f.normalA, j, 1), h.sub(f.contactPointA, k, g.position), h.sub(f.contactPointB, l, i.position), h.scale(o, j, d), h.sub(f.contactPointB, f.contactPointB, o), a.indexOf(f) === -1 && a.push(f); + else { + var u = a.indexOf(f); + u !== -1 && a.splice(u, 1) + } + }, d.prototype.enableMotor = function() { + this.motorEnabled || (this.equations.push(this.motorEquation), this.motorEnabled = !0) + }, d.prototype.disableMotor = function() { + if (this.motorEnabled) { + var a = this.equations.indexOf(this.motorEquation); + this.equations.splice(a, 1), this.motorEnabled = !1 + } + }, d.prototype.setLimits = function(a, b) { + "number" == typeof a ? (this.lowerLimit = a, this.lowerLimitEnabled = !0) : (this.lowerLimit = a, this.lowerLimitEnabled = !1), "number" == typeof b ? (this.upperLimit = b, this.upperLimitEnabled = !0) : (this.upperLimit = b, this.upperLimitEnabled = !1) + } + }, { + "../equations/ContactEquation": 21, + "../equations/Equation": 22, + "../equations/RotationalLockEquation": 24, + "../math/vec2": 30, + "./Constraint": 14 + }], + 19: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, e.call(this, a, b, e.REVOLUTE, c); + var d = this.maxForce = "undefined" != typeof c.maxForce ? c.maxForce : Number.MAX_VALUE; + this.pivotA = i.create(), this.pivotB = i.create(), c.worldPivot ? (i.sub(this.pivotA, c.worldPivot, a.position), i.sub(this.pivotB, c.worldPivot, b.position), i.rotate(this.pivotA, this.pivotA, -a.angle), i.rotate(this.pivotB, this.pivotB, -b.angle)) : (i.copy(this.pivotA, c.localPivotA), i.copy(this.pivotB, c.localPivotB)); + var o = this.equations = [new f(a, b, (-d), d), new f(a, b, (-d), d)], + p = o[0], + q = o[1], + r = this; + p.computeGq = function() { + return i.rotate(j, r.pivotA, a.angle), i.rotate(k, r.pivotB, b.angle), i.add(n, b.position, k), i.sub(n, n, a.position), i.sub(n, n, j), i.dot(n, l) + }, q.computeGq = function() { + return i.rotate(j, r.pivotA, a.angle), i.rotate(k, r.pivotB, b.angle), i.add(n, b.position, k), i.sub(n, n, a.position), i.sub(n, n, j), i.dot(n, m) + }, q.minForce = p.minForce = -d, q.maxForce = p.maxForce = d, this.motorEquation = new g(a, b), this.motorEnabled = !1, this.angle = 0, this.lowerLimitEnabled = !1, this.upperLimitEnabled = !1, this.lowerLimit = 0, this.upperLimit = 0, this.upperLimitEquation = new h(a, b), this.lowerLimitEquation = new h(a, b), this.upperLimitEquation.minForce = 0, this.lowerLimitEquation.maxForce = 0 + } + var e = a("./Constraint"), + f = a("../equations/Equation"), + g = a("../equations/RotationalVelocityEquation"), + h = a("../equations/RotationalLockEquation"), + i = a("../math/vec2"); + b.exports = d; + var j = i.create(), + k = i.create(), + l = i.fromValues(1, 0), + m = i.fromValues(0, 1), + n = i.create(); + d.prototype = new e, d.prototype.constructor = d, d.prototype.setLimits = function(a, b) { + "number" == typeof a ? (this.lowerLimit = a, this.lowerLimitEnabled = !0) : (this.lowerLimit = a, this.lowerLimitEnabled = !1), "number" == typeof b ? (this.upperLimit = b, this.upperLimitEnabled = !0) : (this.upperLimit = b, this.upperLimitEnabled = !1) + }, d.prototype.update = function() { + var a = this.bodyA, + b = this.bodyB, + c = this.pivotA, + d = this.pivotB, + e = this.equations, + f = (e[0], e[1], e[0]), + g = e[1], + h = this.upperLimit, + n = this.lowerLimit, + o = this.upperLimitEquation, + p = this.lowerLimitEquation, + q = this.angle = b.angle - a.angle; + if (this.upperLimitEnabled && q > h) o.angle = h, e.indexOf(o) === -1 && e.push(o); + else { + var r = e.indexOf(o); + r !== -1 && e.splice(r, 1) + } + if (this.lowerLimitEnabled && q < n) p.angle = n, e.indexOf(p) === -1 && e.push(p); + else { + var r = e.indexOf(p); + r !== -1 && e.splice(r, 1) + } + i.rotate(j, c, a.angle), i.rotate(k, d, b.angle), f.G[0] = -1, f.G[1] = 0, f.G[2] = -i.crossLength(j, l), f.G[3] = 1, f.G[4] = 0, f.G[5] = i.crossLength(k, l), g.G[0] = 0, g.G[1] = -1, g.G[2] = -i.crossLength(j, m), g.G[3] = 0, g.G[4] = 1, g.G[5] = i.crossLength(k, m) + }, d.prototype.enableMotor = function() { + this.motorEnabled || (this.equations.push(this.motorEquation), this.motorEnabled = !0) + }, d.prototype.disableMotor = function() { + if (this.motorEnabled) { + var a = this.equations.indexOf(this.motorEquation); + this.equations.splice(a, 1), this.motorEnabled = !1 + } + }, d.prototype.motorIsEnabled = function() { + return !!this.motorEnabled + }, d.prototype.setMotorSpeed = function(a) { + if (this.motorEnabled) { + var b = this.equations.indexOf(this.motorEquation); + this.equations[b].relativeVelocity = a + } + }, d.prototype.getMotorSpeed = function() { + return !!this.motorEnabled && this.motorEquation.relativeVelocity + } + }, { + "../equations/Equation": 22, + "../equations/RotationalLockEquation": 24, + "../equations/RotationalVelocityEquation": 25, + "../math/vec2": 30, + "./Constraint": 14 + }], + 20: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, e.call(this, a, b, -Number.MAX_VALUE, Number.MAX_VALUE), this.angle = c.angle || 0, this.ratio = "number" == typeof c.ratio ? c.ratio : 1, this.setRatio(this.ratio) + } + var e = a("./Equation"); + a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeGq = function() { + return this.ratio * this.bodyA.angle - this.bodyB.angle + this.angle + }, d.prototype.setRatio = function(a) { + var b = this.G; + b[2] = a, b[5] = -1, this.ratio = a + }, d.prototype.setMaxTorque = function(a) { + this.maxForce = a, this.minForce = -a + } + }, { + "../math/vec2": 30, + "./Equation": 22 + }], + 21: [function(a, b, c) { + function d(a, b) { + e.call(this, a, b, 0, Number.MAX_VALUE), this.contactPointA = f.create(), this.penetrationVec = f.create(), this.contactPointB = f.create(), this.normalA = f.create(), this.restitution = 0, this.firstImpact = !1, this.shapeA = null, this.shapeB = null + } + var e = a("./Equation"), + f = a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeB = function(a, b, c) { + var d = this.bodyA, + e = this.bodyB, + g = this.contactPointA, + h = this.contactPointB, + i = d.position, + j = e.position, + k = this.penetrationVec, + l = this.normalA, + m = this.G, + n = f.crossLength(g, l), + o = f.crossLength(h, l); + m[0] = -l[0], m[1] = -l[1], m[2] = -n, m[3] = l[0], m[4] = l[1], m[5] = o, f.add(k, j, h), f.sub(k, k, i), f.sub(k, k, g); + var p, q; + this.firstImpact && 0 !== this.restitution ? (q = 0, p = 1 / b * (1 + this.restitution) * this.computeGW()) : (q = f.dot(l, k) + this.offset, p = this.computeGW()); + var r = this.computeGiMf(), + s = -q * a - p * b - c * r; + return s + } + }, { + "../math/vec2": 30, + "./Equation": 22 + }], + 22: [function(a, b, c) { + function d(a, b, c, e) { + this.minForce = "undefined" == typeof c ? -Number.MAX_VALUE : c, this.maxForce = "undefined" == typeof e ? Number.MAX_VALUE : e, this.bodyA = a, this.bodyB = b, this.stiffness = d.DEFAULT_STIFFNESS, this.relaxation = d.DEFAULT_RELAXATION, this.G = new f.ARRAY_TYPE(6); + for (var g = 0; g < 6; g++) this.G[g] = 0; + this.offset = 0, this.a = 0, this.b = 0, this.epsilon = 0, this.timeStep = 1 / 60, this.needsUpdate = !0, this.multiplier = 0, this.relativeVelocity = 0, this.enabled = !0 + } + b.exports = d; + var e = a("../math/vec2"), + f = a("../utils/Utils"); + a("../objects/Body"); + d.prototype.constructor = d, d.DEFAULT_STIFFNESS = 1e6, d.DEFAULT_RELAXATION = 4, d.prototype.update = function() { + var a = this.stiffness, + b = this.relaxation, + c = this.timeStep; + this.a = 4 / (c * (1 + 4 * b)), this.b = 4 * b / (1 + 4 * b), this.epsilon = 4 / (c * c * a * (1 + 4 * b)), this.needsUpdate = !1 + }, d.prototype.gmult = function(a, b, c, d, e) { + return a[0] * b[0] + a[1] * b[1] + a[2] * c + a[3] * d[0] + a[4] * d[1] + a[5] * e + }, d.prototype.computeB = function(a, b, c) { + var d = this.computeGW(), + e = this.computeGq(), + f = this.computeGiMf(); + return -e * a - d * b - f * c + }; + var g = e.create(), + h = e.create(); + d.prototype.computeGq = function() { + var a = this.G, + b = this.bodyA, + c = this.bodyB, + d = (b.position, c.position, b.angle), + e = c.angle; + return this.gmult(a, g, d, h, e) + this.offset + }, d.prototype.computeGW = function() { + var a = this.G, + b = this.bodyA, + c = this.bodyB, + d = b.velocity, + e = c.velocity, + f = b.angularVelocity, + g = c.angularVelocity; + return this.gmult(a, d, f, e, g) + this.relativeVelocity + }, d.prototype.computeGWlambda = function() { + var a = this.G, + b = this.bodyA, + c = this.bodyB, + d = b.vlambda, + e = c.vlambda, + f = b.wlambda, + g = c.wlambda; + return this.gmult(a, d, f, e, g) + }; + var i = e.create(), + j = e.create(); + d.prototype.computeGiMf = function() { + var a = this.bodyA, + b = this.bodyB, + c = a.force, + d = a.angularForce, + f = b.force, + g = b.angularForce, + h = a.invMassSolve, + k = b.invMassSolve, + l = a.invInertiaSolve, + m = b.invInertiaSolve, + n = this.G; + return e.scale(i, c, h), e.multiply(i, a.massMultiplier, i), e.scale(j, f, k), e.multiply(j, b.massMultiplier, j), this.gmult(n, i, d * l, j, g * m) + }, d.prototype.computeGiMGt = function() { + var a = this.bodyA, + b = this.bodyB, + c = a.invMassSolve, + d = b.invMassSolve, + e = a.invInertiaSolve, + f = b.invInertiaSolve, + g = this.G; + return g[0] * g[0] * c * a.massMultiplier[0] + g[1] * g[1] * c * a.massMultiplier[1] + g[2] * g[2] * e + g[3] * g[3] * d * b.massMultiplier[0] + g[4] * g[4] * d * b.massMultiplier[1] + g[5] * g[5] * f + }; + var k = e.create(), + l = e.create(), + m = e.create(); + e.create(), e.create(), e.create(); + d.prototype.addToWlambda = function(a) { + var b = this.bodyA, + c = this.bodyB, + d = k, + f = l, + g = m, + h = b.invMassSolve, + i = c.invMassSolve, + j = b.invInertiaSolve, + n = c.invInertiaSolve, + o = this.G; + f[0] = o[0], f[1] = o[1], g[0] = o[3], g[1] = o[4], e.scale(d, f, h * a), e.multiply(d, d, b.massMultiplier), e.add(b.vlambda, b.vlambda, d), b.wlambda += j * o[2] * a, e.scale(d, g, i * a), e.multiply(d, d, c.massMultiplier), e.add(c.vlambda, c.vlambda, d), c.wlambda += n * o[5] * a + }, d.prototype.computeInvC = function(a) { + return 1 / (this.computeGiMGt() + a) + } + }, { + "../math/vec2": 30, + "../objects/Body": 31, + "../utils/Utils": 57 + }], + 23: [function(a, b, c) { + function d(a, b, c) { + f.call(this, a, b, -c, c), this.contactPointA = e.create(), this.contactPointB = e.create(), this.t = e.create(), this.contactEquations = [], this.shapeA = null, this.shapeB = null, this.frictionCoefficient = .3 + } + var e = a("../math/vec2"), + f = a("./Equation"); + a("../utils/Utils"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.setSlipForce = function(a) { + this.maxForce = a, this.minForce = -a + }, d.prototype.getSlipForce = function() { + return this.maxForce + }, d.prototype.computeB = function(a, b, c) { + var d = (this.bodyA, this.bodyB, this.contactPointA), + f = this.contactPointB, + g = this.t, + h = this.G; + h[0] = -g[0], h[1] = -g[1], h[2] = -e.crossLength(d, g), h[3] = g[0], h[4] = g[1], h[5] = e.crossLength(f, g); + var i = this.computeGW(), + j = this.computeGiMf(), + k = -i * b - c * j; + return k + } + }, { + "../math/vec2": 30, + "../utils/Utils": 57, + "./Equation": 22 + }], + 24: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, e.call(this, a, b, -Number.MAX_VALUE, Number.MAX_VALUE), this.angle = c.angle || 0; + var d = this.G; + d[2] = 1, d[5] = -1 + } + var e = a("./Equation"), + f = a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d; + var g = f.create(), + h = f.create(), + i = f.fromValues(1, 0), + j = f.fromValues(0, 1); + d.prototype.computeGq = function() { + return f.rotate(g, i, this.bodyA.angle + this.angle), f.rotate(h, j, this.bodyB.angle), f.dot(g, h) + } + }, { + "../math/vec2": 30, + "./Equation": 22 + }], + 25: [function(a, b, c) { + function d(a, b) { + e.call(this, a, b, -Number.MAX_VALUE, Number.MAX_VALUE), this.relativeVelocity = 1, this.ratio = 1 + } + var e = a("./Equation"); + a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeB = function(a, b, c) { + var d = this.G; + d[2] = -1, d[5] = this.ratio; + var e = this.computeGiMf(), + f = this.computeGW(), + g = -f * b - c * e; + return g + } + }, { + "../math/vec2": 30, + "./Equation": 22 + }], + 26: [function(a, b, c) { + var d = function() {}; + b.exports = d, d.prototype = { + constructor: d, + on: function(a, b, c) { + b.context = c || this, void 0 === this._listeners && (this._listeners = {}); + var d = this._listeners; + return void 0 === d[a] && (d[a] = []), d[a].indexOf(b) === -1 && d[a].push(b), this + }, + has: function(a, b) { + if (void 0 === this._listeners) return !1; + var c = this._listeners; + if (b) { + if (void 0 !== c[a] && c[a].indexOf(b) !== -1) return !0 + } else if (void 0 !== c[a]) return !0; + return !1 + }, + off: function(a, b) { + if (void 0 === this._listeners) return this; + var c = this._listeners, + d = c[a].indexOf(b); + return d !== -1 && c[a].splice(d, 1), this + }, + emit: function(a) { + if (void 0 === this._listeners) return this; + var b = this._listeners, + c = b[a.type]; + if (void 0 !== c) { + a.target = this; + for (var d = 0, e = c.length; d < e; d++) { + var f = c[d]; + f.call(f.context, a) + } + } + return this + } + } + }, {}], + 27: [function(a, b, c) { + function d(a, b, c) { + if (c = c || {}, !(a instanceof e && b instanceof e)) throw new Error("First two arguments must be Material instances."); + this.id = d.idCounter++, this.materialA = a, this.materialB = b, this.friction = "undefined" != typeof c.friction ? Number(c.friction) : .3, this.restitution = "undefined" != typeof c.restitution ? Number(c.restitution) : 0, this.stiffness = "undefined" != typeof c.stiffness ? Number(c.stiffness) : f.DEFAULT_STIFFNESS, this.relaxation = "undefined" != typeof c.relaxation ? Number(c.relaxation) : f.DEFAULT_RELAXATION, this.frictionStiffness = "undefined" != typeof c.frictionStiffness ? Number(c.frictionStiffness) : f.DEFAULT_STIFFNESS, this.frictionRelaxation = "undefined" != typeof c.frictionRelaxation ? Number(c.frictionRelaxation) : f.DEFAULT_RELAXATION, this.surfaceVelocity = "undefined" != typeof c.surfaceVelocity ? Number(c.surfaceVelocity) : 0, this.contactSkinSize = .005 + } + var e = a("./Material"), + f = a("../equations/Equation"); + b.exports = d, d.idCounter = 0 + }, { + "../equations/Equation": 22, + "./Material": 28 + }], + 28: [function(a, b, c) { + function d(a) { + this.id = a || d.idCounter++ + } + b.exports = d, d.idCounter = 0 + }, {}], + 29: [function(a, b, c) { + var d = {}; + d.GetArea = function(a) { + if (a.length < 6) return 0; + for (var b = a.length - 2, c = 0, d = 0; d < b; d += 2) c += (a[d + 2] - a[d]) * (a[d + 1] + a[d + 3]); + return c += (a[0] - a[b]) * (a[b + 1] + a[1]), .5 * -c + }, d.Triangulate = function(a) { + var b = a.length >> 1; + if (b < 3) return []; + for (var c = [], e = [], f = 0; f < b; f++) e.push(f); + for (var f = 0, g = b; g > 3;) { + var h = e[(f + 0) % g], + i = e[(f + 1) % g], + j = e[(f + 2) % g], + k = a[2 * h], + l = a[2 * h + 1], + m = a[2 * i], + n = a[2 * i + 1], + o = a[2 * j], + p = a[2 * j + 1], + q = !1; + if (d._convex(k, l, m, n, o, p)) { + q = !0; + for (var r = 0; r < g; r++) { + var s = e[r]; + if (s != h && s != i && s != j && d._PointInTriangle(a[2 * s], a[2 * s + 1], k, l, m, n, o, p)) { + q = !1; + break + } + } + } + if (q) c.push(h, i, j), e.splice((f + 1) % g, 1), g--, f = 0; + else if (f++ > 3 * g) break + } + return c.push(e[0], e[1], e[2]), c + }, d._PointInTriangle = function(a, b, c, d, e, f, g, h) { + var i = g - c, + j = h - d, + k = e - c, + l = f - d, + m = a - c, + n = b - d, + o = i * i + j * j, + p = i * k + j * l, + q = i * m + j * n, + r = k * k + l * l, + s = k * m + l * n, + t = 1 / (o * r - p * p), + u = (r * q - p * s) * t, + v = (o * s - p * q) * t; + return u >= 0 && v >= 0 && u + v < 1 + }, d._convex = function(a, b, c, d, e, f) { + return (b - d) * (e - c) + (c - a) * (f - d) >= 0 + }, b.exports = d + }, {}], + 30: [function(a, b, c) { + var d = b.exports = {}, + e = a("../utils/Utils"); + d.crossLength = function(a, b) { + return a[0] * b[1] - a[1] * b[0] + }, d.crossVZ = function(a, b, c) { + return d.rotate(a, b, -Math.PI / 2), d.scale(a, a, c), a + }, d.crossZV = function(a, b, c) { + return d.rotate(a, c, Math.PI / 2), d.scale(a, a, b), a + }, d.rotate = function(a, b, c) { + if (0 !== c) { + var d = Math.cos(c), + e = Math.sin(c), + f = b[0], + g = b[1]; + a[0] = d * f - e * g, a[1] = e * f + d * g + } else a[0] = b[0], a[1] = b[1] + }, d.rotate90cw = function(a, b) { + var c = b[0], + d = b[1]; + a[0] = d, a[1] = -c + }, d.toLocalFrame = function(a, b, c, e) { + d.copy(a, b), d.sub(a, a, c), d.rotate(a, a, -e) + }, d.toGlobalFrame = function(a, b, c, e) { + d.copy(a, b), d.rotate(a, a, e), d.add(a, a, c) + }, d.vectorToLocalFrame = function(a, b, c) { + d.rotate(a, b, -c) + }, d.vectorToGlobalFrame = function(a, b, c) { + d.rotate(a, b, c) + }, d.centroid = function(a, b, c, e) { + return d.add(a, b, c), d.add(a, a, e), d.scale(a, a, 1 / 3), a + }, d.create = function() { + var a = new e.ARRAY_TYPE(2); + return a[0] = 0, a[1] = 0, a + }, d.clone = function(a) { + var b = new e.ARRAY_TYPE(2); + return b[0] = a[0], b[1] = a[1], b + }, d.fromValues = function(a, b) { + var c = new e.ARRAY_TYPE(2); + return c[0] = a, c[1] = b, c + }, d.copy = function(a, b) { + return a[0] = b[0], a[1] = b[1], a + }, d.set = function(a, b, c) { + return a[0] = b, a[1] = c, a + }, d.add = function(a, b, c) { + return a[0] = b[0] + c[0], a[1] = b[1] + c[1], a + }, d.subtract = function(a, b, c) { + return a[0] = b[0] - c[0], a[1] = b[1] - c[1], a + }, d.sub = d.subtract, d.multiply = function(a, b, c) { + return a[0] = b[0] * c[0], a[1] = b[1] * c[1], a + }, d.mul = d.multiply, d.divide = function(a, b, c) { + return a[0] = b[0] / c[0], a[1] = b[1] / c[1], a + }, d.div = d.divide, d.scale = function(a, b, c) { + return a[0] = b[0] * c, a[1] = b[1] * c, a + }, d.distance = function(a, b) { + var c = b[0] - a[0], + d = b[1] - a[1]; + return Math.sqrt(c * c + d * d) + }, d.dist = d.distance, d.squaredDistance = function(a, b) { + var c = b[0] - a[0], + d = b[1] - a[1]; + return c * c + d * d + }, d.sqrDist = d.squaredDistance, d.length = function(a) { + var b = a[0], + c = a[1]; + return Math.sqrt(b * b + c * c) + }, d.len = d.length, d.squaredLength = function(a) { + var b = a[0], + c = a[1]; + return b * b + c * c + }, d.sqrLen = d.squaredLength, d.negate = function(a, b) { + return a[0] = -b[0], a[1] = -b[1], a + }, d.normalize = function(a, b) { + var c = b[0], + d = b[1], + e = c * c + d * d; + return e > 0 && (e = 1 / Math.sqrt(e), a[0] = b[0] * e, a[1] = b[1] * e), a + }, d.dot = function(a, b) { + return a[0] * b[0] + a[1] * b[1] + }, d.str = function(a) { + return "vec2(" + a[0] + ", " + a[1] + ")" + }, d.lerp = function(a, b, c, d) { + var e = b[0], + f = b[1]; + return a[0] = e + d * (c[0] - e), a[1] = f + d * (c[1] - f), a + }, d.reflect = function(a, b, c) { + var d = b[0] * c[0] + b[1] * c[1]; + a[0] = b[0] - 2 * c[0] * d, a[1] = b[1] - 2 * c[1] * d + }, d.getLineSegmentsIntersection = function(a, b, c, e, f) { + var g = d.getLineSegmentsIntersectionFraction(b, c, e, f); + return !(g < 0) && (a[0] = b[0] + g * (c[0] - b[0]), a[1] = b[1] + g * (c[1] - b[1]), !0) + }, d.getLineSegmentsIntersectionFraction = function(a, b, c, d) { + var e, f, g = b[0] - a[0], + h = b[1] - a[1], + i = d[0] - c[0], + j = d[1] - c[1]; + return e = (-h * (a[0] - c[0]) + g * (a[1] - c[1])) / (-i * h + g * j), f = (i * (a[1] - c[1]) - j * (a[0] - c[0])) / (-i * h + g * j), e >= 0 && e <= 1 && f >= 0 && f <= 1 ? f : -1 + } + }, { + "../utils/Utils": 57 + }], + 31: [function(a, b, c) { + function d(a) { + a = a || {}, k.call(this), this.id = a.id || ++d._idCounter, this.world = null, this.shapes = [], this.mass = a.mass || 0, this.invMass = 0, this.inertia = 0, this.invInertia = 0, this.invMassSolve = 0, this.invInertiaSolve = 0, this.fixedRotation = !!a.fixedRotation, this.fixedX = !!a.fixedX, this.fixedY = !!a.fixedY, this.massMultiplier = e.create(), this.position = e.fromValues(0, 0), a.position && e.copy(this.position, a.position), this.interpolatedPosition = e.fromValues(0, 0), this.interpolatedAngle = 0, this.previousPosition = e.fromValues(0, 0), this.previousAngle = 0, this.velocity = e.fromValues(0, 0), a.velocity && e.copy(this.velocity, a.velocity), this.vlambda = e.fromValues(0, 0), this.wlambda = 0, this.angle = a.angle || 0, this.angularVelocity = a.angularVelocity || 0, this.force = e.create(), a.force && e.copy(this.force, a.force), this.angularForce = a.angularForce || 0, this.damping = "number" == typeof a.damping ? a.damping : .1, this.angularDamping = "number" == typeof a.angularDamping ? a.angularDamping : .1, this.type = d.STATIC, "undefined" != typeof a.type ? this.type = a.type : a.mass ? this.type = d.DYNAMIC : this.type = d.STATIC, this.boundingRadius = 0, this.aabb = new j, this.aabbNeedsUpdate = !0, this.allowSleep = void 0 === a.allowSleep || a.allowSleep, + this.wantsToSleep = !1, this.sleepState = d.AWAKE, this.sleepSpeedLimit = void 0 !== a.sleepSpeedLimit ? a.sleepSpeedLimit : .2, this.sleepTimeLimit = void 0 !== a.sleepTimeLimit ? a.sleepTimeLimit : 1, this.gravityScale = void 0 !== a.gravityScale ? a.gravityScale : 1, this.collisionResponse = void 0 === a.collisionResponse || a.collisionResponse, this.idleTime = 0, this.timeLastSleepy = 0, this.ccdSpeedThreshold = void 0 !== a.ccdSpeedThreshold ? a.ccdSpeedThreshold : -1, this.ccdIterations = void 0 !== a.ccdIterations ? a.ccdIterations : 10, this.concavePath = null, this._wakeUpAfterNarrowphase = !1, this.updateMassProperties() + } + var e = a("../math/vec2"), + f = a("poly-decomp"), + g = a("../shapes/Convex"), + h = a("../collision/RaycastResult"), + i = a("../collision/Ray"), + j = a("../collision/AABB"), + k = a("../events/EventEmitter"); + b.exports = d, d.prototype = new k, d.prototype.constructor = d, d._idCounter = 0, d.prototype.updateSolveMassProperties = function() { + this.sleepState === d.SLEEPING || this.type === d.KINEMATIC ? (this.invMassSolve = 0, this.invInertiaSolve = 0) : (this.invMassSolve = this.invMass, this.invInertiaSolve = this.invInertia) + }, d.prototype.setDensity = function(a) { + var b = this.getArea(); + this.mass = b * a, this.updateMassProperties() + }, d.prototype.getArea = function() { + for (var a = 0, b = 0; b < this.shapes.length; b++) a += this.shapes[b].area; + return a + }, d.prototype.getAABB = function() { + return this.aabbNeedsUpdate && this.updateAABB(), this.aabb + }; + var l = new j, + m = e.create(); + d.prototype.updateAABB = function() { + for (var a = this.shapes, b = a.length, c = m, d = this.angle, f = 0; f !== b; f++) { + var g = a[f], + h = g.angle + d; + e.rotate(c, g.position, d), e.add(c, c, this.position), g.computeAABB(l, c, h), 0 === f ? this.aabb.copy(l) : this.aabb.extend(l) + } + this.aabbNeedsUpdate = !1 + }, d.prototype.updateBoundingRadius = function() { + for (var a = this.shapes, b = a.length, c = 0, d = 0; d !== b; d++) { + var f = a[d], + g = e.length(f.position), + h = f.boundingRadius; + g + h > c && (c = g + h) + } + this.boundingRadius = c + }, d.prototype.addShape = function(a, b, c) { + if (a.body) throw new Error("A shape can only be added to one body."); + a.body = this, b ? e.copy(a.position, b) : e.set(a.position, 0, 0), a.angle = c || 0, this.shapes.push(a), this.updateMassProperties(), this.updateBoundingRadius(), this.aabbNeedsUpdate = !0 + }, d.prototype.removeShape = function(a) { + var b = this.shapes.indexOf(a); + return b !== -1 && (this.shapes.splice(b, 1), this.aabbNeedsUpdate = !0, a.body = null, !0) + }, d.prototype.updateMassProperties = function() { + if (this.type === d.STATIC || this.type === d.KINEMATIC) this.mass = Number.MAX_VALUE, this.invMass = 0, this.inertia = Number.MAX_VALUE, this.invInertia = 0; + else { + var a = this.shapes, + b = a.length, + c = this.mass / b, + f = 0; + if (this.fixedRotation) this.inertia = Number.MAX_VALUE, this.invInertia = 0; + else { + for (var g = 0; g < b; g++) { + var h = a[g], + i = e.squaredLength(h.position), + j = h.computeMomentOfInertia(c); + f += j + c * i + } + this.inertia = f, this.invInertia = f > 0 ? 1 / f : 0 + } + this.invMass = 1 / this.mass, e.set(this.massMultiplier, this.fixedX ? 0 : 1, this.fixedY ? 0 : 1) + } + }; + e.create(); + d.prototype.applyForce = function(a, b) { + if (e.add(this.force, this.force, a), b) { + var c = e.crossLength(b, a); + this.angularForce += c + } + }; + var n = e.create(), + o = e.create(), + p = e.create(); + d.prototype.applyForceLocal = function(a, b) { + b = b || p; + var c = n, + d = o; + this.vectorToWorldFrame(c, a), this.vectorToWorldFrame(d, b), this.applyForce(c, d) + }; + var q = e.create(); + d.prototype.applyImpulse = function(a, b) { + if (this.type === d.DYNAMIC) { + var c = q; + if (e.scale(c, a, this.invMass), e.multiply(c, this.massMultiplier, c), e.add(this.velocity, c, this.velocity), b) { + var f = e.crossLength(b, a); + f *= this.invInertia, this.angularVelocity += f + } + } + }; + var r = e.create(), + s = e.create(), + t = e.create(); + d.prototype.applyImpulseLocal = function(a, b) { + b = b || t; + var c = r, + d = s; + this.vectorToWorldFrame(c, a), this.vectorToWorldFrame(d, b), this.applyImpulse(c, d) + }, d.prototype.toLocalFrame = function(a, b) { + e.toLocalFrame(a, b, this.position, this.angle) + }, d.prototype.toWorldFrame = function(a, b) { + e.toGlobalFrame(a, b, this.position, this.angle) + }, d.prototype.vectorToLocalFrame = function(a, b) { + e.vectorToLocalFrame(a, b, this.angle) + }, d.prototype.vectorToWorldFrame = function(a, b) { + e.vectorToGlobalFrame(a, b, this.angle) + }, d.prototype.fromPolygon = function(a, b) { + b = b || {}; + for (var c = this.shapes.length; c >= 0; --c) this.removeShape(this.shapes[c]); + var d = new f.Polygon; + if (d.vertices = a, d.makeCCW(), "number" == typeof b.removeCollinearPoints && d.removeCollinearPoints(b.removeCollinearPoints), "undefined" == typeof b.skipSimpleCheck && !d.isSimple()) return !1; + this.concavePath = d.vertices.slice(0); + for (var c = 0; c < this.concavePath.length; c++) { + var h = [0, 0]; + e.copy(h, this.concavePath[c]), this.concavePath[c] = h + } + var i; + i = b.optimalDecomp ? d.decomp() : d.quickDecomp(); + for (var j = e.create(), c = 0; c !== i.length; c++) { + for (var k = new g({ + vertices: i[c].vertices + }), l = 0; l !== k.vertices.length; l++) { + var h = k.vertices[l]; + e.sub(h, h, k.centerOfMass) + } + e.scale(j, k.centerOfMass, 1), k.updateTriangles(), k.updateCenterOfMass(), k.updateBoundingRadius(), this.addShape(k, j) + } + return this.adjustCenterOfMass(), this.aabbNeedsUpdate = !0, !0 + }; + var u = (e.fromValues(0, 0), e.fromValues(0, 0)), + v = e.fromValues(0, 0), + w = e.fromValues(0, 0); + d.prototype.adjustCenterOfMass = function() { + var a = u, + b = v, + c = w, + d = 0; + e.set(b, 0, 0); + for (var f = 0; f !== this.shapes.length; f++) { + var g = this.shapes[f]; + e.scale(a, g.position, g.area), e.add(b, b, a), d += g.area + } + e.scale(c, b, 1 / d); + for (var f = 0; f !== this.shapes.length; f++) { + var g = this.shapes[f]; + e.sub(g.position, g.position, c) + } + e.add(this.position, this.position, c); + for (var f = 0; this.concavePath && f < this.concavePath.length; f++) e.sub(this.concavePath[f], this.concavePath[f], c); + this.updateMassProperties(), this.updateBoundingRadius() + }, d.prototype.setZeroForce = function() { + e.set(this.force, 0, 0), this.angularForce = 0 + }, d.prototype.resetConstraintVelocity = function() { + var a = this, + b = a.vlambda; + e.set(b, 0, 0), a.wlambda = 0 + }, d.prototype.addConstraintVelocity = function() { + var a = this, + b = a.velocity; + e.add(b, b, a.vlambda), a.angularVelocity += a.wlambda + }, d.prototype.applyDamping = function(a) { + if (this.type === d.DYNAMIC) { + var b = this.velocity; + e.scale(b, b, Math.pow(1 - this.damping, a)), this.angularVelocity *= Math.pow(1 - this.angularDamping, a) + } + }, d.prototype.wakeUp = function() { + var a = this.sleepState; + this.sleepState = d.AWAKE, this.idleTime = 0, a !== d.AWAKE && this.emit(d.wakeUpEvent) + }, d.prototype.sleep = function() { + this.sleepState = d.SLEEPING, this.angularVelocity = 0, this.angularForce = 0, e.set(this.velocity, 0, 0), e.set(this.force, 0, 0), this.emit(d.sleepEvent) + }, d.prototype.sleepTick = function(a, b, c) { + if (this.allowSleep && this.type !== d.SLEEPING) { + this.wantsToSleep = !1; + var f = (this.sleepState, e.squaredLength(this.velocity) + Math.pow(this.angularVelocity, 2)), + g = Math.pow(this.sleepSpeedLimit, 2); + f >= g ? (this.idleTime = 0, this.sleepState = d.AWAKE) : (this.idleTime += c, this.sleepState = d.SLEEPY), this.idleTime > this.sleepTimeLimit && (b ? this.wantsToSleep = !0 : this.sleep()) + } + }, d.prototype.overlaps = function(a) { + return this.world.overlapKeeper.bodiesAreOverlapping(this, a) + }; + var x = e.create(), + y = e.create(); + d.prototype.integrate = function(a) { + var b = this.invMass, + c = this.force, + d = this.position, + f = this.velocity; + e.copy(this.previousPosition, this.position), this.previousAngle = this.angle, this.fixedRotation || (this.angularVelocity += this.angularForce * this.invInertia * a), e.scale(x, c, a * b), e.multiply(x, this.massMultiplier, x), e.add(f, x, f), this.integrateToTimeOfImpact(a) || (e.scale(y, f, a), e.add(d, d, y), this.fixedRotation || (this.angle += this.angularVelocity * a)), this.aabbNeedsUpdate = !0 + }; + var z = new h, + A = new i({ + mode: i.ALL + }), + B = e.create(), + C = e.create(), + D = e.create(), + E = e.create(); + d.prototype.integrateToTimeOfImpact = function(a) { + if (this.ccdSpeedThreshold < 0 || e.squaredLength(this.velocity) < Math.pow(this.ccdSpeedThreshold, 2)) return !1; + e.normalize(B, this.velocity), e.scale(C, this.velocity, a), e.add(C, C, this.position), e.sub(D, C, this.position); + var b, c = this.angularVelocity * a, + d = e.length(D), + f = 1, + g = this; + if (z.reset(), A.callback = function(a) { + a.body !== g && (b = a.body, a.getHitPoint(C, A), e.sub(D, C, g.position), f = e.length(D) / d, a.stop()) + }, e.copy(A.from, this.position), e.copy(A.to, C), A.update(), this.world.raycast(z, A), !b) return !1; + var h = this.angle; + e.copy(E, this.position); + for (var i = 0, j = 0, k = 0, l = f; l >= j && i < this.ccdIterations;) { + i++, k = (l - j) / 2, e.scale(y, D, f), e.add(this.position, E, y), this.angle = h + c * f, this.updateAABB(); + var m = this.aabb.overlaps(b.aabb) && this.world.narrowphase.bodiesOverlap(this, b); + m ? j = k : l = k + } + return f = k, e.copy(this.position, E), this.angle = h, e.scale(y, D, f), e.add(this.position, this.position, y), this.fixedRotation || (this.angle += c * f), !0 + }, d.prototype.getVelocityAtPoint = function(a, b) { + return e.crossVZ(a, b, this.angularVelocity), e.subtract(a, this.velocity, a), a + }, d.sleepyEvent = { + type: "sleepy" + }, d.sleepEvent = { + type: "sleep" + }, d.wakeUpEvent = { + type: "wakeup" + }, d.DYNAMIC = 1, d.STATIC = 2, d.KINEMATIC = 4, d.AWAKE = 0, d.SLEEPY = 1, d.SLEEPING = 2 + }, { + "../collision/AABB": 7, + "../collision/Ray": 11, + "../collision/RaycastResult": 12, + "../events/EventEmitter": 26, + "../math/vec2": 30, + "../shapes/Convex": 40, + "poly-decomp": 5 + }], + 32: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, f.call(this, a, b, c), this.localAnchorA = e.fromValues(0, 0), this.localAnchorB = e.fromValues(0, 0), c.localAnchorA && e.copy(this.localAnchorA, c.localAnchorA), c.localAnchorB && e.copy(this.localAnchorB, c.localAnchorB), c.worldAnchorA && this.setWorldAnchorA(c.worldAnchorA), c.worldAnchorB && this.setWorldAnchorB(c.worldAnchorB); + var d = e.create(), + g = e.create(); + this.getWorldAnchorA(d), this.getWorldAnchorB(g); + var h = e.distance(d, g); + this.restLength = "number" == typeof c.restLength ? c.restLength : h + } + var e = a("../math/vec2"), + f = a("./Spring"); + a("../utils/Utils"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.setWorldAnchorA = function(a) { + this.bodyA.toLocalFrame(this.localAnchorA, a) + }, d.prototype.setWorldAnchorB = function(a) { + this.bodyB.toLocalFrame(this.localAnchorB, a) + }, d.prototype.getWorldAnchorA = function(a) { + this.bodyA.toWorldFrame(a, this.localAnchorA) + }, d.prototype.getWorldAnchorB = function(a) { + this.bodyB.toWorldFrame(a, this.localAnchorB) + }; + var g = e.create(), + h = e.create(), + i = e.create(), + j = e.create(), + k = e.create(), + l = e.create(), + m = e.create(), + n = e.create(), + o = e.create(); + d.prototype.applyForce = function() { + var a = this.stiffness, + b = this.damping, + c = this.restLength, + d = this.bodyA, + f = this.bodyB, + p = g, + q = h, + r = i, + s = j, + t = o, + u = k, + v = l, + w = m, + x = n; + this.getWorldAnchorA(u), this.getWorldAnchorB(v), e.sub(w, u, d.position), e.sub(x, v, f.position), e.sub(p, v, u); + var y = e.len(p); + e.normalize(q, p), e.sub(r, f.velocity, d.velocity), e.crossZV(t, f.angularVelocity, x), e.add(r, r, t), e.crossZV(t, d.angularVelocity, w), e.sub(r, r, t), e.scale(s, q, -a * (y - c) - b * e.dot(r, q)), e.sub(d.force, d.force, s), e.add(f.force, f.force, s); + var z = e.crossLength(w, s), + A = e.crossLength(x, s); + d.angularForce -= z, f.angularForce += A + } + }, { + "../math/vec2": 30, + "../utils/Utils": 57, + "./Spring": 34 + }], + 33: [function(a, b, c) { + function d(a, b, c) { + c = c || {}, e.call(this, a, b, c), this.restAngle = "number" == typeof c.restAngle ? c.restAngle : b.angle - a.angle + } + var e = (a("../math/vec2"), a("./Spring")); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.applyForce = function() { + var a = this.stiffness, + b = this.damping, + c = this.restAngle, + d = this.bodyA, + e = this.bodyB, + f = e.angle - d.angle, + g = e.angularVelocity - d.angularVelocity, + h = -a * (f - c) - b * g * 0; + d.angularForce -= h, e.angularForce += h + } + }, { + "../math/vec2": 30, + "./Spring": 34 + }], + 34: [function(a, b, c) { + function d(a, b, c) { + c = e.defaults(c, { + stiffness: 100, + damping: 1 + }), this.stiffness = c.stiffness, this.damping = c.damping, this.bodyA = a, this.bodyB = b + } + var e = (a("../math/vec2"), a("../utils/Utils")); + b.exports = d, d.prototype.applyForce = function() {} + }, { + "../math/vec2": 30, + "../utils/Utils": 57 + }], + 35: [function(a, b, c) { + function d(a, b) { + b = b || {}, this.chassisBody = a, this.wheels = [], this.groundBody = new i({ + mass: 0 + }), this.world = null; + var c = this; + this.preStepCallback = function() { + c.update() + } + } + + function e(a, b) { + b = b || {}, this.vehicle = a, this.forwardEquation = new h(a.chassisBody, a.groundBody), this.sideEquation = new h(a.chassisBody, a.groundBody), this.steerValue = 0, this.engineForce = 0, this.setSideFriction(void 0 !== b.sideFriction ? b.sideFriction : 5), this.localForwardVector = f.fromValues(0, 1), b.localForwardVector && f.copy(this.localForwardVector, b.localForwardVector), this.localPosition = f.fromValues(0, 0), b.localPosition && f.copy(this.localPosition, b.localPosition), g.apply(this, a.chassisBody, a.groundBody), this.equations.push(this.forwardEquation, this.sideEquation), this.setBrakeForce(0) + } + var f = a("../math/vec2"), + g = (a("../utils/Utils"), a("../constraints/Constraint")), + h = a("../equations/FrictionEquation"), + i = a("../objects/Body"); + b.exports = d, d.prototype.addToWorld = function(a) { + this.world = a, a.addBody(this.groundBody), a.on("preStep", this.preStepCallback); + for (var b = 0; b < this.wheels.length; b++) { + var c = this.wheels[b]; + a.addConstraint(c) + } + }, d.prototype.removeFromWorld = function() { + var a = this.world; + a.removeBody(this.groundBody), a.off("preStep", this.preStepCallback); + for (var b = 0; b < this.wheels.length; b++) { + var c = this.wheels[b]; + a.removeConstraint(c) + } + this.world = null + }, d.prototype.addWheel = function(a) { + var b = new e(this, a); + return this.wheels.push(b), b + }, d.prototype.update = function() { + for (var a = 0; a < this.wheels.length; a++) this.wheels[a].update() + }, e.prototype = new g, e.prototype.setBrakeForce = function(a) { + this.forwardEquation.setSlipForce(a) + }, e.prototype.setSideFriction = function(a) { + this.sideEquation.setSlipForce(a) + }; + var j = f.create(), + k = f.create(); + e.prototype.getSpeed = function() { + return this.vehicle.chassisBody.vectorToWorldFrame(k, this.localForwardVector), this.vehicle.chassisBody.getVelocityAtPoint(j, k), f.dot(j, k) + }; + var l = f.create(); + e.prototype.update = function() { + this.vehicle.chassisBody.vectorToWorldFrame(this.forwardEquation.t, this.localForwardVector), f.rotate(this.sideEquation.t, this.localForwardVector, Math.PI / 2), this.vehicle.chassisBody.vectorToWorldFrame(this.sideEquation.t, this.sideEquation.t), f.rotate(this.forwardEquation.t, this.forwardEquation.t, this.steerValue), f.rotate(this.sideEquation.t, this.sideEquation.t, this.steerValue), this.vehicle.chassisBody.toWorldFrame(this.forwardEquation.contactPointB, this.localPosition), f.copy(this.sideEquation.contactPointB, this.forwardEquation.contactPointB), this.vehicle.chassisBody.vectorToWorldFrame(this.forwardEquation.contactPointA, this.localPosition), f.copy(this.sideEquation.contactPointA, this.forwardEquation.contactPointA), f.normalize(l, this.forwardEquation.t), f.scale(l, l, this.engineForce), this.vehicle.chassisBody.applyForce(l, this.forwardEquation.contactPointA) + } + }, { + "../constraints/Constraint": 14, + "../equations/FrictionEquation": 23, + "../math/vec2": 30, + "../objects/Body": 31, + "../utils/Utils": 57 + }], + 36: [function(a, b, c) { + var d = b.exports = { + AABB: a("./collision/AABB"), + AngleLockEquation: a("./equations/AngleLockEquation"), + Body: a("./objects/Body"), + Broadphase: a("./collision/Broadphase"), + Capsule: a("./shapes/Capsule"), + Circle: a("./shapes/Circle"), + Constraint: a("./constraints/Constraint"), + ContactEquation: a("./equations/ContactEquation"), + ContactEquationPool: a("./utils/ContactEquationPool"), + ContactMaterial: a("./material/ContactMaterial"), + Convex: a("./shapes/Convex"), + DistanceConstraint: a("./constraints/DistanceConstraint"), + Equation: a("./equations/Equation"), + EventEmitter: a("./events/EventEmitter"), + FrictionEquation: a("./equations/FrictionEquation"), + FrictionEquationPool: a("./utils/FrictionEquationPool"), + GearConstraint: a("./constraints/GearConstraint"), + GSSolver: a("./solver/GSSolver"), + Heightfield: a("./shapes/Heightfield"), + Line: a("./shapes/Line"), + LockConstraint: a("./constraints/LockConstraint"), + Material: a("./material/Material"), + Narrowphase: a("./collision/Narrowphase"), + NaiveBroadphase: a("./collision/NaiveBroadphase"), + Particle: a("./shapes/Particle"), + Plane: a("./shapes/Plane"), + Pool: a("./utils/Pool"), + RevoluteConstraint: a("./constraints/RevoluteConstraint"), + PrismaticConstraint: a("./constraints/PrismaticConstraint"), + Ray: a("./collision/Ray"), + RaycastResult: a("./collision/RaycastResult"), + Box: a("./shapes/Box"), + RotationalVelocityEquation: a("./equations/RotationalVelocityEquation"), + SAPBroadphase: a("./collision/SAPBroadphase"), + Shape: a("./shapes/Shape"), + Solver: a("./solver/Solver"), + Spring: a("./objects/Spring"), + TopDownVehicle: a("./objects/TopDownVehicle"), + LinearSpring: a("./objects/LinearSpring"), + RotationalSpring: a("./objects/RotationalSpring"), + Utils: a("./utils/Utils"), + World: a("./world/World"), + vec2: a("./math/vec2"), + version: a("../package.json").version + }; + Object.defineProperty(d, "Rectangle", { + get: function() { + return console.warn("The Rectangle class has been renamed to Box."), this.Box + } + }) + }, { + "../package.json": 6, + "./collision/AABB": 7, + "./collision/Broadphase": 8, + "./collision/NaiveBroadphase": 9, + "./collision/Narrowphase": 10, + "./collision/Ray": 11, + "./collision/RaycastResult": 12, + "./collision/SAPBroadphase": 13, + "./constraints/Constraint": 14, + "./constraints/DistanceConstraint": 15, + "./constraints/GearConstraint": 16, + "./constraints/LockConstraint": 17, + "./constraints/PrismaticConstraint": 18, + "./constraints/RevoluteConstraint": 19, + "./equations/AngleLockEquation": 20, + "./equations/ContactEquation": 21, + "./equations/Equation": 22, + "./equations/FrictionEquation": 23, + "./equations/RotationalVelocityEquation": 25, + "./events/EventEmitter": 26, + "./material/ContactMaterial": 27, + "./material/Material": 28, + "./math/vec2": 30, + "./objects/Body": 31, + "./objects/LinearSpring": 32, + "./objects/RotationalSpring": 33, + "./objects/Spring": 34, + "./objects/TopDownVehicle": 35, + "./shapes/Box": 37, + "./shapes/Capsule": 38, + "./shapes/Circle": 39, + "./shapes/Convex": 40, + "./shapes/Heightfield": 41, + "./shapes/Line": 42, + "./shapes/Particle": 43, + "./shapes/Plane": 44, + "./shapes/Shape": 45, + "./solver/GSSolver": 46, + "./solver/Solver": 47, + "./utils/ContactEquationPool": 48, + "./utils/FrictionEquationPool": 49, + "./utils/Pool": 55, + "./utils/Utils": 57, + "./world/World": 61 + }], + 37: [function(a, b, c) { + function d(a) { + "number" == typeof arguments[0] && "number" == typeof arguments[1] && (a = { + width: arguments[0], + height: arguments[1] + }, console.warn("The Rectangle has been renamed to Box and its constructor signature has changed. Please use the following format: new Box({ width: 1, height: 1, ... })")), a = a || {}; + var b = this.width = a.width || 1, + c = this.height = a.height || 1, + d = [e.fromValues(-b / 2, -c / 2), e.fromValues(b / 2, -c / 2), e.fromValues(b / 2, c / 2), e.fromValues(-b / 2, c / 2)], + h = [e.fromValues(1, 0), e.fromValues(0, 1)]; + a.vertices = d, a.axes = h, a.type = f.BOX, g.call(this, a) + } + var e = a("../math/vec2"), + f = a("./Shape"), + g = a("./Convex"); + b.exports = d, d.prototype = new g, d.prototype.constructor = d, d.prototype.computeMomentOfInertia = function(a) { + var b = this.width, + c = this.height; + return a * (c * c + b * b) / 12 + }, d.prototype.updateBoundingRadius = function() { + var a = this.width, + b = this.height; + this.boundingRadius = Math.sqrt(a * a + b * b) / 2 + }; + e.create(), e.create(), e.create(), e.create(); + d.prototype.computeAABB = function(a, b, c) { + a.setFromPoints(this.vertices, b, c, 0) + }, d.prototype.updateArea = function() { + this.area = this.width * this.height + } + }, { + "../math/vec2": 30, + "./Convex": 40, + "./Shape": 45 + }], + 38: [function(a, b, c) { + function d(a) { + "number" == typeof arguments[0] && "number" == typeof arguments[1] && (a = { + length: arguments[0], + radius: arguments[1] + }, console.warn("The Capsule constructor signature has changed. Please use the following format: new Capsule({ radius: 1, length: 1 })")), a = a || {}, this.length = a.length || 1, this.radius = a.radius || 1, a.type = e.CAPSULE, e.call(this, a) + } + var e = a("./Shape"), + f = a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeMomentOfInertia = function(a) { + var b = this.radius, + c = this.length + b, + d = 2 * b; + return a * (d * d + c * c) / 12 + }, d.prototype.updateBoundingRadius = function() { + this.boundingRadius = this.radius + this.length / 2 + }, d.prototype.updateArea = function() { + this.area = Math.PI * this.radius * this.radius + 2 * this.radius * this.length + }; + var g = f.create(); + d.prototype.computeAABB = function(a, b, c) { + var d = this.radius; + f.set(g, this.length / 2, 0), 0 !== c && f.rotate(g, g, c), f.set(a.upperBound, Math.max(g[0] + d, -g[0] + d), Math.max(g[1] + d, -g[1] + d)), f.set(a.lowerBound, Math.min(g[0] - d, -g[0] - d), Math.min(g[1] - d, -g[1] - d)), f.add(a.lowerBound, a.lowerBound, b), f.add(a.upperBound, a.upperBound, b) + }; + var h = f.create(), + i = f.create(), + j = f.create(), + k = f.create(), + l = f.fromValues(0, 1); + d.prototype.raycast = function(a, b, c, d) { + for (var e = b.from, g = b.to, m = (b.direction, h), n = i, o = j, p = k, q = this.length / 2, r = 0; r < 2; r++) { + var s = this.radius * (2 * r - 1); + f.set(o, -q, s), f.set(p, q, s), f.toGlobalFrame(o, o, c, d), f.toGlobalFrame(p, p, c, d); + var t = f.getLineSegmentsIntersectionFraction(e, g, o, p); + if (t >= 0 && (f.rotate(n, l, d), f.scale(n, n, 2 * r - 1), b.reportIntersection(a, t, n, -1), a.shouldStop(b))) return + } + for (var u = Math.pow(this.radius, 2) + Math.pow(q, 2), r = 0; r < 2; r++) { + f.set(o, q * (2 * r - 1), 0), f.toGlobalFrame(o, o, c, d); + var v = Math.pow(g[0] - e[0], 2) + Math.pow(g[1] - e[1], 2), + w = 2 * ((g[0] - e[0]) * (e[0] - o[0]) + (g[1] - e[1]) * (e[1] - o[1])), + x = Math.pow(e[0] - o[0], 2) + Math.pow(e[1] - o[1], 2) - Math.pow(this.radius, 2), + t = Math.pow(w, 2) - 4 * v * x; + if (!(t < 0)) + if (0 === t) { + if (f.lerp(m, e, g, t), f.squaredDistance(m, c) > u && (f.sub(n, m, o), f.normalize(n, n), b.reportIntersection(a, t, n, -1), a.shouldStop(b))) return + } else { + var y = Math.sqrt(t), + z = 1 / (2 * v), + A = (-w - y) * z, + B = (-w + y) * z; + if (A >= 0 && A <= 1 && (f.lerp(m, e, g, A), f.squaredDistance(m, c) > u && (f.sub(n, m, o), f.normalize(n, n), b.reportIntersection(a, A, n, -1), a.shouldStop(b)))) return; + if (B >= 0 && B <= 1 && (f.lerp(m, e, g, B), f.squaredDistance(m, c) > u && (f.sub(n, m, o), f.normalize(n, n), b.reportIntersection(a, B, n, -1), a.shouldStop(b)))) return + } + } + } + }, { + "../math/vec2": 30, + "./Shape": 45 + }], + 39: [function(a, b, c) { + function d(a) { + "number" == typeof arguments[0] && (a = { + radius: arguments[0] + }, console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")), a = a || {}, this.radius = a.radius || 1, a.type = e.CIRCLE, e.call(this, a) + } + var e = a("./Shape"), + f = a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeMomentOfInertia = function(a) { + var b = this.radius; + return a * b * b / 2 + }, d.prototype.updateBoundingRadius = function() { + this.boundingRadius = this.radius + }, d.prototype.updateArea = function() { + this.area = Math.PI * this.radius * this.radius + }, d.prototype.computeAABB = function(a, b, c) { + var d = this.radius; + f.set(a.upperBound, d, d), f.set(a.lowerBound, -d, -d), b && (f.add(a.lowerBound, a.lowerBound, b), f.add(a.upperBound, a.upperBound, b)) + }; + var g = f.create(), + h = f.create(); + d.prototype.raycast = function(a, b, c, d) { + var e = b.from, + i = b.to, + j = this.radius, + k = Math.pow(i[0] - e[0], 2) + Math.pow(i[1] - e[1], 2), + l = 2 * ((i[0] - e[0]) * (e[0] - c[0]) + (i[1] - e[1]) * (e[1] - c[1])), + m = Math.pow(e[0] - c[0], 2) + Math.pow(e[1] - c[1], 2) - Math.pow(j, 2), + n = Math.pow(l, 2) - 4 * k * m, + o = g, + p = h; + if (!(n < 0)) + if (0 === n) f.lerp(o, e, i, n), f.sub(p, o, c), f.normalize(p, p), b.reportIntersection(a, n, p, -1); + else { + var q = Math.sqrt(n), + r = 1 / (2 * k), + s = (-l - q) * r, + t = (-l + q) * r; + if (s >= 0 && s <= 1 && (f.lerp(o, e, i, s), f.sub(p, o, c), f.normalize(p, p), b.reportIntersection(a, s, p, -1), a.shouldStop(b))) return; + t >= 0 && t <= 1 && (f.lerp(o, e, i, t), f.sub(p, o, c), f.normalize(p, p), b.reportIntersection(a, t, p, -1)) + } + } + }, { + "../math/vec2": 30, + "./Shape": 45 + }], + 40: [function(a, b, c) { + function d(a) { + Array.isArray(arguments[0]) && (a = { + vertices: arguments[0], + axes: arguments[1] + }, console.warn("The Convex constructor signature has changed. Please use the following format: new Convex({ vertices: [...], ... })")), a = a || {}, this.vertices = []; + for (var b = void 0 !== a.vertices ? a.vertices : [], c = 0; c < b.length; c++) { + var d = f.create(); + f.copy(d, b[c]), this.vertices.push(d) + } + if (this.axes = [], a.axes) + for (var c = 0; c < a.axes.length; c++) { + var g = f.create(); + f.copy(g, a.axes[c]), this.axes.push(g) + } else + for (var c = 0; c < this.vertices.length; c++) { + var h = this.vertices[c], + i = this.vertices[(c + 1) % this.vertices.length], + j = f.create(); + f.sub(j, i, h), f.rotate90cw(j, j), f.normalize(j, j), this.axes.push(j) + } + if (this.centerOfMass = f.fromValues(0, 0), this.triangles = [], this.vertices.length && (this.updateTriangles(), this.updateCenterOfMass()), this.boundingRadius = 0, a.type = e.CONVEX, e.call(this, a), this.updateBoundingRadius(), this.updateArea(), this.area < 0) throw new Error("Convex vertices must be given in conter-clockwise winding.") + } + var e = a("./Shape"), + f = a("../math/vec2"), + g = a("../math/polyk"); + a("poly-decomp"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d; + var h = f.create(), + i = f.create(); + d.prototype.projectOntoLocalAxis = function(a, b) { + for (var c, d, e = null, g = null, a = h, i = 0; i < this.vertices.length; i++) c = this.vertices[i], d = f.dot(c, a), (null === e || d > e) && (e = d), (null === g || d < g) && (g = d); + if (g > e) { + var j = g; + g = e, e = j + } + f.set(b, g, e) + }, d.prototype.projectOntoWorldAxis = function(a, b, c, d) { + var e = i; + this.projectOntoLocalAxis(a, d), 0 !== c ? f.rotate(e, a, c) : e = a; + var g = f.dot(b, e); + f.set(d, d[0] + g, d[1] + g) + }, d.prototype.updateTriangles = function() { + this.triangles.length = 0; + for (var a = [], b = 0; b < this.vertices.length; b++) { + var c = this.vertices[b]; + a.push(c[0], c[1]) + } + for (var d = g.Triangulate(a), b = 0; b < d.length; b += 3) { + var e = d[b], + f = d[b + 1], + h = d[b + 2]; + this.triangles.push([e, f, h]) + } + }; + var j = f.create(), + k = f.create(), + l = f.create(), + m = f.create(), + n = f.create(); + f.create(), f.create(), f.create(), f.create(); + d.prototype.updateCenterOfMass = function() { + var a = this.triangles, + b = this.vertices, + c = this.centerOfMass, + e = j, + g = l, + h = m, + i = n, + o = k; + f.set(c, 0, 0); + for (var p = 0, q = 0; q !== a.length; q++) { + var r = a[q], + g = b[r[0]], + h = b[r[1]], + i = b[r[2]]; + f.centroid(e, g, h, i); + var s = d.triangleArea(g, h, i); + p += s, f.scale(o, e, s), f.add(c, c, o) + } + f.scale(c, c, 1 / p) + }, d.prototype.computeMomentOfInertia = function(a) { + for (var b = 0, c = 0, d = this.vertices.length, e = d - 1, g = 0; g < d; e = g, g++) { + var h = this.vertices[e], + i = this.vertices[g], + j = Math.abs(f.crossLength(h, i)), + k = f.dot(i, i) + f.dot(i, h) + f.dot(h, h); + b += j * k, c += j + } + return a / 6 * (b / c) + }, d.prototype.updateBoundingRadius = function() { + for (var a = this.vertices, b = 0, c = 0; c !== a.length; c++) { + var d = f.squaredLength(a[c]); + d > b && (b = d) + } + this.boundingRadius = Math.sqrt(b) + }, d.triangleArea = function(a, b, c) { + return .5 * ((b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1])) + }, d.prototype.updateArea = function() { + this.updateTriangles(), this.area = 0; + for (var a = this.triangles, b = this.vertices, c = 0; c !== a.length; c++) { + var e = a[c], + f = b[e[0]], + g = b[e[1]], + h = b[e[2]], + i = d.triangleArea(f, g, h); + this.area += i + } + }, d.prototype.computeAABB = function(a, b, c) { + a.setFromPoints(this.vertices, b, c, 0) + }; + var o = f.create(), + p = f.create(), + q = f.create(); + d.prototype.raycast = function(a, b, c, d) { + var e = o, + g = p, + h = q, + i = this.vertices; + f.toLocalFrame(e, b.from, c, d), f.toLocalFrame(g, b.to, c, d); + for (var j = i.length, k = 0; k < j && !a.shouldStop(b); k++) { + var l = i[k], + m = i[(k + 1) % j], + n = f.getLineSegmentsIntersectionFraction(e, g, l, m); + n >= 0 && (f.sub(h, m, l), f.rotate(h, h, -Math.PI / 2 + d), f.normalize(h, h), b.reportIntersection(a, n, h, k)) + } + } + }, { + "../math/polyk": 29, + "../math/vec2": 30, + "./Shape": 45, + "poly-decomp": 5 + }], + 41: [function(a, b, c) { + function d(a) { + if (Array.isArray(arguments[0])) { + if (a = { + heights: arguments[0] + }, "object" == typeof arguments[1]) + for (var b in arguments[1]) a[b] = arguments[1][b]; + console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })") + } + a = a || {}, this.heights = a.heights ? a.heights.slice(0) : [], this.maxValue = a.maxValue || null, this.minValue = a.minValue || null, this.elementWidth = a.elementWidth || .1, void 0 !== a.maxValue && void 0 !== a.minValue || this.updateMaxMinValues(), a.type = e.HEIGHTFIELD, e.call(this, a) + } + var e = a("./Shape"), + f = a("../math/vec2"); + a("../utils/Utils"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.updateMaxMinValues = function() { + for (var a = this.heights, b = a[0], c = a[0], d = 0; d !== a.length; d++) { + var e = a[d]; + e > b && (b = e), e < c && (c = e) + } + this.maxValue = b, this.minValue = c + }, d.prototype.computeMomentOfInertia = function(a) { + return Number.MAX_VALUE + }, d.prototype.updateBoundingRadius = function() { + this.boundingRadius = Number.MAX_VALUE + }, d.prototype.updateArea = function() { + for (var a = this.heights, b = 0, c = 0; c < a.length - 1; c++) b += (a[c] + a[c + 1]) / 2 * this.elementWidth; + this.area = b + }; + var g = [f.create(), f.create(), f.create(), f.create()]; + d.prototype.computeAABB = function(a, b, c) { + f.set(g[0], 0, this.maxValue), f.set(g[1], this.elementWidth * this.heights.length, this.maxValue), f.set(g[2], this.elementWidth * this.heights.length, this.minValue), f.set(g[3], 0, this.minValue), a.setFromPoints(g, b, c) + }, d.prototype.getLineSegment = function(a, b, c) { + var d = this.heights, + e = this.elementWidth; + f.set(a, c * e, d[c]), f.set(b, (c + 1) * e, d[c + 1]) + }, d.prototype.getSegmentIndex = function(a) { + return Math.floor(a[0] / this.elementWidth) + }, d.prototype.getClampedSegmentIndex = function(a) { + var b = this.getSegmentIndex(a); + return b = Math.min(this.heights.length, Math.max(b, 0)) + }; + var h = (f.create(), f.create()), + i = f.create(), + j = f.create(), + k = f.create(), + l = f.create(); + f.fromValues(0, 1); + d.prototype.raycast = function(a, b, c, d) { + var e = b.from, + g = b.to, + m = (b.direction, h), + n = i, + o = j, + p = k, + q = l; + f.toLocalFrame(p, e, c, d), f.toLocalFrame(q, g, c, d); + var r = this.getClampedSegmentIndex(p), + s = this.getClampedSegmentIndex(q); + if (r > s) { + var t = r; + r = s, s = t + } + for (var u = 0; u < this.heights.length - 1; u++) { + this.getLineSegment(n, o, u); + var v = f.getLineSegmentsIntersectionFraction(p, q, n, o); + if (v >= 0 && (f.sub(m, o, n), f.rotate(m, m, d + Math.PI / 2), f.normalize(m, m), b.reportIntersection(a, v, m, -1), a.shouldStop(b))) return + } + } + }, { + "../math/vec2": 30, + "../utils/Utils": 57, + "./Shape": 45 + }], + 42: [function(a, b, c) { + function d(a) { + "number" == typeof arguments[0] && (a = { + length: arguments[0] + }, console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")), a = a || {}, this.length = a.length || 1, a.type = e.LINE, e.call(this, a) + } + var e = a("./Shape"), + f = a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeMomentOfInertia = function(a) { + return a * Math.pow(this.length, 2) / 12 + }, d.prototype.updateBoundingRadius = function() { + this.boundingRadius = this.length / 2 + }; + var g = [f.create(), f.create()]; + d.prototype.computeAABB = function(a, b, c) { + var d = this.length / 2; + f.set(g[0], -d, 0), f.set(g[1], d, 0), a.setFromPoints(g, b, c, 0) + }; + var h = (f.create(), f.create()), + i = f.create(), + j = f.create(), + k = f.fromValues(0, 1); + d.prototype.raycast = function(a, b, c, d) { + var e = b.from, + g = b.to, + l = i, + m = j, + n = this.length / 2; + f.set(l, -n, 0), f.set(m, n, 0), f.toGlobalFrame(l, l, c, d), f.toGlobalFrame(m, m, c, d); + var o = f.getLineSegmentsIntersectionFraction(l, m, e, g); + if (o >= 0) { + var p = h; + f.rotate(p, k, d), b.reportIntersection(a, o, p, -1) + } + } + }, { + "../math/vec2": 30, + "./Shape": 45 + }], + 43: [function(a, b, c) { + function d(a) { + a = a || {}, a.type = e.PARTICLE, e.call(this, a) + } + var e = a("./Shape"), + f = a("../math/vec2"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeMomentOfInertia = function(a) { + return 0 + }, d.prototype.updateBoundingRadius = function() { + this.boundingRadius = 0 + }, d.prototype.computeAABB = function(a, b, c) { + f.copy(a.lowerBound, b), f.copy(a.upperBound, b) + } + }, { + "../math/vec2": 30, + "./Shape": 45 + }], + 44: [function(a, b, c) { + function d(a) { + a = a || {}, a.type = e.PLANE, e.call(this, a) + } + var e = a("./Shape"), + f = a("../math/vec2"); + a("../utils/Utils"); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.computeMomentOfInertia = function(a) { + return 0 + }, d.prototype.updateBoundingRadius = function() { + this.boundingRadius = Number.MAX_VALUE + }, d.prototype.computeAABB = function(a, b, c) { + var d = c % (2 * Math.PI), + e = f.set, + g = Number.MAX_VALUE, + h = a.lowerBound, + i = a.upperBound; + 0 === d ? (e(h, -g, -g), e(i, g, 0)) : d === Math.PI / 2 ? (e(h, 0, -g), e(i, g, g)) : d === Math.PI ? (e(h, -g, 0), e(i, g, g)) : d === 3 * Math.PI / 2 ? (e(h, -g, -g), e(i, 0, g)) : (e(h, -g, -g), e(i, g, g)), f.add(h, h, b), f.add(i, i, b) + }, d.prototype.updateArea = function() { + this.area = Number.MAX_VALUE + }; + var g = f.create(), + h = (f.create(), f.create(), f.create()), + i = f.create(); + d.prototype.raycast = function(a, b, c, d) { + var e = b.from, + j = b.to, + k = b.direction, + l = g, + m = h, + n = i; + f.set(m, 0, 1), f.rotate(m, m, d), f.sub(n, e, c); + var o = f.dot(n, m); + f.sub(n, j, c); + var p = f.dot(n, m); + if (!(o * p > 0 || f.squaredDistance(e, j) < o * o)) { + var q = f.dot(m, k); + f.sub(l, e, c); + var r = -f.dot(m, l) / q / b.length; + b.reportIntersection(a, r, m, -1) + } + } + }, { + "../math/vec2": 30, + "../utils/Utils": 57, + "./Shape": 45 + }], + 45: [function(a, b, c) { + function d(a) { + a = a || {}, this.body = null, this.position = e.fromValues(0, 0), a.position && e.copy(this.position, a.position), this.angle = a.angle || 0, this.type = a.type || 0, this.id = d.idCounter++, this.boundingRadius = 0, this.collisionGroup = void 0 !== a.collisionGroup ? a.collisionGroup : 1, this.collisionResponse = void 0 === a.collisionResponse || a.collisionResponse, this.collisionMask = void 0 !== a.collisionMask ? a.collisionMask : 1, this.material = a.material || null, this.area = 0, this.sensor = void 0 !== a.sensor && a.sensor, this.type && this.updateBoundingRadius(), this.updateArea() + } + b.exports = d; + var e = a("../math/vec2"); + d.idCounter = 0, d.CIRCLE = 1, d.PARTICLE = 2, d.PLANE = 4, d.CONVEX = 8, d.LINE = 16, d.BOX = 32, Object.defineProperty(d, "RECTANGLE", { + get: function() { + return console.warn("Shape.RECTANGLE is deprecated, use Shape.BOX instead."), d.BOX + } + }), d.CAPSULE = 64, d.HEIGHTFIELD = 128, d.prototype.computeMomentOfInertia = function(a) {}, d.prototype.updateBoundingRadius = function() {}, d.prototype.updateArea = function() {}, d.prototype.computeAABB = function(a, b, c) {}, d.prototype.raycast = function(a, b, c, d) {} + }, { + "../math/vec2": 30 + }], + 46: [function(a, b, c) { + function d(a) { + g.call(this, a, g.GS), a = a || {}, this.iterations = a.iterations || 10, this.tolerance = a.tolerance || 1e-7, this.arrayStep = 30, this.lambda = new h.ARRAY_TYPE(this.arrayStep), this.Bs = new h.ARRAY_TYPE(this.arrayStep), this.invCs = new h.ARRAY_TYPE(this.arrayStep), this.useZeroRHS = !1, this.frictionIterations = 0, this.usedIterations = 0 + } + + function e(a) { + for (var b = a.length; b--;) a[b] = 0 + } + var f = a("../math/vec2"), + g = a("./Solver"), + h = a("../utils/Utils"), + i = a("../equations/FrictionEquation"); + b.exports = d, d.prototype = new g, d.prototype.constructor = d, d.prototype.solve = function(a, b) { + this.sortEquations(); + var c = 0, + g = this.iterations, + j = this.frictionIterations, + k = this.equations, + l = k.length, + m = Math.pow(this.tolerance * l, 2), + n = b.bodies, + o = b.bodies.length, + p = (f.add, f.set, this.useZeroRHS), + q = this.lambda; + if (this.usedIterations = 0, l) + for (var r = 0; r !== o; r++) { + var s = n[r]; + s.updateSolveMassProperties() + } + q.length < l && (q = this.lambda = new h.ARRAY_TYPE(l + this.arrayStep), this.Bs = new h.ARRAY_TYPE(l + this.arrayStep), this.invCs = new h.ARRAY_TYPE(l + this.arrayStep)), e(q); + for (var t = this.invCs, u = this.Bs, q = this.lambda, r = 0; r !== k.length; r++) { + var v = k[r]; + (v.timeStep !== a || v.needsUpdate) && (v.timeStep = a, v.update()), u[r] = v.computeB(v.a, v.b, a), t[r] = v.computeInvC(v.epsilon) + } + var v, w, r, x; + if (0 !== l) { + for (r = 0; r !== o; r++) { + var s = n[r]; + s.resetConstraintVelocity() + } + if (j) { + for (c = 0; c !== j; c++) { + for (w = 0, x = 0; x !== l; x++) { + v = k[x]; + var y = d.iterateEquation(x, v, v.epsilon, u, t, q, p, a, c); + w += Math.abs(y) + } + if (this.usedIterations++, w * w <= m) break + } + for (d.updateMultipliers(k, q, 1 / a), x = 0; x !== l; x++) { + var z = k[x]; + if (z instanceof i) { + for (var A = 0, B = 0; B !== z.contactEquations.length; B++) A += z.contactEquations[B].multiplier; + A *= z.frictionCoefficient / z.contactEquations.length, z.maxForce = A, z.minForce = -A + } + } + } + for (c = 0; c !== g; c++) { + for (w = 0, x = 0; x !== l; x++) { + v = k[x]; + var y = d.iterateEquation(x, v, v.epsilon, u, t, q, p, a, c); + w += Math.abs(y) + } + if (this.usedIterations++, w * w <= m) break + } + for (r = 0; r !== o; r++) n[r].addConstraintVelocity(); + d.updateMultipliers(k, q, 1 / a) + } + }, d.updateMultipliers = function(a, b, c) { + for (var d = a.length; d--;) a[d].multiplier = b[d] * c + }, d.iterateEquation = function(a, b, c, d, e, f, g, h, i) { + var j = d[a], + k = e[a], + l = f[a], + m = b.computeGWlambda(), + n = b.maxForce, + o = b.minForce; + g && (j = 0); + var p = k * (j - m - c * l), + q = l + p; + return q < o * h ? p = o * h - l : q > n * h && (p = n * h - l), f[a] += p, b.addToWlambda(p), p + } + }, { + "../equations/FrictionEquation": 23, + "../math/vec2": 30, + "../utils/Utils": 57, + "./Solver": 47 + }], + 47: [function(a, b, c) { + function d(a, b) { + a = a || {}, e.call(this), this.type = b, this.equations = [], this.equationSortFunction = a.equationSortFunction || !1 + } + var e = (a("../utils/Utils"), a("../events/EventEmitter")); + b.exports = d, d.prototype = new e, d.prototype.constructor = d, d.prototype.solve = function(a, b) { + throw new Error("Solver.solve should be implemented by subclasses!") + }; + var f = { + bodies: [] + }; + d.prototype.solveIsland = function(a, b) { + this.removeAllEquations(), b.equations.length && (this.addEquations(b.equations), f.bodies.length = 0, b.getBodies(f.bodies), f.bodies.length && this.solve(a, f)) + }, d.prototype.sortEquations = function() { + this.equationSortFunction && this.equations.sort(this.equationSortFunction) + }, d.prototype.addEquation = function(a) { + a.enabled && this.equations.push(a) + }, d.prototype.addEquations = function(a) { + for (var b = 0, c = a.length; b !== c; b++) { + var d = a[b]; + d.enabled && this.equations.push(d) + } + }, d.prototype.removeEquation = function(a) { + var b = this.equations.indexOf(a); + b !== -1 && this.equations.splice(b, 1) + }, d.prototype.removeAllEquations = function() { + this.equations.length = 0 + }, d.GS = 1, d.ISLAND = 2 + }, { + "../events/EventEmitter": 26, + "../utils/Utils": 57 + }], + 48: [function(a, b, c) { + function d() { + f.apply(this, arguments) + } + var e = a("../equations/ContactEquation"), + f = a("./Pool"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.create = function() { + return new e + }, d.prototype.destroy = function(a) { + return a.bodyA = a.bodyB = null, this + } + }, { + "../equations/ContactEquation": 21, + "./Pool": 55 + }], + 49: [function(a, b, c) { + function d() { + f.apply(this, arguments) + } + var e = a("../equations/FrictionEquation"), + f = a("./Pool"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.create = function() { + return new e + }, d.prototype.destroy = function(a) { + return a.bodyA = a.bodyB = null, this + } + }, { + "../equations/FrictionEquation": 23, + "./Pool": 55 + }], + 50: [function(a, b, c) { + function d() { + f.apply(this, arguments) + } + var e = a("../world/IslandNode"), + f = a("./Pool"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.create = function() { + return new e + }, d.prototype.destroy = function(a) { + return a.reset(), this + } + }, { + "../world/IslandNode": 60, + "./Pool": 55 + }], + 51: [function(a, b, c) { + function d() { + f.apply(this, arguments) + } + var e = a("../world/Island"), + f = a("./Pool"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.create = function() { + return new e + }, d.prototype.destroy = function(a) { + return a.reset(), this + } + }, { + "../world/Island": 58, + "./Pool": 55 + }], + 52: [function(a, b, c) { + function d() { + this.overlappingShapesLastState = new e, this.overlappingShapesCurrentState = new e, this.recordPool = new f({ + size: 16 + }), this.tmpDict = new e, this.tmpArray1 = [] + } + var e = a("./TupleDictionary"), + f = (a("./OverlapKeeperRecord"), a("./OverlapKeeperRecordPool")); + a("./Utils"); + b.exports = d, d.prototype.tick = function() { + for (var a = this.overlappingShapesLastState, b = this.overlappingShapesCurrentState, c = a.keys.length; c--;) { + var d = a.keys[c], + e = a.getByKey(d); + b.getByKey(d); + e && this.recordPool.release(e) + } + a.reset(), a.copy(b), b.reset() + }, d.prototype.setOverlapping = function(a, b, c, d) { + var e = (this.overlappingShapesLastState, this.overlappingShapesCurrentState); + if (!e.get(b.id, d.id)) { + var f = this.recordPool.get(); + f.set(a, b, c, d), e.set(b.id, d.id, f) + } + }, d.prototype.getNewOverlaps = function(a) { + return this.getDiff(this.overlappingShapesLastState, this.overlappingShapesCurrentState, a) + }, d.prototype.getEndOverlaps = function(a) { + return this.getDiff(this.overlappingShapesCurrentState, this.overlappingShapesLastState, a) + }, d.prototype.bodiesAreOverlapping = function(a, b) { + for (var c = this.overlappingShapesCurrentState, d = c.keys.length; d--;) { + var e = c.keys[d], + f = c.data[e]; + if (f.bodyA === a && f.bodyB === b || f.bodyA === b && f.bodyB === a) return !0 + } + return !1 + }, d.prototype.getDiff = function(a, b, c) { + var c = c || [], + d = a, + e = b; + c.length = 0; + for (var f = e.keys.length; f--;) { + var g = e.keys[f], + h = e.data[g]; + if (!h) throw new Error("Key " + g + " had no data!"); + var i = d.data[g]; + i || c.push(h) + } + return c + }, d.prototype.isNewOverlap = function(a, b) { + var c = 0 | a.id, + d = 0 | b.id, + e = this.overlappingShapesLastState, + f = this.overlappingShapesCurrentState; + return !e.get(c, d) && !!f.get(c, d) + }, d.prototype.getNewBodyOverlaps = function(a) { + this.tmpArray1.length = 0; + var b = this.getNewOverlaps(this.tmpArray1); + return this.getBodyDiff(b, a) + }, d.prototype.getEndBodyOverlaps = function(a) { + this.tmpArray1.length = 0; + var b = this.getEndOverlaps(this.tmpArray1); + return this.getBodyDiff(b, a) + }, d.prototype.getBodyDiff = function(a, b) { + b = b || []; + for (var c = this.tmpDict, d = a.length; d--;) { + var e = a[d]; + c.set(0 | e.bodyA.id, 0 | e.bodyB.id, e) + } + for (d = c.keys.length; d--;) { + var e = c.getByKey(c.keys[d]); + e && b.push(e.bodyA, e.bodyB) + } + return c.reset(), b + } + }, { + "./OverlapKeeperRecord": 53, + "./OverlapKeeperRecordPool": 54, + "./TupleDictionary": 56, + "./Utils": 57 + }], + 53: [function(a, b, c) { + function d(a, b, c, d) { + this.shapeA = b, this.shapeB = d, this.bodyA = a, this.bodyB = c + } + b.exports = d, d.prototype.set = function(a, b, c, e) { + d.call(this, a, b, c, e) + } + }, {}], + 54: [function(a, b, c) { + function d() { + f.apply(this, arguments) + } + var e = a("./OverlapKeeperRecord"), + f = a("./Pool"); + b.exports = d, d.prototype = new f, d.prototype.constructor = d, d.prototype.create = function() { + return new e + }, d.prototype.destroy = function(a) { + return a.bodyA = a.bodyB = a.shapeA = a.shapeB = null, this + } + }, { + "./OverlapKeeperRecord": 53, + "./Pool": 55 + }], + 55: [function(a, b, c) { + function d(a) { + a = a || {}, this.objects = [], void 0 !== a.size && this.resize(a.size) + } + b.exports = d, d.prototype.resize = function(a) { + for (var b = this.objects; b.length > a;) b.pop(); + for (; b.length < a;) b.push(this.create()); + return this + }, d.prototype.get = function() { + var a = this.objects; + return a.length ? a.pop() : this.create() + }, d.prototype.release = function(a) { + return this.destroy(a), this.objects.push(a), this + } + }, {}], + 56: [function(a, b, c) { + function d() { + this.data = {}, this.keys = [] + } + var e = a("./Utils"); + b.exports = d, d.prototype.getKey = function(a, b) { + return a = 0 | a, b = 0 | b, (0 | a) === (0 | b) ? -1 : 0 | ((0 | a) > (0 | b) ? a << 16 | 65535 & b : b << 16 | 65535 & a) + }, d.prototype.getByKey = function(a) { + return a = 0 | a, this.data[a] + }, d.prototype.get = function(a, b) { + return this.data[this.getKey(a, b)] + }, d.prototype.set = function(a, b, c) { + if (!c) throw new Error("No data!"); + var d = this.getKey(a, b); + return this.data[d] || this.keys.push(d), this.data[d] = c, d + }, d.prototype.reset = function() { + for (var a = this.data, b = this.keys, c = b.length; c--;) delete a[b[c]]; + b.length = 0 + }, d.prototype.copy = function(a) { + this.reset(), e.appendArray(this.keys, a.keys); + for (var b = a.keys.length; b--;) { + var c = a.keys[b]; + this.data[c] = a.data[c] + } + } + }, { + "./Utils": 57 + }], + 57: [function(a, b, c) { + function d() {} + b.exports = d, d.appendArray = function(a, b) { + if (b.length < 15e4) a.push.apply(a, b); + else + for (var c = 0, d = b.length; c !== d; ++c) a.push(b[c]) + }, d.splice = function(a, b, c) { + c = c || 1; + for (var d = b, e = a.length - c; d < e; d++) a[d] = a[d + c]; + a.length = e + }, "undefined" != typeof P2_ARRAY_TYPE ? d.ARRAY_TYPE = P2_ARRAY_TYPE : "undefined" != typeof Float32Array ? d.ARRAY_TYPE = Float32Array : d.ARRAY_TYPE = Array, d.extend = function(a, b) { + for (var c in b) a[c] = b[c] + }, d.defaults = function(a, b) { + a = a || {}; + for (var c in b) c in a || (a[c] = b[c]); + return a + } + }, {}], + 58: [function(a, b, c) { + function d() { + this.equations = [], this.bodies = [] + } + var e = a("../objects/Body"); + b.exports = d, d.prototype.reset = function() { + this.equations.length = this.bodies.length = 0 + }; + var f = []; + d.prototype.getBodies = function(a) { + var b = a || [], + c = this.equations; + f.length = 0; + for (var d = 0; d !== c.length; d++) { + var e = c[d]; + f.indexOf(e.bodyA.id) === -1 && (b.push(e.bodyA), f.push(e.bodyA.id)), f.indexOf(e.bodyB.id) === -1 && (b.push(e.bodyB), f.push(e.bodyB.id)) + } + return b + }, d.prototype.wantsToSleep = function() { + for (var a = 0; a < this.bodies.length; a++) { + var b = this.bodies[a]; + if (b.type === e.DYNAMIC && !b.wantsToSleep) return !1 + } + return !0 + }, d.prototype.sleep = function() { + for (var a = 0; a < this.bodies.length; a++) { + var b = this.bodies[a]; + b.sleep() + } + return !0 + } + }, { + "../objects/Body": 31 + }], + 59: [function(a, b, c) { + function d(a) { + this.nodePool = new e({ + size: 16 + }), this.islandPool = new f({ + size: 8 + }), this.equations = [], this.islands = [], this.nodes = [], this.queue = [] + } + var e = (a("../math/vec2"), a("./Island"), a("./IslandNode"), a("./../utils/IslandNodePool")), + f = a("./../utils/IslandPool"), + g = a("../objects/Body"); + b.exports = d, d.getUnvisitedNode = function(a) { + for (var b = a.length, c = 0; c !== b; c++) { + var d = a[c]; + if (!d.visited && d.body.type === g.DYNAMIC) return d + } + return !1 + }, d.prototype.visit = function(a, b, c) { + b.push(a.body); + for (var d = a.equations.length, e = 0; e !== d; e++) { + var f = a.equations[e]; + c.indexOf(f) === -1 && c.push(f) + } + }, d.prototype.bfs = function(a, b, c) { + var e = this.queue; + for (e.length = 0, e.push(a), a.visited = !0, this.visit(a, b, c); e.length;) + for (var f, h = e.pop(); f = d.getUnvisitedNode(h.neighbors);) f.visited = !0, this.visit(f, b, c), f.body.type === g.DYNAMIC && e.push(f) + }, d.prototype.split = function(a) { + for (var b = a.bodies, c = this.nodes, e = this.equations; c.length;) this.nodePool.release(c.pop()); + for (var f = 0; f !== b.length; f++) { + var g = this.nodePool.get(); + g.body = b[f], c.push(g) + } + for (var h = 0; h !== e.length; h++) { + var i = e[h], + f = b.indexOf(i.bodyA), + j = b.indexOf(i.bodyB), + k = c[f], + l = c[j]; + k.neighbors.push(l), l.neighbors.push(k), k.equations.push(i), l.equations.push(i) + } + for (var m = this.islands, f = 0; f < m.length; f++) this.islandPool.release(m[f]); + m.length = 0; + for (var n; n = d.getUnvisitedNode(c);) { + var o = this.islandPool.get(); + this.bfs(n, o.bodies, o.equations), m.push(o) + } + return m + } + }, { + "../math/vec2": 30, + "../objects/Body": 31, + "./../utils/IslandNodePool": 50, + "./../utils/IslandPool": 51, + "./Island": 58, + "./IslandNode": 60 + }], + 60: [function(a, b, c) { + function d(a) { + this.body = a, this.neighbors = [], this.equations = [], this.visited = !1 + } + b.exports = d, d.prototype.reset = function() { + this.equations.length = 0, this.neighbors.length = 0, this.visited = !1, this.body = null + } + }, {}], + 61: [function(a, b, c) { + function d(a) { + l.apply(this), a = a || {}, this.springs = [], this.bodies = [], this.disabledBodyCollisionPairs = [], this.solver = a.solver || new e, this.narrowphase = new r(this), this.islandManager = new u, this.gravity = f.fromValues(0, -9.78), a.gravity && f.copy(this.gravity, a.gravity), this.frictionGravity = f.length(this.gravity) || 10, this.useWorldGravityAsFrictionGravity = !0, this.useFrictionGravityOnZeroGravity = !0, this.broadphase = a.broadphase || new q, this.broadphase.setWorld(this), this.constraints = [], this.defaultMaterial = new n, this.defaultContactMaterial = new o(this.defaultMaterial, this.defaultMaterial), this.lastTimeStep = 1 / 60, this.applySpringForces = !0, this.applyDamping = !0, this.applyGravity = !0, this.solveConstraints = !0, this.contactMaterials = [], this.time = 0, this.accumulator = 0, this.stepping = !1, this.bodiesToBeRemoved = [], this.islandSplit = "undefined" == typeof a.islandSplit || !!a.islandSplit, this.emitImpactEvent = !0, this._constraintIdCounter = 0, this._bodyIdCounter = 0, this.postStepEvent = { + type: "postStep" + }, this.addBodyEvent = { + type: "addBody", + body: null + }, this.removeBodyEvent = { + type: "removeBody", + body: null + }, this.addSpringEvent = { + type: "addSpring", + spring: null + }, this.impactEvent = { + type: "impact", + bodyA: null, + bodyB: null, + shapeA: null, + shapeB: null, + contactEquation: null + }, this.postBroadphaseEvent = { + type: "postBroadphase", + pairs: null + }, this.sleepMode = d.NO_SLEEPING, this.beginContactEvent = { + type: "beginContact", + shapeA: null, + shapeB: null, + bodyA: null, + bodyB: null, + contactEquations: [] + }, this.endContactEvent = { + type: "endContact", + shapeA: null, + shapeB: null, + bodyA: null, + bodyB: null + }, this.preSolveEvent = { + type: "preSolve", + contactEquations: null, + frictionEquations: null + }, this.overlappingShapesLastState = { + keys: [] + }, this.overlappingShapesCurrentState = { + keys: [] + }, this.overlapKeeper = new t + } + var e = a("../solver/GSSolver"), + f = (a("../solver/Solver"), a("../collision/Ray"), a("../math/vec2")), + g = a("../shapes/Circle"), + h = a("../shapes/Convex"), + i = (a("../shapes/Line"), a("../shapes/Plane")), + j = a("../shapes/Capsule"), + k = a("../shapes/Particle"), + l = a("../events/EventEmitter"), + m = a("../objects/Body"), + n = (a("../shapes/Shape"), a("../objects/LinearSpring"), a("../material/Material")), + o = a("../material/ContactMaterial"), + p = (a("../constraints/DistanceConstraint"), a("../constraints/Constraint"), a("../constraints/LockConstraint"), a("../constraints/RevoluteConstraint"), a("../constraints/PrismaticConstraint"), a("../constraints/GearConstraint"), a("../../package.json"), a("../collision/Broadphase"), a("../collision/AABB")), + q = a("../collision/SAPBroadphase"), + r = a("../collision/Narrowphase"), + s = a("../utils/Utils"), + t = a("../utils/OverlapKeeper"), + u = a("./IslandManager"); + a("../objects/RotationalSpring"); + b.exports = d, d.prototype = new Object(l.prototype), d.prototype.constructor = d, d.NO_SLEEPING = 1, d.BODY_SLEEPING = 2, d.ISLAND_SLEEPING = 4, d.prototype.addConstraint = function(a) { + this.constraints.push(a) + }, d.prototype.addContactMaterial = function(a) { + this.contactMaterials.push(a) + }, d.prototype.removeContactMaterial = function(a) { + var b = this.contactMaterials.indexOf(a); + b !== -1 && s.splice(this.contactMaterials, b, 1) + }, d.prototype.getContactMaterial = function(a, b) { + for (var c = this.contactMaterials, d = 0, e = c.length; d !== e; d++) { + var f = c[d]; + if (f.materialA.id === a.id && f.materialB.id === b.id || f.materialA.id === b.id && f.materialB.id === a.id) return f + } + return !1 + }, d.prototype.removeConstraint = function(a) { + var b = this.constraints.indexOf(a); + b !== -1 && s.splice(this.constraints, b, 1) + }; + var v = (f.create(), f.create(), f.create(), f.create(), f.create(), f.create(), f.create()), + w = f.fromValues(0, 0), + x = f.fromValues(0, 0); + f.fromValues(0, 0), f.fromValues(0, 0); + d.prototype.step = function(a, b, c) { + if (c = c || 10, b = b || 0, 0 === b) this.internalStep(a), this.time += a; + else { + this.accumulator += b; + for (var d = 0; this.accumulator >= a && d < c;) this.internalStep(a), this.time += a, this.accumulator -= a, d++; + for (var e = this.accumulator % a / a, g = 0; g !== this.bodies.length; g++) { + var h = this.bodies[g]; + f.lerp(h.interpolatedPosition, h.previousPosition, h.position, e), h.interpolatedAngle = h.previousAngle + e * (h.angle - h.previousAngle) + } + } + }; + var y = []; + d.prototype.internalStep = function(a) { + this.stepping = !0; + var b = this.springs.length, + c = this.springs, + e = this.bodies, + g = this.gravity, + h = this.solver, + i = this.bodies.length, + j = this.broadphase, + k = this.narrowphase, + l = this.constraints, + n = v, + o = (f.scale, f.add), + p = (f.rotate, this.islandManager); + if (this.overlapKeeper.tick(), this.lastTimeStep = a, this.useWorldGravityAsFrictionGravity) { + var q = f.length(this.gravity); + 0 === q && this.useFrictionGravityOnZeroGravity || (this.frictionGravity = q) + } + if (this.applyGravity) + for (var r = 0; r !== i; r++) { + var t = e[r], + u = t.force; + t.type === m.DYNAMIC && t.sleepState !== m.SLEEPING && (f.scale(n, g, t.mass * t.gravityScale), o(u, u, n)) + } + if (this.applySpringForces) + for (var r = 0; r !== b; r++) { + var w = c[r]; + w.applyForce() + } + if (this.applyDamping) + for (var r = 0; r !== i; r++) { + var t = e[r]; + t.type === m.DYNAMIC && t.applyDamping(a) + } + for (var x = j.getCollisionPairs(this), z = this.disabledBodyCollisionPairs, r = z.length - 2; r >= 0; r -= 2) + for (var A = x.length - 2; A >= 0; A -= 2)(z[r] === x[A] && z[r + 1] === x[A + 1] || z[r + 1] === x[A] && z[r] === x[A + 1]) && x.splice(A, 2); + var B = l.length; + for (r = 0; r !== B; r++) { + var C = l[r]; + if (!C.collideConnected) + for (var A = x.length - 2; A >= 0; A -= 2)(C.bodyA === x[A] && C.bodyB === x[A + 1] || C.bodyB === x[A] && C.bodyA === x[A + 1]) && x.splice(A, 2) + } + this.postBroadphaseEvent.pairs = x, this.emit(this.postBroadphaseEvent), this.postBroadphaseEvent.pairs = null, k.reset(this); + for (var r = 0, D = x.length; r !== D; r += 2) + for (var E = x[r], F = x[r + 1], G = 0, H = E.shapes.length; G !== H; G++) + for (var I = E.shapes[G], J = I.position, K = I.angle, L = 0, M = F.shapes.length; L !== M; L++) { + var N = F.shapes[L], + O = N.position, + P = N.angle, + Q = this.defaultContactMaterial; + if (I.material && N.material) { + var R = this.getContactMaterial(I.material, N.material); + R && (Q = R) + } + this.runNarrowphase(k, E, I, J, K, F, N, O, P, Q, this.frictionGravity) + } + for (var r = 0; r !== i; r++) { + var S = e[r]; + S._wakeUpAfterNarrowphase && (S.wakeUp(), S._wakeUpAfterNarrowphase = !1) + } + if (this.has("endContact")) { + this.overlapKeeper.getEndOverlaps(y); + for (var T = this.endContactEvent, L = y.length; L--;) { + var U = y[L]; + T.shapeA = U.shapeA, T.shapeB = U.shapeB, T.bodyA = U.bodyA, T.bodyB = U.bodyB, this.emit(T) + } + y.length = 0 + } + var V = this.preSolveEvent; + V.contactEquations = k.contactEquations, V.frictionEquations = k.frictionEquations, this.emit(V), V.contactEquations = V.frictionEquations = null; + var B = l.length; + for (r = 0; r !== B; r++) l[r].update(); + if (k.contactEquations.length || k.frictionEquations.length || B) + if (this.islandSplit) { + for (p.equations.length = 0, s.appendArray(p.equations, k.contactEquations), s.appendArray(p.equations, k.frictionEquations), r = 0; r !== B; r++) s.appendArray(p.equations, l[r].equations); + p.split(this); + for (var r = 0; r !== p.islands.length; r++) { + var W = p.islands[r]; + W.equations.length && h.solveIsland(a, W) + } + } else { + for (h.addEquations(k.contactEquations), h.addEquations(k.frictionEquations), r = 0; r !== B; r++) h.addEquations(l[r].equations); + this.solveConstraints && h.solve(a, this), h.removeAllEquations() + } for (var r = 0; r !== i; r++) { + var S = e[r]; + S.integrate(a) + } + for (var r = 0; r !== i; r++) e[r].setZeroForce(); + if (this.emitImpactEvent && this.has("impact")) + for (var X = this.impactEvent, r = 0; r !== k.contactEquations.length; r++) { + var Y = k.contactEquations[r]; + Y.firstImpact && (X.bodyA = Y.bodyA, X.bodyB = Y.bodyB, X.shapeA = Y.shapeA, X.shapeB = Y.shapeB, X.contactEquation = Y, this.emit(X)) + } + if (this.sleepMode === d.BODY_SLEEPING) + for (r = 0; r !== i; r++) e[r].sleepTick(this.time, !1, a); + else if (this.sleepMode === d.ISLAND_SLEEPING && this.islandSplit) { + for (r = 0; r !== i; r++) e[r].sleepTick(this.time, !0, a); + for (var r = 0; r < this.islandManager.islands.length; r++) { + var W = this.islandManager.islands[r]; + W.wantsToSleep() && W.sleep() + } + } + this.stepping = !1; + for (var Z = this.bodiesToBeRemoved, r = 0; r !== Z.length; r++) this.removeBody(Z[r]); + Z.length = 0, this.emit(this.postStepEvent) + }, d.prototype.runNarrowphase = function(a, b, c, d, e, g, h, i, j, k, l) { + if (0 !== (c.collisionGroup & h.collisionMask) && 0 !== (h.collisionGroup & c.collisionMask)) { + f.rotate(w, d, b.angle), f.rotate(x, i, g.angle), f.add(w, w, b.position), f.add(x, x, g.position); + var n = e + b.angle, + o = j + g.angle; + a.enableFriction = k.friction > 0, a.frictionCoefficient = k.friction; + var p; + p = b.type === m.STATIC || b.type === m.KINEMATIC ? g.mass : g.type === m.STATIC || g.type === m.KINEMATIC ? b.mass : b.mass * g.mass / (b.mass + g.mass), a.slipForce = k.friction * l * p, a.restitution = k.restitution, a.surfaceVelocity = k.surfaceVelocity, a.frictionStiffness = k.frictionStiffness, a.frictionRelaxation = k.frictionRelaxation, a.stiffness = k.stiffness, a.relaxation = k.relaxation, a.contactSkinSize = k.contactSkinSize, a.enabledEquations = b.collisionResponse && g.collisionResponse && c.collisionResponse && h.collisionResponse; + var q = a[c.type | h.type], + r = 0; + if (q) { + var s = c.sensor || h.sensor, + t = a.frictionEquations.length; + r = c.type < h.type ? q.call(a, b, c, w, n, g, h, x, o, s) : q.call(a, g, h, x, o, b, c, w, n, s); + var u = a.frictionEquations.length - t; + if (r) { + if (b.allowSleep && b.type === m.DYNAMIC && b.sleepState === m.SLEEPING && g.sleepState === m.AWAKE && g.type !== m.STATIC) { + var v = f.squaredLength(g.velocity) + Math.pow(g.angularVelocity, 2), + y = Math.pow(g.sleepSpeedLimit, 2); + v >= 2 * y && (b._wakeUpAfterNarrowphase = !0) + } + if (g.allowSleep && g.type === m.DYNAMIC && g.sleepState === m.SLEEPING && b.sleepState === m.AWAKE && b.type !== m.STATIC) { + var z = f.squaredLength(b.velocity) + Math.pow(b.angularVelocity, 2), + A = Math.pow(b.sleepSpeedLimit, 2); + z >= 2 * A && (g._wakeUpAfterNarrowphase = !0) + } + if (this.overlapKeeper.setOverlapping(b, c, g, h), this.has("beginContact") && this.overlapKeeper.isNewOverlap(c, h)) { + var B = this.beginContactEvent; + if (B.shapeA = c, B.shapeB = h, B.bodyA = b, B.bodyB = g, B.contactEquations.length = 0, "number" == typeof r) + for (var C = a.contactEquations.length - r; C < a.contactEquations.length; C++) B.contactEquations.push(a.contactEquations[C]); + this.emit(B) + } + if ("number" == typeof r && u > 1) + for (var C = a.frictionEquations.length - u; C < a.frictionEquations.length; C++) { + var D = a.frictionEquations[C]; + D.setSlipForce(D.getSlipForce() / u) + } + } + } + } + }, d.prototype.addSpring = function(a) { + this.springs.push(a); + var b = this.addSpringEvent; + b.spring = a, this.emit(b), b.spring = null + }, d.prototype.removeSpring = function(a) { + var b = this.springs.indexOf(a); + b !== -1 && s.splice(this.springs, b, 1) + }, d.prototype.addBody = function(a) { + if (this.bodies.indexOf(a) === -1) { + this.bodies.push(a), a.world = this; + var b = this.addBodyEvent; + b.body = a, this.emit(b), b.body = null + } + }, d.prototype.removeBody = function(a) { + if (this.stepping) this.bodiesToBeRemoved.push(a); + else { + a.world = null; + var b = this.bodies.indexOf(a); + b !== -1 && (s.splice(this.bodies, b, 1), this.removeBodyEvent.body = a, a.resetConstraintVelocity(), this.emit(this.removeBodyEvent), this.removeBodyEvent.body = null) + } + }, d.prototype.getBodyById = function(a) { + for (var b = this.bodies, c = 0; c < b.length; c++) { + var d = b[c]; + if (d.id === a) return d + } + return !1 + }, d.prototype.disableBodyCollision = function(a, b) { + this.disabledBodyCollisionPairs.push(a, b) + }, d.prototype.enableBodyCollision = function(a, b) { + for (var c = this.disabledBodyCollisionPairs, d = 0; d < c.length; d += 2) + if (c[d] === a && c[d + 1] === b || c[d + 1] === a && c[d] === b) return void c.splice(d, 2) + }, d.prototype.clear = function() { + this.time = 0, this.solver && this.solver.equations.length && this.solver.removeAllEquations(); + for (var a = this.constraints, b = a.length - 1; b >= 0; b--) this.removeConstraint(a[b]); + for (var c = this.bodies, b = c.length - 1; b >= 0; b--) this.removeBody(c[b]); + for (var e = this.springs, b = e.length - 1; b >= 0; b--) this.removeSpring(e[b]); + for (var f = this.contactMaterials, b = f.length - 1; b >= 0; b--) this.removeContactMaterial(f[b]); + d.apply(this) + }; + var z = f.create(), + A = (f.fromValues(0, 0), f.fromValues(0, 0)); + d.prototype.hitTest = function(a, b, c) { + c = c || 0; + var d = new m({ + position: a + }), + e = new k, + l = a, + n = 0, + o = z, + p = A; + d.addShape(e); + for (var q = this.narrowphase, r = [], s = 0, t = b.length; s !== t; s++) + for (var u = b[s], v = 0, w = u.shapes.length; v !== w; v++) { + var x = u.shapes[v]; + f.rotate(o, x.position, u.angle), f.add(o, o, u.position); + var y = x.angle + u.angle; + (x instanceof g && q.circleParticle(u, x, o, y, d, e, l, n, !0) || x instanceof h && q.particleConvex(d, e, l, n, u, x, o, y, !0) || x instanceof i && q.particlePlane(d, e, l, n, u, x, o, y, !0) || x instanceof j && q.particleCapsule(d, e, l, n, u, x, o, y, !0) || x instanceof k && f.squaredLength(f.sub(p, o, a)) < c * c) && r.push(u) + } + return r + }, d.prototype.setGlobalStiffness = function(a) { + for (var b = this.constraints, c = 0; c !== b.length; c++) + for (var d = b[c], e = 0; e !== d.equations.length; e++) { + var f = d.equations[e]; + f.stiffness = a, f.needsUpdate = !0 + } + for (var g = this.contactMaterials, c = 0; c !== g.length; c++) { + var d = g[c]; + d.stiffness = d.frictionStiffness = a + } + var d = this.defaultContactMaterial; + d.stiffness = d.frictionStiffness = a + }, d.prototype.setGlobalRelaxation = function(a) { + for (var b = 0; b !== this.constraints.length; b++) + for (var c = this.constraints[b], d = 0; d !== c.equations.length; d++) { + var e = c.equations[d]; + e.relaxation = a, e.needsUpdate = !0 + } + for (var b = 0; b !== this.contactMaterials.length; b++) { + var c = this.contactMaterials[b]; + c.relaxation = c.frictionRelaxation = a + } + var c = this.defaultContactMaterial; + c.relaxation = c.frictionRelaxation = a + }; + var B = new p, + C = []; + d.prototype.raycast = function(a, b) { + return b.getAABB(B), this.broadphase.aabbQuery(this, B, C), b.intersectBodies(a, C), C.length = 0, a.hasHit() + } + }, { + "../../package.json": 6, + "../collision/AABB": 7, + "../collision/Broadphase": 8, + "../collision/Narrowphase": 10, + "../collision/Ray": 11, + "../collision/SAPBroadphase": 13, + "../constraints/Constraint": 14, + "../constraints/DistanceConstraint": 15, + "../constraints/GearConstraint": 16, + "../constraints/LockConstraint": 17, + "../constraints/PrismaticConstraint": 18, + "../constraints/RevoluteConstraint": 19, + "../events/EventEmitter": 26, + "../material/ContactMaterial": 27, + "../material/Material": 28, + "../math/vec2": 30, + "../objects/Body": 31, + "../objects/LinearSpring": 32, + "../objects/RotationalSpring": 33, + "../shapes/Capsule": 38, + "../shapes/Circle": 39, + "../shapes/Convex": 40, + "../shapes/Line": 42, + "../shapes/Particle": 43, + "../shapes/Plane": 44, + "../shapes/Shape": 45, + "../solver/GSSolver": 46, + "../solver/Solver": 47, + "../utils/OverlapKeeper": 52, + "../utils/Utils": 57, + "./IslandManager": 59 + }] + }, {}, [36])(36) +}), +function() { + var a = this, + b = b || {}; + return b.game = null, b.WEBGL_RENDERER = 0, b.CANVAS_RENDERER = 1, b.VERSION = "v2.2.9", b._UID = 0, "undefined" != typeof Float32Array ? (b.Float32Array = Float32Array, b.Uint16Array = Uint16Array, b.Uint32Array = Uint32Array, b.ArrayBuffer = ArrayBuffer) : (b.Float32Array = Array, b.Uint16Array = Array), b.PI_2 = 2 * Math.PI, b.RAD_TO_DEG = 180 / Math.PI, b.DEG_TO_RAD = Math.PI / 180, b.RETINA_PREFIX = "@2x", b.DisplayObject = function() { + this.position = new b.Point(0, 0), this.scale = new b.Point(1, 1), this.pivot = new b.Point(0, 0), this.rotation = 0, this.alpha = 1, this.visible = !0, this.hitArea = null, this.renderable = !1, this.parent = null, this.worldAlpha = 1, this.worldTransform = new b.Matrix, this.worldPosition = new b.Point(0, 0), this.worldScale = new b.Point(1, 1), this.worldRotation = 0, this.filterArea = null, this._sr = 0, this._cr = 1, this._bounds = new b.Rectangle(0, 0, 0, 0), this._currentBounds = null, this._mask = null, this._cacheAsBitmap = !1, this._cacheIsDirty = !1 + }, b.DisplayObject.prototype.constructor = b.DisplayObject, b.DisplayObject.prototype = { + destroy: function() { + if (this.children) { + for (var a = this.children.length; a--;) this.children[a].destroy(); + this.children = [] + } + this.hitArea = null, this.parent = null, this.worldTransform = null, this.filterArea = null, this.renderable = !1, this._bounds = null, this._currentBounds = null, this._mask = null, this._destroyCachedSprite() + }, + updateTransform: function(a) { + if (!a && !this.parent && !this.game) return this; + var c = this.parent; + a ? c = a : this.parent || (c = this.game.world); + var d, e, f, g, h, i, j = c.worldTransform, + k = this.worldTransform; + return this.rotation % b.PI_2 ? (this.rotation !== this.rotationCache && (this.rotationCache = this.rotation, this._sr = Math.sin(this.rotation), this._cr = Math.cos(this.rotation)), d = this._cr * this.scale.x, e = this._sr * this.scale.x, f = -this._sr * this.scale.y, g = this._cr * this.scale.y, h = this.position.x, i = this.position.y, (this.pivot.x || this.pivot.y) && (h -= this.pivot.x * d + this.pivot.y * f, i -= this.pivot.x * e + this.pivot.y * g), k.a = d * j.a + e * j.c, k.b = d * j.b + e * j.d, k.c = f * j.a + g * j.c, k.d = f * j.b + g * j.d, k.tx = h * j.a + i * j.c + j.tx, k.ty = h * j.b + i * j.d + j.ty) : (d = this.scale.x, g = this.scale.y, h = this.position.x - this.pivot.x * d, i = this.position.y - this.pivot.y * g, k.a = d * j.a, k.b = d * j.b, k.c = g * j.c, k.d = g * j.d, k.tx = h * j.a + i * j.c + j.tx, k.ty = h * j.b + i * j.d + j.ty), this.worldAlpha = this.alpha * c.worldAlpha, this.worldPosition.set(k.tx, k.ty), this.worldScale.set(this.scale.x * Math.sqrt(k.a * k.a + k.c * k.c), this.scale.y * Math.sqrt(k.b * k.b + k.d * k.d)), this.worldRotation = Math.atan2(-k.c, k.d), this._currentBounds = null, this.transformCallback && this.transformCallback.call(this.transformCallbackContext, k, j), this + }, + preUpdate: function() {}, + generateTexture: function(a, c, d) { + var e = this.getLocalBounds(), + f = new b.RenderTexture(0 | e.width, 0 | e.height, d, c, a); + return b.DisplayObject._tempMatrix.tx = -e.x, b.DisplayObject._tempMatrix.ty = -e.y, f.render(this, b.DisplayObject._tempMatrix), f + }, + updateCache: function() { + return this._generateCachedSprite(), this + }, + toGlobal: function(a) { + return this.updateTransform(), this.worldTransform.apply(a) + }, + toLocal: function(a, b) { + return b && (a = b.toGlobal(a)), this.updateTransform(), this.worldTransform.applyInverse(a) + }, + _renderCachedSprite: function(a) { + this._cachedSprite.worldAlpha = this.worldAlpha, a.gl ? b.Sprite.prototype._renderWebGL.call(this._cachedSprite, a) : b.Sprite.prototype._renderCanvas.call(this._cachedSprite, a) + }, + _generateCachedSprite: function() { + this._cacheAsBitmap = !1; + var a = this.getLocalBounds(); + if (a.width = Math.max(1, Math.ceil(a.width)), a.height = Math.max(1, Math.ceil(a.height)), this.updateTransform(), this._cachedSprite) this._cachedSprite.texture.resize(a.width, a.height); + else { + var c = new b.RenderTexture(a.width, a.height); + this._cachedSprite = new b.Sprite(c), this._cachedSprite.worldTransform = this.worldTransform + } + var d = this._filters; + this._filters = null, this._cachedSprite.filters = d, b.DisplayObject._tempMatrix.tx = -a.x, b.DisplayObject._tempMatrix.ty = -a.y, this._cachedSprite.texture.render(this, b.DisplayObject._tempMatrix, !0), this._cachedSprite.anchor.x = -(a.x / a.width), this._cachedSprite.anchor.y = -(a.y / a.height), this._filters = d, this._cacheAsBitmap = !0 + }, + _destroyCachedSprite: function() { + this._cachedSprite && (this._cachedSprite.texture.destroy(!0), this._cachedSprite = null) + } + }, b.DisplayObject.prototype.displayObjectUpdateTransform = b.DisplayObject.prototype.updateTransform, Object.defineProperties(b.DisplayObject.prototype, { + x: { + get: function() { + return this.position.x + }, + set: function(a) { + this.position.x = a + } + }, + y: { + get: function() { + return this.position.y + }, + set: function(a) { + this.position.y = a + } + }, + worldVisible: { + get: function() { + if (this.visible) { + var a = this.parent; + if (!a) return this.visible; + do { + if (!a.visible) return !1; + a = a.parent + } while (a); + return !0 + } + return !1 + } + }, + mask: { + get: function() { + return this._mask + }, + set: function(a) { + this._mask && (this._mask.isMask = !1), this._mask = a, a && (this._mask.isMask = !0) + } + }, + filters: { + get: function() { + return this._filters + }, + set: function(a) { + if (Array.isArray(a)) { + for (var c = [], d = 0; d < a.length; d++) + for (var e = a[d].passes, f = 0; f < e.length; f++) c.push(e[f]); + this._filterBlock = { + target: this, + filterPasses: c + } + } + this._filters = a, this.blendMode && this.blendMode === b.blendModes.MULTIPLY && (this.blendMode = b.blendModes.NORMAL) + } + }, + cacheAsBitmap: { + get: function() { + return this._cacheAsBitmap + }, + set: function(a) { + this._cacheAsBitmap !== a && (a ? this._generateCachedSprite() : this._destroyCachedSprite(), this._cacheAsBitmap = a) + } + } + }), b.DisplayObjectContainer = function() { + b.DisplayObject.call(this), this.children = [], this.ignoreChildInput = !1 + }, b.DisplayObjectContainer.prototype = Object.create(b.DisplayObject.prototype), b.DisplayObjectContainer.prototype.constructor = b.DisplayObjectContainer, b.DisplayObjectContainer.prototype.addChild = function(a) { + return this.addChildAt(a, this.children.length) + }, b.DisplayObjectContainer.prototype.addChildAt = function(a, b) { + if (b >= 0 && b <= this.children.length) return a.parent && a.parent.removeChild(a), a.parent = this, this.children.splice(b, 0, a), a; + throw new Error(a + "addChildAt: The index " + b + " supplied is out of bounds " + this.children.length) + }, b.DisplayObjectContainer.prototype.swapChildren = function(a, b) { + if (a !== b) { + var c = this.getChildIndex(a), + d = this.getChildIndex(b); + if (c < 0 || d < 0) throw new Error("swapChildren: Both the supplied DisplayObjects must be a child of the caller."); + this.children[c] = b, this.children[d] = a + } + }, b.DisplayObjectContainer.prototype.getChildIndex = function(a) { + var b = this.children.indexOf(a); + if (b === -1) throw new Error("The supplied DisplayObject must be a child of the caller"); + return b + }, b.DisplayObjectContainer.prototype.setChildIndex = function(a, b) { + if (b < 0 || b >= this.children.length) throw new Error("The supplied index is out of bounds"); + var c = this.getChildIndex(a); + this.children.splice(c, 1), this.children.splice(b, 0, a) + }, b.DisplayObjectContainer.prototype.getChildAt = function(a) { + if (a < 0 || a >= this.children.length) throw new Error("getChildAt: Supplied index " + a + " does not exist in the child list, or the supplied DisplayObject must be a child of the caller"); + return this.children[a] + }, b.DisplayObjectContainer.prototype.removeChild = function(a) { + var b = this.children.indexOf(a); + if (b !== -1) return this.removeChildAt(b) + }, b.DisplayObjectContainer.prototype.removeChildAt = function(a) { + var b = this.getChildAt(a); + return b && (b.parent = void 0, this.children.splice(a, 1)), b + }, b.DisplayObjectContainer.prototype.removeChildren = function(a, b) { + void 0 === a && (a = 0), void 0 === b && (b = this.children.length); + var c = b - a; + if (c > 0 && c <= b) { + for (var d = this.children.splice(begin, c), e = 0; e < d.length; e++) { + var f = d[e]; + f.parent = void 0 + } + return d + } + if (0 === c && 0 === this.children.length) return []; + throw new Error("removeChildren: Range Error, numeric values are outside the acceptable range") + }, b.DisplayObjectContainer.prototype.updateTransform = function() { + if (this.visible && (this.displayObjectUpdateTransform(), !this._cacheAsBitmap)) + for (var a = 0; a < this.children.length; a++) this.children[a].updateTransform(); + }, b.DisplayObjectContainer.prototype.displayObjectContainerUpdateTransform = b.DisplayObjectContainer.prototype.updateTransform, b.DisplayObjectContainer.prototype.getBounds = function(a) { + var c = a && a instanceof b.DisplayObject, + d = !0; + c ? d = a instanceof b.DisplayObjectContainer && a.contains(this) : a = this; + var e; + if (c) { + var f = a.worldTransform; + for (a.worldTransform = b.identityMatrix, e = 0; e < a.children.length; e++) a.children[e].updateTransform() + } + var g, h, i, j = 1 / 0, + k = 1 / 0, + l = -(1 / 0), + m = -(1 / 0), + n = !1; + for (e = 0; e < this.children.length; e++) { + var o = this.children[e]; + o.visible && (n = !0, g = this.children[e].getBounds(), j = j < g.x ? j : g.x, k = k < g.y ? k : g.y, h = g.width + g.x, i = g.height + g.y, l = l > h ? l : h, m = m > i ? m : i) + } + var p = this._bounds; + if (!n) { + p = new b.Rectangle; + var q = p.x, + r = p.width + p.x, + s = p.y, + t = p.height + p.y, + u = this.worldTransform, + v = u.a, + w = u.b, + x = u.c, + y = u.d, + z = u.tx, + A = u.ty, + B = v * r + x * t + z, + C = y * t + w * r + A, + D = v * q + x * t + z, + E = y * t + w * q + A, + F = v * q + x * s + z, + G = y * s + w * q + A, + H = v * r + x * s + z, + I = y * s + w * r + A; + l = B, m = C, j = B, k = C, j = D < j ? D : j, j = F < j ? F : j, j = H < j ? H : j, k = E < k ? E : k, k = G < k ? G : k, k = I < k ? I : k, l = D > l ? D : l, l = F > l ? F : l, l = H > l ? H : l, m = E > m ? E : m, m = G > m ? G : m, m = I > m ? I : m + } + if (p.x = j, p.y = k, p.width = l - j, p.height = m - k, c) + for (a.worldTransform = f, e = 0; e < a.children.length; e++) a.children[e].updateTransform(); + if (!d) { + var J = a.getBounds(); + p.x -= J.x, p.y -= J.y + } + return p + }, b.DisplayObjectContainer.prototype.getLocalBounds = function() { + return this.getBounds(this) + }, b.DisplayObjectContainer.prototype.contains = function(a) { + return !!a && (a === this || this.contains(a.parent)) + }, b.DisplayObjectContainer.prototype._renderWebGL = function(a) { + if (this.visible && !(this.alpha <= 0)) { + if (this._cacheAsBitmap) return void this._renderCachedSprite(a); + var b; + if (this._mask || this._filters) { + for (this._filters && (a.spriteBatch.flush(), a.filterManager.pushFilter(this._filterBlock)), this._mask && (a.spriteBatch.stop(), a.maskManager.pushMask(this.mask, a), a.spriteBatch.start()), b = 0; b < this.children.length; b++) this.children[b]._renderWebGL(a); + a.spriteBatch.stop(), this._mask && a.maskManager.popMask(this._mask, a), this._filters && a.filterManager.popFilter(), a.spriteBatch.start() + } else + for (b = 0; b < this.children.length; b++) this.children[b]._renderWebGL(a) + } + }, b.DisplayObjectContainer.prototype._renderCanvas = function(a) { + if (this.visible !== !1 && 0 !== this.alpha) { + if (this._cacheAsBitmap) return void this._renderCachedSprite(a); + this._mask && a.maskManager.pushMask(this._mask, a); + for (var b = 0; b < this.children.length; b++) this.children[b]._renderCanvas(a); + this._mask && a.maskManager.popMask(a) + } + }, Object.defineProperty(b.DisplayObjectContainer.prototype, "width", { + get: function() { + return this.getLocalBounds().width * this.scale.x + }, + set: function(a) { + var b = this.getLocalBounds().width; + 0 !== b ? this.scale.x = a / b : this.scale.x = 1, this._width = a + } + }), Object.defineProperty(b.DisplayObjectContainer.prototype, "height", { + get: function() { + return this.getLocalBounds().height * this.scale.y + }, + set: function(a) { + var b = this.getLocalBounds().height; + 0 !== b ? this.scale.y = a / b : this.scale.y = 1, this._height = a + } + }), b.Sprite = function(a) { + b.DisplayObjectContainer.call(this), this.anchor = new b.Point, this.texture = a || b.Texture.emptyTexture, this._width = 0, this._height = 0, this.tint = 16777215, this.cachedTint = -1, this.tintedTexture = null, this.blendMode = b.blendModes.NORMAL, this.shader = null, this.exists = !0, this.texture.baseTexture.hasLoaded && this.onTextureUpdate(), this.renderable = !0 + }, b.Sprite.prototype = Object.create(b.DisplayObjectContainer.prototype), b.Sprite.prototype.constructor = b.Sprite, Object.defineProperty(b.Sprite.prototype, "width", { + get: function() { + return this.scale.x * this.texture.frame.width + }, + set: function(a) { + this.scale.x = a / this.texture.frame.width, this._width = a + } + }), Object.defineProperty(b.Sprite.prototype, "height", { + get: function() { + return this.scale.y * this.texture.frame.height + }, + set: function(a) { + this.scale.y = a / this.texture.frame.height, this._height = a + } + }), b.Sprite.prototype.setTexture = function(a, b) { + void 0 !== b && this.texture.baseTexture.destroy(), this.texture.baseTexture.skipRender = !1, this.texture = a, this.texture.valid = !0, this.cachedTint = -1 + }, b.Sprite.prototype.onTextureUpdate = function() { + this._width && (this.scale.x = this._width / this.texture.frame.width), this._height && (this.scale.y = this._height / this.texture.frame.height) + }, b.Sprite.prototype.getBounds = function(a) { + var b = this.texture.frame.width, + c = this.texture.frame.height, + d = b * (1 - this.anchor.x), + e = b * -this.anchor.x, + f = c * (1 - this.anchor.y), + g = c * -this.anchor.y, + h = a || this.worldTransform, + i = h.a, + j = h.b, + k = h.c, + l = h.d, + m = h.tx, + n = h.ty, + o = -(1 / 0), + p = -(1 / 0), + q = 1 / 0, + r = 1 / 0; + if (0 === j && 0 === k) { + if (i < 0) { + i *= -1; + var s = d; + d = -e, e = -s + } + if (l < 0) { + l *= -1; + var s = f; + f = -g, g = -s + } + q = i * e + m, o = i * d + m, r = l * g + n, p = l * f + n + } else { + var t = i * e + k * g + m, + u = l * g + j * e + n, + v = i * d + k * g + m, + w = l * g + j * d + n, + x = i * d + k * f + m, + y = l * f + j * d + n, + z = i * e + k * f + m, + A = l * f + j * e + n; + q = t < q ? t : q, q = v < q ? v : q, q = x < q ? x : q, q = z < q ? z : q, r = u < r ? u : r, r = w < r ? w : r, r = y < r ? y : r, r = A < r ? A : r, o = t > o ? t : o, o = v > o ? v : o, o = x > o ? x : o, o = z > o ? z : o, p = u > p ? u : p, p = w > p ? w : p, p = y > p ? y : p, p = A > p ? A : p + } + var B = this._bounds; + return B.x = q, B.width = o - q, B.y = r, B.height = p - r, this._currentBounds = B, B + }, b.Sprite.prototype.getLocalBounds = function() { + var a = this.worldTransform; + this.worldTransform = b.identityMatrix; + for (var c = 0; c < this.children.length; c++) this.children[c].updateTransform(); + var d = this.getBounds(); + for (this.worldTransform = a, c = 0; c < this.children.length; c++) this.children[c].updateTransform(); + return d + }, b.Sprite.prototype._renderWebGL = function(a, b) { + if (this.visible && !(this.alpha <= 0) && this.renderable) { + var c = this.worldTransform; + if (b && (c = b), this._mask || this._filters) { + var d = a.spriteBatch; + this._filters && (d.flush(), a.filterManager.pushFilter(this._filterBlock)), this._mask && (d.stop(), a.maskManager.pushMask(this.mask, a), d.start()), d.render(this); + for (var e = 0; e < this.children.length; e++) this.children[e]._renderWebGL(a); + d.stop(), this._mask && a.maskManager.popMask(this._mask, a), this._filters && a.filterManager.popFilter(), d.start() + } else { + a.spriteBatch.render(this); + for (var e = 0; e < this.children.length; e++) this.children[e]._renderWebGL(a, c) + } + } + }, b.Sprite.prototype._renderCanvas = function(a, c) { + if (!(!this.visible || 0 === this.alpha || !this.renderable || this.texture.crop.width <= 0 || this.texture.crop.height <= 0)) { + var d = this.worldTransform; + if (c && (d = c), this.blendMode !== a.currentBlendMode && (a.currentBlendMode = this.blendMode, a.context.globalCompositeOperation = b.blendModesCanvas[a.currentBlendMode]), this._mask && a.maskManager.pushMask(this._mask, a), this.texture.valid) { + var e = this.texture.baseTexture.resolution / a.resolution; + a.context.globalAlpha = this.worldAlpha, a.smoothProperty && a.scaleMode !== this.texture.baseTexture.scaleMode && (a.scaleMode = this.texture.baseTexture.scaleMode, a.context[a.smoothProperty] = a.scaleMode === b.scaleModes.LINEAR); + var f = this.texture.trim ? this.texture.trim.x - this.anchor.x * this.texture.trim.width : this.anchor.x * -this.texture.frame.width, + g = this.texture.trim ? this.texture.trim.y - this.anchor.y * this.texture.trim.height : this.anchor.y * -this.texture.frame.height, + h = d.tx * a.resolution + a.shakeX, + i = d.ty * a.resolution + a.shakeY; + a.roundPixels ? (a.context.setTransform(d.a, d.b, d.c, d.d, 0 | h, 0 | i), f |= 0, g |= 0) : a.context.setTransform(d.a, d.b, d.c, d.d, h, i); + var j = this.texture.crop.width, + k = this.texture.crop.height; + if (f /= e, g /= e, 16777215 !== this.tint)(this.texture.requiresReTint || this.cachedTint !== this.tint) && (this.tintedTexture = b.CanvasTinter.getTintedTexture(this, this.tint), this.cachedTint = this.tint, this.texture.requiresReTint = !1), a.context.drawImage(this.tintedTexture, 0, 0, j, k, f, g, j / e, k / e); + else { + var l = this.texture.crop.x, + m = this.texture.crop.y; + a.context.drawImage(this.texture.baseTexture.source, l, m, j, k, f, g, j / e, k / e) + } + } + for (var n = 0; n < this.children.length; n++) this.children[n]._renderCanvas(a); + this._mask && a.maskManager.popMask(a) + } + }, b.SpriteBatch = function(a) { + b.DisplayObjectContainer.call(this), this.textureThing = a, this.ready = !1 + }, b.SpriteBatch.prototype = Object.create(b.DisplayObjectContainer.prototype), b.SpriteBatch.prototype.constructor = b.SpriteBatch, b.SpriteBatch.prototype.initWebGL = function(a) { + this.fastSpriteBatch = new b.WebGLFastSpriteBatch(a), this.ready = !0 + }, b.SpriteBatch.prototype.updateTransform = function() { + this.displayObjectUpdateTransform() + }, b.SpriteBatch.prototype._renderWebGL = function(a) { + !this.visible || this.alpha <= 0 || !this.children.length || (this.ready || this.initWebGL(a.gl), this.fastSpriteBatch.gl !== a.gl && this.fastSpriteBatch.setContext(a.gl), a.spriteBatch.stop(), a.shaderManager.setShader(a.shaderManager.fastShader), this.fastSpriteBatch.begin(this, a), this.fastSpriteBatch.render(this), a.spriteBatch.start()) + }, b.SpriteBatch.prototype._renderCanvas = function(a) { + if (this.visible && !(this.alpha <= 0) && this.children.length) { + var b = a.context; + b.globalAlpha = this.worldAlpha, this.displayObjectUpdateTransform(); + for (var c = this.worldTransform, d = !0, e = 0; e < this.children.length; e++) { + var f = this.children[e]; + if (f.visible) { + var g = f.texture, + h = g.frame; + if (b.globalAlpha = this.worldAlpha * f.alpha, f.rotation % (2 * Math.PI) === 0) d && (b.setTransform(c.a, c.b, c.c, c.d, c.tx, c.ty), d = !1), b.drawImage(g.baseTexture.source, h.x, h.y, h.width, h.height, f.anchor.x * (-h.width * f.scale.x) + f.position.x + .5 + a.shakeX | 0, f.anchor.y * (-h.height * f.scale.y) + f.position.y + .5 + a.shakeY | 0, h.width * f.scale.x, h.height * f.scale.y); + else { + d || (d = !0), f.displayObjectUpdateTransform(); + var i = f.worldTransform, + j = i.tx * a.resolution + a.shakeX, + k = i.ty * a.resolution + a.shakeY; + a.roundPixels ? b.setTransform(i.a, i.b, i.c, i.d, 0 | j, 0 | k) : b.setTransform(i.a, i.b, i.c, i.d, j, k), b.drawImage(g.baseTexture.source, h.x, h.y, h.width, h.height, f.anchor.x * -h.width + .5 | 0, f.anchor.y * -h.height + .5 | 0, h.width, h.height) + } + } + } + } + }, b.hex2rgb = function(a) { + return [(a >> 16 & 255) / 255, (a >> 8 & 255) / 255, (255 & a) / 255] + }, b.rgb2hex = function(a) { + return (255 * a[0] << 16) + (255 * a[1] << 8) + 255 * a[2] + }, b.canUseNewCanvasBlendModes = function() { + if (void 0 === document) return !1; + var a = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/", + c = "AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==", + d = new Image; + d.src = a + "AP804Oa6" + c; + var e = new Image; + e.src = a + "/wCKxvRF" + c; + var f = b.CanvasPool.create(this, 6, 1), + g = f.getContext("2d"); + if (g.globalCompositeOperation = "multiply", g.drawImage(d, 0, 0), g.drawImage(e, 2, 0), !g.getImageData(2, 0, 1, 1)) return !1; + var h = g.getImageData(2, 0, 1, 1).data; + return b.CanvasPool.remove(this), 255 === h[0] && 0 === h[1] && 0 === h[2] + }, b.getNextPowerOfTwo = function(a) { + if (a > 0 && 0 === (a & a - 1)) return a; + for (var b = 1; b < a;) b <<= 1; + return b + }, b.isPowerOfTwo = function(a, b) { + return a > 0 && 0 === (a & a - 1) && b > 0 && 0 === (b & b - 1) + }, b.CanvasPool = { + create: function(a, c, d) { + var e, f = b.CanvasPool.getFirst(); + if (f === -1) { + var g = { + parent: a, + canvas: document.createElement("canvas") + }; + b.CanvasPool.pool.push(g), e = g.canvas + } else b.CanvasPool.pool[f].parent = a, e = b.CanvasPool.pool[f].canvas; + return void 0 !== c && (e.width = c, e.height = d), e + }, + getFirst: function() { + for (var a = b.CanvasPool.pool, c = 0; c < a.length; c++) + if (!a[c].parent) return c; + return -1 + }, + remove: function(a) { + for (var c = b.CanvasPool.pool, d = 0; d < c.length; d++) c[d].parent === a && (c[d].parent = null, c[d].canvas.width = 1, c[d].canvas.height = 1) + }, + removeByCanvas: function(a) { + for (var c = b.CanvasPool.pool, d = 0; d < c.length; d++) c[d].canvas === a && (c[d].parent = null, c[d].canvas.width = 1, c[d].canvas.height = 1) + }, + getTotal: function() { + for (var a = b.CanvasPool.pool, c = 0, d = 0; d < a.length; d++) a[d].parent && c++; + return c + }, + getFree: function() { + for (var a = b.CanvasPool.pool, c = 0, d = 0; d < a.length; d++) a[d].parent || c++; + return c + } + }, b.CanvasPool.pool = [], b.initDefaultShaders = function() {}, b.CompileVertexShader = function(a, c) { + return b._CompileShader(a, c, a.VERTEX_SHADER) + }, b.CompileFragmentShader = function(a, c) { + return b._CompileShader(a, c, a.FRAGMENT_SHADER) + }, b._CompileShader = function(a, b, c) { + var d = b; + Array.isArray(b) && (d = b.join("\n")); + var e = a.createShader(c); + return a.shaderSource(e, d), a.compileShader(e), a.getShaderParameter(e, a.COMPILE_STATUS) ? e : (window.console.log(a.getShaderInfoLog(e)), null) + }, b.compileProgram = function(a, c, d) { + var e = b.CompileFragmentShader(a, d), + f = b.CompileVertexShader(a, c), + g = a.createProgram(); + return a.attachShader(g, f), a.attachShader(g, e), a.linkProgram(g), a.getProgramParameter(g, a.LINK_STATUS) || (window.console.log(a.getProgramInfoLog(g)), window.console.log("Could not initialise shaders")), g + }, b.PixiShader = function(a) { + this._UID = b._UID++, this.gl = a, this.program = null, this.fragmentSrc = ["precision lowp float;", "varying vec2 vTextureCoord;", "varying vec4 vColor;", "uniform sampler2D uSampler;", "void main(void) {", " gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;", "}"], this.textureCount = 0, this.firstRun = !0, this.dirty = !0, this.attributes = [], this.init() + }, b.PixiShader.prototype.constructor = b.PixiShader, b.PixiShader.prototype.init = function() { + var a = this.gl, + c = b.compileProgram(a, this.vertexSrc || b.PixiShader.defaultVertexSrc, this.fragmentSrc); + a.useProgram(c), this.uSampler = a.getUniformLocation(c, "uSampler"), this.projectionVector = a.getUniformLocation(c, "projectionVector"), this.offsetVector = a.getUniformLocation(c, "offsetVector"), this.dimensions = a.getUniformLocation(c, "dimensions"), this.aVertexPosition = a.getAttribLocation(c, "aVertexPosition"), this.aTextureCoord = a.getAttribLocation(c, "aTextureCoord"), this.colorAttribute = a.getAttribLocation(c, "aColor"), this.colorAttribute === -1 && (this.colorAttribute = 2), this.attributes = [this.aVertexPosition, this.aTextureCoord, this.colorAttribute]; + for (var d in this.uniforms) this.uniforms[d].uniformLocation = a.getUniformLocation(c, d); + this.initUniforms(), this.program = c + }, b.PixiShader.prototype.initUniforms = function() { + this.textureCount = 1; + var a, b = this.gl; + for (var c in this.uniforms) { + a = this.uniforms[c]; + var d = a.type; + "sampler2D" === d ? (a._init = !1, null !== a.value && this.initSampler2D(a)) : "mat2" === d || "mat3" === d || "mat4" === d ? (a.glMatrix = !0, a.glValueLength = 1, "mat2" === d ? a.glFunc = b.uniformMatrix2fv : "mat3" === d ? a.glFunc = b.uniformMatrix3fv : "mat4" === d && (a.glFunc = b.uniformMatrix4fv)) : (a.glFunc = b["uniform" + d], "2f" === d || "2i" === d ? a.glValueLength = 2 : "3f" === d || "3i" === d ? a.glValueLength = 3 : "4f" === d || "4i" === d ? a.glValueLength = 4 : a.glValueLength = 1) + } + }, b.PixiShader.prototype.initSampler2D = function(a) { + if (a.value && a.value.baseTexture && a.value.baseTexture.hasLoaded) { + var b = this.gl; + if (b.activeTexture(b["TEXTURE" + this.textureCount]), b.bindTexture(b.TEXTURE_2D, a.value.baseTexture._glTextures[b.id]), a.textureData) { + var c = a.textureData, + d = c.magFilter ? c.magFilter : b.LINEAR, + e = c.minFilter ? c.minFilter : b.LINEAR, + f = c.wrapS ? c.wrapS : b.CLAMP_TO_EDGE, + g = c.wrapT ? c.wrapT : b.CLAMP_TO_EDGE, + h = c.luminance ? b.LUMINANCE : b.RGBA; + if (c.repeat && (f = b.REPEAT, g = b.REPEAT), b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL, !!c.flipY), c.width) { + var i = c.width ? c.width : 512, + j = c.height ? c.height : 2, + k = c.border ? c.border : 0; + b.texImage2D(b.TEXTURE_2D, 0, h, i, j, k, h, b.UNSIGNED_BYTE, null) + } else b.texImage2D(b.TEXTURE_2D, 0, h, b.RGBA, b.UNSIGNED_BYTE, a.value.baseTexture.source); + b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, d), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, e), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, f), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, g) + } + b.uniform1i(a.uniformLocation, this.textureCount), a._init = !0, this.textureCount++ + } + }, b.PixiShader.prototype.syncUniforms = function() { + this.textureCount = 1; + var a, c = this.gl; + for (var d in this.uniforms) a = this.uniforms[d], 1 === a.glValueLength ? a.glMatrix === !0 ? a.glFunc.call(c, a.uniformLocation, a.transpose, a.value) : a.glFunc.call(c, a.uniformLocation, a.value) : 2 === a.glValueLength ? a.glFunc.call(c, a.uniformLocation, a.value.x, a.value.y) : 3 === a.glValueLength ? a.glFunc.call(c, a.uniformLocation, a.value.x, a.value.y, a.value.z) : 4 === a.glValueLength ? a.glFunc.call(c, a.uniformLocation, a.value.x, a.value.y, a.value.z, a.value.w) : "sampler2D" === a.type && (a._init ? (c.activeTexture(c["TEXTURE" + this.textureCount]), a.value.baseTexture._dirty[c.id] ? b.instances[c.id].updateTexture(a.value.baseTexture) : c.bindTexture(c.TEXTURE_2D, a.value.baseTexture._glTextures[c.id]), c.uniform1i(a.uniformLocation, this.textureCount), this.textureCount++) : this.initSampler2D(a)) + }, b.PixiShader.prototype.destroy = function() { + this.gl.deleteProgram(this.program), this.uniforms = null, this.gl = null, this.attributes = null + }, b.PixiShader.defaultVertexSrc = ["attribute vec2 aVertexPosition;", "attribute vec2 aTextureCoord;", "attribute vec4 aColor;", "uniform vec2 projectionVector;", "uniform vec2 offsetVector;", "varying vec2 vTextureCoord;", "varying vec4 vColor;", "const vec2 center = vec2(-1.0, 1.0);", "void main(void) {", " gl_Position = vec4( ((aVertexPosition + offsetVector) / projectionVector) + center , 0.0, 1.0);", " vTextureCoord = aTextureCoord;", " vColor = vec4(aColor.rgb * aColor.a, aColor.a);", "}"], b.PixiFastShader = function(a) { + this._UID = b._UID++, this.gl = a, this.program = null, this.fragmentSrc = ["precision lowp float;", "varying vec2 vTextureCoord;", "varying float vColor;", "uniform sampler2D uSampler;", "void main(void) {", " gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;", "}"], this.vertexSrc = ["attribute vec2 aVertexPosition;", "attribute vec2 aPositionCoord;", "attribute vec2 aScale;", "attribute float aRotation;", "attribute vec2 aTextureCoord;", "attribute float aColor;", "uniform vec2 projectionVector;", "uniform vec2 offsetVector;", "uniform mat3 uMatrix;", "varying vec2 vTextureCoord;", "varying float vColor;", "const vec2 center = vec2(-1.0, 1.0);", "void main(void) {", " vec2 v;", " vec2 sv = aVertexPosition * aScale;", " v.x = (sv.x) * cos(aRotation) - (sv.y) * sin(aRotation);", " v.y = (sv.x) * sin(aRotation) + (sv.y) * cos(aRotation);", " v = ( uMatrix * vec3(v + aPositionCoord , 1.0) ).xy ;", " gl_Position = vec4( ( v / projectionVector) + center , 0.0, 1.0);", " vTextureCoord = aTextureCoord;", " vColor = aColor;", "}"], this.textureCount = 0, this.init() + }, b.PixiFastShader.prototype.constructor = b.PixiFastShader, b.PixiFastShader.prototype.init = function() { + var a = this.gl, + c = b.compileProgram(a, this.vertexSrc, this.fragmentSrc); + a.useProgram(c), this.uSampler = a.getUniformLocation(c, "uSampler"), this.projectionVector = a.getUniformLocation(c, "projectionVector"), this.offsetVector = a.getUniformLocation(c, "offsetVector"), this.dimensions = a.getUniformLocation(c, "dimensions"), this.uMatrix = a.getUniformLocation(c, "uMatrix"), this.aVertexPosition = a.getAttribLocation(c, "aVertexPosition"), this.aPositionCoord = a.getAttribLocation(c, "aPositionCoord"), this.aScale = a.getAttribLocation(c, "aScale"), this.aRotation = a.getAttribLocation(c, "aRotation"), this.aTextureCoord = a.getAttribLocation(c, "aTextureCoord"), this.colorAttribute = a.getAttribLocation(c, "aColor"), this.colorAttribute === -1 && (this.colorAttribute = 2), this.attributes = [this.aVertexPosition, this.aPositionCoord, this.aScale, this.aRotation, this.aTextureCoord, this.colorAttribute], this.program = c + }, b.PixiFastShader.prototype.destroy = function() { + this.gl.deleteProgram(this.program), this.uniforms = null, this.gl = null, this.attributes = null + }, b.StripShader = function(a) { + this._UID = b._UID++, this.gl = a, this.program = null, this.fragmentSrc = ["precision mediump float;", "varying vec2 vTextureCoord;", "uniform float alpha;", "uniform sampler2D uSampler;", "void main(void) {", " gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y)) * alpha;", "}"], this.vertexSrc = ["attribute vec2 aVertexPosition;", "attribute vec2 aTextureCoord;", "uniform mat3 translationMatrix;", "uniform vec2 projectionVector;", "uniform vec2 offsetVector;", "varying vec2 vTextureCoord;", "void main(void) {", " vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);", " v -= offsetVector.xyx;", " gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);", " vTextureCoord = aTextureCoord;", "}"], this.init() + }, b.StripShader.prototype.constructor = b.StripShader, b.StripShader.prototype.init = function() { + var a = this.gl, + c = b.compileProgram(a, this.vertexSrc, this.fragmentSrc); + a.useProgram(c), this.uSampler = a.getUniformLocation(c, "uSampler"), this.projectionVector = a.getUniformLocation(c, "projectionVector"), this.offsetVector = a.getUniformLocation(c, "offsetVector"), this.colorAttribute = a.getAttribLocation(c, "aColor"), this.aVertexPosition = a.getAttribLocation(c, "aVertexPosition"), this.aTextureCoord = a.getAttribLocation(c, "aTextureCoord"), this.attributes = [this.aVertexPosition, this.aTextureCoord], this.translationMatrix = a.getUniformLocation(c, "translationMatrix"), this.alpha = a.getUniformLocation(c, "alpha"), this.program = c + }, b.StripShader.prototype.destroy = function() { + this.gl.deleteProgram(this.program), this.uniforms = null, this.gl = null, this.attribute = null + }, b.PrimitiveShader = function(a) { + this._UID = b._UID++, this.gl = a, this.program = null, this.fragmentSrc = ["precision mediump float;", "varying vec4 vColor;", "void main(void) {", " gl_FragColor = vColor;", "}"], this.vertexSrc = ["attribute vec2 aVertexPosition;", "attribute vec4 aColor;", "uniform mat3 translationMatrix;", "uniform vec2 projectionVector;", "uniform vec2 offsetVector;", "uniform float alpha;", "uniform float flipY;", "uniform vec3 tint;", "varying vec4 vColor;", "void main(void) {", " vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);", " v -= offsetVector.xyx;", " gl_Position = vec4( v.x / projectionVector.x -1.0, (v.y / projectionVector.y * -flipY) + flipY , 0.0, 1.0);", " vColor = aColor * vec4(tint * alpha, alpha);", "}"], this.init() + }, b.PrimitiveShader.prototype.constructor = b.PrimitiveShader, b.PrimitiveShader.prototype.init = function() { + var a = this.gl, + c = b.compileProgram(a, this.vertexSrc, this.fragmentSrc); + a.useProgram(c), this.projectionVector = a.getUniformLocation(c, "projectionVector"), this.offsetVector = a.getUniformLocation(c, "offsetVector"), this.tintColor = a.getUniformLocation(c, "tint"), this.flipY = a.getUniformLocation(c, "flipY"), this.aVertexPosition = a.getAttribLocation(c, "aVertexPosition"), this.colorAttribute = a.getAttribLocation(c, "aColor"), this.attributes = [this.aVertexPosition, this.colorAttribute], this.translationMatrix = a.getUniformLocation(c, "translationMatrix"), this.alpha = a.getUniformLocation(c, "alpha"), this.program = c + }, b.PrimitiveShader.prototype.destroy = function() { + this.gl.deleteProgram(this.program), this.uniforms = null, this.gl = null, this.attributes = null + }, b.ComplexPrimitiveShader = function(a) { + this._UID = b._UID++, this.gl = a, this.program = null, this.fragmentSrc = ["precision mediump float;", "varying vec4 vColor;", "void main(void) {", " gl_FragColor = vColor;", "}"], this.vertexSrc = ["attribute vec2 aVertexPosition;", "uniform mat3 translationMatrix;", "uniform vec2 projectionVector;", "uniform vec2 offsetVector;", "uniform vec3 tint;", "uniform float alpha;", "uniform vec3 color;", "uniform float flipY;", "varying vec4 vColor;", "void main(void) {", " vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);", " v -= offsetVector.xyx;", " gl_Position = vec4( v.x / projectionVector.x -1.0, (v.y / projectionVector.y * -flipY) + flipY , 0.0, 1.0);", " vColor = vec4(color * alpha * tint, alpha);", "}"], this.init() + }, b.ComplexPrimitiveShader.prototype.constructor = b.ComplexPrimitiveShader, b.ComplexPrimitiveShader.prototype.init = function() { + var a = this.gl, + c = b.compileProgram(a, this.vertexSrc, this.fragmentSrc); + a.useProgram(c), this.projectionVector = a.getUniformLocation(c, "projectionVector"), this.offsetVector = a.getUniformLocation(c, "offsetVector"), this.tintColor = a.getUniformLocation(c, "tint"), this.color = a.getUniformLocation(c, "color"), this.flipY = a.getUniformLocation(c, "flipY"), this.aVertexPosition = a.getAttribLocation(c, "aVertexPosition"), this.attributes = [this.aVertexPosition, this.colorAttribute], this.translationMatrix = a.getUniformLocation(c, "translationMatrix"), this.alpha = a.getUniformLocation(c, "alpha"), this.program = c + }, b.ComplexPrimitiveShader.prototype.destroy = function() { + this.gl.deleteProgram(this.program), this.uniforms = null, this.gl = null, this.attribute = null + }, b.glContexts = [], b.instances = [], b.WebGLRenderer = function(a) { + this.game = a, b.defaultRenderer || (b.defaultRenderer = this), this.type = b.WEBGL_RENDERER, this.resolution = a.resolution, this.transparent = a.transparent, this.autoResize = !1, this.preserveDrawingBuffer = a.preserveDrawingBuffer, this.clearBeforeRender = a.clearBeforeRender, this.width = a.width, this.height = a.height, this.view = a.canvas, this._contextOptions = { + alpha: this.transparent, + antialias: a.antialias, + premultipliedAlpha: this.transparent && "notMultiplied" !== this.transparent, + stencil: !0, + preserveDrawingBuffer: this.preserveDrawingBuffer + }, this.projection = new b.Point, this.offset = new b.Point, this.shaderManager = new b.WebGLShaderManager, this.spriteBatch = new b.WebGLSpriteBatch, this.maskManager = new b.WebGLMaskManager, this.filterManager = new b.WebGLFilterManager, this.stencilManager = new b.WebGLStencilManager, this.blendModeManager = new b.WebGLBlendModeManager, this.renderSession = {}, this.renderSession.game = this.game, this.renderSession.gl = this.gl, this.renderSession.drawCount = 0, this.renderSession.shaderManager = this.shaderManager, this.renderSession.maskManager = this.maskManager, this.renderSession.filterManager = this.filterManager, this.renderSession.blendModeManager = this.blendModeManager, this.renderSession.spriteBatch = this.spriteBatch, this.renderSession.stencilManager = this.stencilManager, this.renderSession.renderer = this, this.renderSession.resolution = this.resolution, this.initContext(), this.mapBlendModes() + }, b.WebGLRenderer.prototype.constructor = b.WebGLRenderer, b.WebGLRenderer.prototype.initContext = function() { + var a = this.view.getContext("webgl", this._contextOptions) || this.view.getContext("experimental-webgl", this._contextOptions); + if (this.gl = a, !a) throw new Error("This browser does not support webGL. Try using the canvas renderer"); + this.glContextId = a.id = b.WebGLRenderer.glContextId++, b.glContexts[this.glContextId] = a, b.instances[this.glContextId] = this, a.disable(a.DEPTH_TEST), a.disable(a.CULL_FACE), a.enable(a.BLEND), this.shaderManager.setContext(a), this.spriteBatch.setContext(a), this.maskManager.setContext(a), this.filterManager.setContext(a), this.blendModeManager.setContext(a), this.stencilManager.setContext(a), this.renderSession.gl = this.gl, this.resize(this.width, this.height) + }, b.WebGLRenderer.prototype.render = function(a) { + if (!this.contextLost) { + var b = this.gl; + b.viewport(0, 0, this.width, this.height), b.bindFramebuffer(b.FRAMEBUFFER, null), this.game.clearBeforeRender && (b.clearColor(a._bgColor.r, a._bgColor.g, a._bgColor.b, a._bgColor.a), b.clear(b.COLOR_BUFFER_BIT)), this.offset.x = this.game.camera._shake.x, this.offset.y = this.game.camera._shake.y, this.renderDisplayObject(a, this.projection) + } + }, b.WebGLRenderer.prototype.renderDisplayObject = function(a, c, d, e) { + this.renderSession.blendModeManager.setBlendMode(b.blendModes.NORMAL), this.renderSession.drawCount = 0, this.renderSession.flipY = d ? -1 : 1, this.renderSession.projection = c, this.renderSession.offset = this.offset, this.spriteBatch.begin(this.renderSession), this.filterManager.begin(this.renderSession, d), a._renderWebGL(this.renderSession, e), this.spriteBatch.end() + }, b.WebGLRenderer.prototype.resize = function(a, b) { + this.width = a * this.resolution, this.height = b * this.resolution, this.view.width = this.width, this.view.height = this.height, this.autoResize && (this.view.style.width = this.width / this.resolution + "px", this.view.style.height = this.height / this.resolution + "px"), this.gl.viewport(0, 0, this.width, this.height), this.projection.x = this.width / 2 / this.resolution, this.projection.y = -this.height / 2 / this.resolution + }, b.WebGLRenderer.prototype.updateTexture = function(a) { + if (!a.hasLoaded) return !1; + var c = this.gl; + return a._glTextures[c.id] || (a._glTextures[c.id] = c.createTexture()), c.bindTexture(c.TEXTURE_2D, a._glTextures[c.id]), c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, a.premultipliedAlpha), c.texImage2D(c.TEXTURE_2D, 0, c.RGBA, c.RGBA, c.UNSIGNED_BYTE, a.source), c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MAG_FILTER, a.scaleMode === b.scaleModes.LINEAR ? c.LINEAR : c.NEAREST), a.mipmap && b.isPowerOfTwo(a.width, a.height) ? (c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MIN_FILTER, a.scaleMode === b.scaleModes.LINEAR ? c.LINEAR_MIPMAP_LINEAR : c.NEAREST_MIPMAP_NEAREST), c.generateMipmap(c.TEXTURE_2D)) : c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MIN_FILTER, a.scaleMode === b.scaleModes.LINEAR ? c.LINEAR : c.NEAREST), a._powerOf2 ? (c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_S, c.REPEAT), c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_T, c.REPEAT)) : (c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE)), a._dirty[c.id] = !1, !0 + }, b.WebGLRenderer.prototype.destroy = function() { + b.glContexts[this.glContextId] = null, this.projection = null, this.offset = null, this.shaderManager.destroy(), this.spriteBatch.destroy(), this.maskManager.destroy(), this.filterManager.destroy(), this.shaderManager = null, this.spriteBatch = null, this.maskManager = null, this.filterManager = null, this.gl = null, this.renderSession = null, b.CanvasPool.remove(this), b.instances[this.glContextId] = null, b.WebGLRenderer.glContextId-- + }, b.WebGLRenderer.prototype.mapBlendModes = function() { + var a = this.gl; + if (!b.blendModesWebGL) { + var c = [], + d = b.blendModes; + c[d.NORMAL] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.ADD] = [a.SRC_ALPHA, a.DST_ALPHA], c[d.MULTIPLY] = [a.DST_COLOR, a.ONE_MINUS_SRC_ALPHA], c[d.SCREEN] = [a.SRC_ALPHA, a.ONE], c[d.OVERLAY] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.DARKEN] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.LIGHTEN] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.COLOR_DODGE] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.COLOR_BURN] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.HARD_LIGHT] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.SOFT_LIGHT] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.DIFFERENCE] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.EXCLUSION] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.HUE] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.SATURATION] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.COLOR] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], c[d.LUMINOSITY] = [a.ONE, a.ONE_MINUS_SRC_ALPHA], b.blendModesWebGL = c + } + }, b.WebGLRenderer.glContextId = 0, b.WebGLBlendModeManager = function() { + this.currentBlendMode = 99999 + }, b.WebGLBlendModeManager.prototype.constructor = b.WebGLBlendModeManager, b.WebGLBlendModeManager.prototype.setContext = function(a) { + this.gl = a + }, b.WebGLBlendModeManager.prototype.setBlendMode = function(a) { + if (this.currentBlendMode === a) return !1; + this.currentBlendMode = a; + var c = b.blendModesWebGL[this.currentBlendMode]; + return c && this.gl.blendFunc(c[0], c[1]), !0 + }, b.WebGLBlendModeManager.prototype.destroy = function() { + this.gl = null + }, b.WebGLMaskManager = function() {}, b.WebGLMaskManager.prototype.constructor = b.WebGLMaskManager, b.WebGLMaskManager.prototype.setContext = function(a) { + this.gl = a + }, b.WebGLMaskManager.prototype.pushMask = function(a, c) { + var d = c.gl; + a.dirty && b.WebGLGraphics.updateGraphics(a, d), void 0 !== a._webGL[d.id] && void 0 !== a._webGL[d.id].data && 0 !== a._webGL[d.id].data.length && c.stencilManager.pushStencil(a, a._webGL[d.id].data[0], c) + }, b.WebGLMaskManager.prototype.popMask = function(a, b) { + var c = this.gl; + void 0 !== a._webGL[c.id] && void 0 !== a._webGL[c.id].data && 0 !== a._webGL[c.id].data.length && b.stencilManager.popStencil(a, a._webGL[c.id].data[0], b) + }, b.WebGLMaskManager.prototype.destroy = function() { + this.gl = null + }, b.WebGLStencilManager = function() { + this.stencilStack = [], this.reverse = !0, this.count = 0 + }, b.WebGLStencilManager.prototype.setContext = function(a) { + this.gl = a + }, b.WebGLStencilManager.prototype.pushStencil = function(a, b, c) { + var d = this.gl; + this.bindGraphics(a, b, c), 0 === this.stencilStack.length && (d.enable(d.STENCIL_TEST), d.clear(d.STENCIL_BUFFER_BIT), this.reverse = !0, this.count = 0), this.stencilStack.push(b); + var e = this.count; + d.colorMask(!1, !1, !1, !1), d.stencilFunc(d.ALWAYS, 0, 255), d.stencilOp(d.KEEP, d.KEEP, d.INVERT), 1 === b.mode ? (d.drawElements(d.TRIANGLE_FAN, b.indices.length - 4, d.UNSIGNED_SHORT, 0), this.reverse ? (d.stencilFunc(d.EQUAL, 255 - e, 255), d.stencilOp(d.KEEP, d.KEEP, d.DECR)) : (d.stencilFunc(d.EQUAL, e, 255), d.stencilOp(d.KEEP, d.KEEP, d.INCR)), d.drawElements(d.TRIANGLE_FAN, 4, d.UNSIGNED_SHORT, 2 * (b.indices.length - 4)), this.reverse ? d.stencilFunc(d.EQUAL, 255 - (e + 1), 255) : d.stencilFunc(d.EQUAL, e + 1, 255), this.reverse = !this.reverse) : (this.reverse ? (d.stencilFunc(d.EQUAL, e, 255), d.stencilOp(d.KEEP, d.KEEP, d.INCR)) : (d.stencilFunc(d.EQUAL, 255 - e, 255), d.stencilOp(d.KEEP, d.KEEP, d.DECR)), d.drawElements(d.TRIANGLE_STRIP, b.indices.length, d.UNSIGNED_SHORT, 0), this.reverse ? d.stencilFunc(d.EQUAL, e + 1, 255) : d.stencilFunc(d.EQUAL, 255 - (e + 1), 255)), d.colorMask(!0, !0, !0, !0), d.stencilOp(d.KEEP, d.KEEP, d.KEEP), this.count++ + }, b.WebGLStencilManager.prototype.bindGraphics = function(a, c, d) { + this._currentGraphics = a; + var e, f = this.gl, + g = d.projection, + h = d.offset; + 1 === c.mode ? (e = d.shaderManager.complexPrimitiveShader, d.shaderManager.setShader(e), f.uniform1f(e.flipY, d.flipY), f.uniformMatrix3fv(e.translationMatrix, !1, a.worldTransform.toArray(!0)), f.uniform2f(e.projectionVector, g.x, -g.y), f.uniform2f(e.offsetVector, -h.x, -h.y), f.uniform3fv(e.tintColor, b.hex2rgb(a.tint)), f.uniform3fv(e.color, c.color), f.uniform1f(e.alpha, a.worldAlpha * c.alpha), f.bindBuffer(f.ARRAY_BUFFER, c.buffer), f.vertexAttribPointer(e.aVertexPosition, 2, f.FLOAT, !1, 8, 0), f.bindBuffer(f.ELEMENT_ARRAY_BUFFER, c.indexBuffer)) : (e = d.shaderManager.primitiveShader, + d.shaderManager.setShader(e), f.uniformMatrix3fv(e.translationMatrix, !1, a.worldTransform.toArray(!0)), f.uniform1f(e.flipY, d.flipY), f.uniform2f(e.projectionVector, g.x, -g.y), f.uniform2f(e.offsetVector, -h.x, -h.y), f.uniform3fv(e.tintColor, b.hex2rgb(a.tint)), f.uniform1f(e.alpha, a.worldAlpha), f.bindBuffer(f.ARRAY_BUFFER, c.buffer), f.vertexAttribPointer(e.aVertexPosition, 2, f.FLOAT, !1, 24, 0), f.vertexAttribPointer(e.colorAttribute, 4, f.FLOAT, !1, 24, 8), f.bindBuffer(f.ELEMENT_ARRAY_BUFFER, c.indexBuffer)) + }, b.WebGLStencilManager.prototype.popStencil = function(a, b, c) { + var d = this.gl; + if (this.stencilStack.pop(), this.count--, 0 === this.stencilStack.length) d.disable(d.STENCIL_TEST); + else { + var e = this.count; + this.bindGraphics(a, b, c), d.colorMask(!1, !1, !1, !1), 1 === b.mode ? (this.reverse = !this.reverse, this.reverse ? (d.stencilFunc(d.EQUAL, 255 - (e + 1), 255), d.stencilOp(d.KEEP, d.KEEP, d.INCR)) : (d.stencilFunc(d.EQUAL, e + 1, 255), d.stencilOp(d.KEEP, d.KEEP, d.DECR)), d.drawElements(d.TRIANGLE_FAN, 4, d.UNSIGNED_SHORT, 2 * (b.indices.length - 4)), d.stencilFunc(d.ALWAYS, 0, 255), d.stencilOp(d.KEEP, d.KEEP, d.INVERT), d.drawElements(d.TRIANGLE_FAN, b.indices.length - 4, d.UNSIGNED_SHORT, 0), this.reverse ? d.stencilFunc(d.EQUAL, e, 255) : d.stencilFunc(d.EQUAL, 255 - e, 255)) : (this.reverse ? (d.stencilFunc(d.EQUAL, e + 1, 255), d.stencilOp(d.KEEP, d.KEEP, d.DECR)) : (d.stencilFunc(d.EQUAL, 255 - (e + 1), 255), d.stencilOp(d.KEEP, d.KEEP, d.INCR)), d.drawElements(d.TRIANGLE_STRIP, b.indices.length, d.UNSIGNED_SHORT, 0), this.reverse ? d.stencilFunc(d.EQUAL, e, 255) : d.stencilFunc(d.EQUAL, 255 - e, 255)), d.colorMask(!0, !0, !0, !0), d.stencilOp(d.KEEP, d.KEEP, d.KEEP) + } + }, b.WebGLStencilManager.prototype.destroy = function() { + this.stencilStack = null, this.gl = null + }, b.WebGLShaderManager = function() { + this.maxAttibs = 10, this.attribState = [], this.tempAttribState = []; + for (var a = 0; a < this.maxAttibs; a++) this.attribState[a] = !1; + this.stack = [] + }, b.WebGLShaderManager.prototype.constructor = b.WebGLShaderManager, b.WebGLShaderManager.prototype.setContext = function(a) { + this.gl = a, this.primitiveShader = new b.PrimitiveShader(a), this.complexPrimitiveShader = new b.ComplexPrimitiveShader(a), this.defaultShader = new b.PixiShader(a), this.fastShader = new b.PixiFastShader(a), this.stripShader = new b.StripShader(a), this.setShader(this.defaultShader) + }, b.WebGLShaderManager.prototype.setAttribs = function(a) { + var b; + for (b = 0; b < this.tempAttribState.length; b++) this.tempAttribState[b] = !1; + for (b = 0; b < a.length; b++) { + var c = a[b]; + this.tempAttribState[c] = !0 + } + var d = this.gl; + for (b = 0; b < this.attribState.length; b++) this.attribState[b] !== this.tempAttribState[b] && (this.attribState[b] = this.tempAttribState[b], this.tempAttribState[b] ? d.enableVertexAttribArray(b) : d.disableVertexAttribArray(b)) + }, b.WebGLShaderManager.prototype.setShader = function(a) { + return this._currentId !== a._UID && (this._currentId = a._UID, this.currentShader = a, this.gl.useProgram(a.program), this.setAttribs(a.attributes), !0) + }, b.WebGLShaderManager.prototype.destroy = function() { + this.attribState = null, this.tempAttribState = null, this.primitiveShader.destroy(), this.complexPrimitiveShader.destroy(), this.defaultShader.destroy(), this.fastShader.destroy(), this.stripShader.destroy(), this.gl = null + }, b.WebGLSpriteBatch = function() { + this.vertSize = 5, this.size = 2e3; + var a = 4 * this.size * 4 * this.vertSize, + c = 6 * this.size; + this.vertices = new b.ArrayBuffer(a), this.positions = new b.Float32Array(this.vertices), this.colors = new b.Uint32Array(this.vertices), this.indices = new b.Uint16Array(c), this.lastIndexCount = 0; + for (var d = 0, e = 0; d < c; d += 6, e += 4) this.indices[d + 0] = e + 0, this.indices[d + 1] = e + 1, this.indices[d + 2] = e + 2, this.indices[d + 3] = e + 0, this.indices[d + 4] = e + 2, this.indices[d + 5] = e + 3; + this.drawing = !1, this.currentBatchSize = 0, this.currentBaseTexture = null, this.dirty = !0, this.textures = [], this.blendModes = [], this.shaders = [], this.sprites = [], this.defaultShader = new b.AbstractFilter(["precision lowp float;", "varying vec2 vTextureCoord;", "varying vec4 vColor;", "uniform sampler2D uSampler;", "void main(void) {", " gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;", "}"]) + }, b.WebGLSpriteBatch.prototype.setContext = function(a) { + this.gl = a, this.vertexBuffer = a.createBuffer(), this.indexBuffer = a.createBuffer(), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer), a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.indices, a.STATIC_DRAW), a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), a.bufferData(a.ARRAY_BUFFER, this.vertices, a.DYNAMIC_DRAW), this.currentBlendMode = 99999; + var c = new b.PixiShader(a); + c.fragmentSrc = this.defaultShader.fragmentSrc, c.uniforms = {}, c.init(), this.defaultShader.shaders[a.id] = c + }, b.WebGLSpriteBatch.prototype.begin = function(a) { + this.renderSession = a, this.shader = this.renderSession.shaderManager.defaultShader, this.start() + }, b.WebGLSpriteBatch.prototype.end = function() { + this.flush() + }, b.WebGLSpriteBatch.prototype.render = function(a, b) { + var c = a.texture, + d = a.worldTransform; + b && (d = b), this.currentBatchSize >= this.size && (this.flush(), this.currentBaseTexture = c.baseTexture); + var e = c._uvs; + if (e) { + var f, g, h, i, j = a.anchor.x, + k = a.anchor.y; + if (c.trim) { + var l = c.trim; + g = l.x - j * l.width, f = g + c.crop.width, i = l.y - k * l.height, h = i + c.crop.height + } else f = c.frame.width * (1 - j), g = c.frame.width * -j, h = c.frame.height * (1 - k), i = c.frame.height * -k; + var m = 4 * this.currentBatchSize * this.vertSize, + n = c.baseTexture.resolution, + o = d.a / n, + p = d.b / n, + q = d.c / n, + r = d.d / n, + s = d.tx, + t = d.ty, + u = this.colors, + v = this.positions; + this.renderSession.roundPixels ? (v[m] = o * g + q * i + s | 0, v[m + 1] = r * i + p * g + t | 0, v[m + 5] = o * f + q * i + s | 0, v[m + 6] = r * i + p * f + t | 0, v[m + 10] = o * f + q * h + s | 0, v[m + 11] = r * h + p * f + t | 0, v[m + 15] = o * g + q * h + s | 0, v[m + 16] = r * h + p * g + t | 0) : (v[m] = o * g + q * i + s, v[m + 1] = r * i + p * g + t, v[m + 5] = o * f + q * i + s, v[m + 6] = r * i + p * f + t, v[m + 10] = o * f + q * h + s, v[m + 11] = r * h + p * f + t, v[m + 15] = o * g + q * h + s, v[m + 16] = r * h + p * g + t), v[m + 2] = e.x0, v[m + 3] = e.y0, v[m + 7] = e.x1, v[m + 8] = e.y1, v[m + 12] = e.x2, v[m + 13] = e.y2, v[m + 17] = e.x3, v[m + 18] = e.y3; + var w = a.tint; + u[m + 4] = u[m + 9] = u[m + 14] = u[m + 19] = (w >> 16) + (65280 & w) + ((255 & w) << 16) + (255 * a.worldAlpha << 24), this.sprites[this.currentBatchSize++] = a + } + }, b.WebGLSpriteBatch.prototype.renderTilingSprite = function(a) { + var c = a.tilingTexture; + this.currentBatchSize >= this.size && (this.flush(), this.currentBaseTexture = c.baseTexture), a._uvs || (a._uvs = new b.TextureUvs); + var d = a._uvs, + e = c.baseTexture.width, + f = c.baseTexture.height; + a.tilePosition.x %= e * a.tileScaleOffset.x, a.tilePosition.y %= f * a.tileScaleOffset.y; + var g = a.tilePosition.x / (e * a.tileScaleOffset.x), + h = a.tilePosition.y / (f * a.tileScaleOffset.y), + i = a.width / e / (a.tileScale.x * a.tileScaleOffset.x), + j = a.height / f / (a.tileScale.y * a.tileScaleOffset.y); + d.x0 = 0 - g, d.y0 = 0 - h, d.x1 = 1 * i - g, d.y1 = 0 - h, d.x2 = 1 * i - g, d.y2 = 1 * j - h, d.x3 = 0 - g, d.y3 = 1 * j - h; + var k = a.tint, + l = (k >> 16) + (65280 & k) + ((255 & k) << 16) + (255 * a.worldAlpha << 24), + m = this.positions, + n = this.colors, + o = a.width, + p = a.height, + q = a.anchor.x, + r = a.anchor.y, + s = o * (1 - q), + t = o * -q, + u = p * (1 - r), + v = p * -r, + w = 4 * this.currentBatchSize * this.vertSize, + x = c.baseTexture.resolution, + y = a.worldTransform, + z = y.a / x, + A = y.b / x, + B = y.c / x, + C = y.d / x, + D = y.tx, + E = y.ty; + m[w++] = z * t + B * v + D, m[w++] = C * v + A * t + E, m[w++] = d.x0, m[w++] = d.y0, n[w++] = l, m[w++] = z * s + B * v + D, m[w++] = C * v + A * s + E, m[w++] = d.x1, m[w++] = d.y1, n[w++] = l, m[w++] = z * s + B * u + D, m[w++] = C * u + A * s + E, m[w++] = d.x2, m[w++] = d.y2, n[w++] = l, m[w++] = z * t + B * u + D, m[w++] = C * u + A * t + E, m[w++] = d.x3, m[w++] = d.y3, n[w++] = l, this.sprites[this.currentBatchSize++] = a + }, b.WebGLSpriteBatch.prototype.flush = function() { + if (0 !== this.currentBatchSize) { + var a, c = this.gl; + if (this.dirty) { + this.dirty = !1, c.activeTexture(c.TEXTURE0), c.bindBuffer(c.ARRAY_BUFFER, this.vertexBuffer), c.bindBuffer(c.ELEMENT_ARRAY_BUFFER, this.indexBuffer), a = this.defaultShader.shaders[c.id]; + var d = 4 * this.vertSize; + c.vertexAttribPointer(a.aVertexPosition, 2, c.FLOAT, !1, d, 0), c.vertexAttribPointer(a.aTextureCoord, 2, c.FLOAT, !1, d, 8), c.vertexAttribPointer(a.colorAttribute, 4, c.UNSIGNED_BYTE, !0, d, 16) + } + if (this.currentBatchSize > .5 * this.size) c.bufferSubData(c.ARRAY_BUFFER, 0, this.vertices); + else { + var e = this.positions.subarray(0, 4 * this.currentBatchSize * this.vertSize); + c.bufferSubData(c.ARRAY_BUFFER, 0, e) + } + for (var f, g, h, i, j = 0, k = 0, l = null, m = this.renderSession.blendModeManager.currentBlendMode, n = null, o = !1, p = !1, q = 0, r = this.currentBatchSize; q < r; q++) { + i = this.sprites[q], f = i.tilingTexture ? i.tilingTexture.baseTexture : i.texture.baseTexture, g = i.blendMode, h = i.shader || this.defaultShader, o = m !== g, p = n !== h; + var s = f.skipRender; + if (s && i.children.length > 0 && (s = !1), (l !== f && !s || o || p) && (this.renderBatch(l, j, k), k = q, j = 0, l = f, o && (m = g, this.renderSession.blendModeManager.setBlendMode(m)), p)) { + n = h, a = n.shaders[c.id], a || (a = new b.PixiShader(c), a.fragmentSrc = n.fragmentSrc, a.uniforms = n.uniforms, a.init(), n.shaders[c.id] = a), this.renderSession.shaderManager.setShader(a), a.dirty && a.syncUniforms(); + var t = this.renderSession.projection; + c.uniform2f(a.projectionVector, t.x, t.y); + var u = this.renderSession.offset; + c.uniform2f(a.offsetVector, u.x, u.y) + } + j++ + } + this.renderBatch(l, j, k), this.currentBatchSize = 0 + } + }, b.WebGLSpriteBatch.prototype.renderBatch = function(a, b, c) { + if (0 !== b) { + var d = this.gl; + if (a._dirty[d.id]) { + if (!this.renderSession.renderer.updateTexture(a)) return + } else d.bindTexture(d.TEXTURE_2D, a._glTextures[d.id]); + d.drawElements(d.TRIANGLES, 6 * b, d.UNSIGNED_SHORT, 6 * c * 2), this.renderSession.drawCount++ + } + }, b.WebGLSpriteBatch.prototype.stop = function() { + this.flush(), this.dirty = !0 + }, b.WebGLSpriteBatch.prototype.start = function() { + this.dirty = !0 + }, b.WebGLSpriteBatch.prototype.destroy = function() { + this.vertices = null, this.indices = null, this.gl.deleteBuffer(this.vertexBuffer), this.gl.deleteBuffer(this.indexBuffer), this.currentBaseTexture = null, this.gl = null + }, b.WebGLFastSpriteBatch = function(a) { + this.vertSize = 10, this.maxSize = 6e3, this.size = this.maxSize; + var c = 4 * this.size * this.vertSize, + d = 6 * this.maxSize; + this.vertices = new b.Float32Array(c), this.indices = new b.Uint16Array(d), this.vertexBuffer = null, this.indexBuffer = null, this.lastIndexCount = 0; + for (var e = 0, f = 0; e < d; e += 6, f += 4) this.indices[e + 0] = f + 0, this.indices[e + 1] = f + 1, this.indices[e + 2] = f + 2, this.indices[e + 3] = f + 0, this.indices[e + 4] = f + 2, this.indices[e + 5] = f + 3; + this.drawing = !1, this.currentBatchSize = 0, this.currentBaseTexture = null, this.currentBlendMode = 0, this.renderSession = null, this.shader = null, this.matrix = null, this.setContext(a) + }, b.WebGLFastSpriteBatch.prototype.constructor = b.WebGLFastSpriteBatch, b.WebGLFastSpriteBatch.prototype.setContext = function(a) { + this.gl = a, this.vertexBuffer = a.createBuffer(), this.indexBuffer = a.createBuffer(), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer), a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.indices, a.STATIC_DRAW), a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), a.bufferData(a.ARRAY_BUFFER, this.vertices, a.DYNAMIC_DRAW) + }, b.WebGLFastSpriteBatch.prototype.begin = function(a, b) { + this.renderSession = b, this.shader = this.renderSession.shaderManager.fastShader, this.matrix = a.worldTransform.toArray(!0), this.start() + }, b.WebGLFastSpriteBatch.prototype.end = function() { + this.flush() + }, b.WebGLFastSpriteBatch.prototype.render = function(a) { + var b = a.children, + c = b[0]; + if (c.texture._uvs) { + this.currentBaseTexture = c.texture.baseTexture, c.blendMode !== this.renderSession.blendModeManager.currentBlendMode && (this.flush(), this.renderSession.blendModeManager.setBlendMode(c.blendMode)); + for (var d = 0, e = b.length; d < e; d++) this.renderSprite(b[d]); + this.flush() + } + }, b.WebGLFastSpriteBatch.prototype.renderSprite = function(a) { + if (a.visible && (a.texture.baseTexture === this.currentBaseTexture || a.texture.baseTexture.skipRender || (this.flush(), this.currentBaseTexture = a.texture.baseTexture, a.texture._uvs))) { + var b, c, d, e, f, g, h, i, j = this.vertices; + if (b = a.texture._uvs, c = a.texture.frame.width, d = a.texture.frame.height, a.texture.trim) { + var k = a.texture.trim; + f = k.x - a.anchor.x * k.width, e = f + a.texture.crop.width, h = k.y - a.anchor.y * k.height, g = h + a.texture.crop.height + } else e = a.texture.frame.width * (1 - a.anchor.x), f = a.texture.frame.width * -a.anchor.x, g = a.texture.frame.height * (1 - a.anchor.y), h = a.texture.frame.height * -a.anchor.y; + i = 4 * this.currentBatchSize * this.vertSize, j[i++] = f, j[i++] = h, j[i++] = a.position.x, j[i++] = a.position.y, j[i++] = a.scale.x, j[i++] = a.scale.y, j[i++] = a.rotation, j[i++] = b.x0, j[i++] = b.y1, j[i++] = a.alpha, j[i++] = e, j[i++] = h, j[i++] = a.position.x, j[i++] = a.position.y, j[i++] = a.scale.x, j[i++] = a.scale.y, j[i++] = a.rotation, j[i++] = b.x1, j[i++] = b.y1, j[i++] = a.alpha, j[i++] = e, j[i++] = g, j[i++] = a.position.x, j[i++] = a.position.y, j[i++] = a.scale.x, j[i++] = a.scale.y, j[i++] = a.rotation, j[i++] = b.x2, j[i++] = b.y2, j[i++] = a.alpha, j[i++] = f, j[i++] = g, j[i++] = a.position.x, j[i++] = a.position.y, j[i++] = a.scale.x, j[i++] = a.scale.y, j[i++] = a.rotation, j[i++] = b.x3, j[i++] = b.y3, j[i++] = a.alpha, this.currentBatchSize++, this.currentBatchSize >= this.size && this.flush() + } + }, b.WebGLFastSpriteBatch.prototype.flush = function() { + if (0 !== this.currentBatchSize) { + var a = this.gl; + if (this.currentBaseTexture._glTextures[a.id] || this.renderSession.renderer.updateTexture(this.currentBaseTexture, a), a.bindTexture(a.TEXTURE_2D, this.currentBaseTexture._glTextures[a.id]), this.currentBatchSize > .5 * this.size) a.bufferSubData(a.ARRAY_BUFFER, 0, this.vertices); + else { + var b = this.vertices.subarray(0, 4 * this.currentBatchSize * this.vertSize); + a.bufferSubData(a.ARRAY_BUFFER, 0, b) + } + a.drawElements(a.TRIANGLES, 6 * this.currentBatchSize, a.UNSIGNED_SHORT, 0), this.currentBatchSize = 0, this.renderSession.drawCount++ + } + }, b.WebGLFastSpriteBatch.prototype.stop = function() { + this.flush() + }, b.WebGLFastSpriteBatch.prototype.start = function() { + var a = this.gl; + a.activeTexture(a.TEXTURE0), a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer); + var b = this.renderSession.projection; + a.uniform2f(this.shader.projectionVector, b.x, b.y), a.uniformMatrix3fv(this.shader.uMatrix, !1, this.matrix); + var c = 4 * this.vertSize; + a.vertexAttribPointer(this.shader.aVertexPosition, 2, a.FLOAT, !1, c, 0), a.vertexAttribPointer(this.shader.aPositionCoord, 2, a.FLOAT, !1, c, 8), a.vertexAttribPointer(this.shader.aScale, 2, a.FLOAT, !1, c, 16), a.vertexAttribPointer(this.shader.aRotation, 1, a.FLOAT, !1, c, 24), a.vertexAttribPointer(this.shader.aTextureCoord, 2, a.FLOAT, !1, c, 28), a.vertexAttribPointer(this.shader.colorAttribute, 1, a.FLOAT, !1, c, 36) + }, b.WebGLFilterManager = function() { + this.filterStack = [], this.offsetX = 0, this.offsetY = 0 + }, b.WebGLFilterManager.prototype.constructor = b.WebGLFilterManager, b.WebGLFilterManager.prototype.setContext = function(a) { + this.gl = a, this.texturePool = [], this.initShaderBuffers() + }, b.WebGLFilterManager.prototype.begin = function(a, b) { + this.renderSession = a, this.defaultShader = a.shaderManager.defaultShader; + var c = this.renderSession.projection; + this.width = 2 * c.x, this.height = 2 * -c.y, this.buffer = b + }, b.WebGLFilterManager.prototype.pushFilter = function(a) { + var c = this.gl, + d = this.renderSession.projection, + e = this.renderSession.offset; + a._filterArea = a.target.filterArea || a.target.getBounds(), a._previous_stencil_mgr = this.renderSession.stencilManager, this.renderSession.stencilManager = new b.WebGLStencilManager, this.renderSession.stencilManager.setContext(c), c.disable(c.STENCIL_TEST), this.filterStack.push(a); + var f = a.filterPasses[0]; + this.offsetX += a._filterArea.x, this.offsetY += a._filterArea.y; + var g = this.texturePool.pop(); + g ? g.resize(this.width * this.renderSession.resolution, this.height * this.renderSession.resolution) : g = new b.FilterTexture(this.gl, this.width * this.renderSession.resolution, this.height * this.renderSession.resolution), c.bindTexture(c.TEXTURE_2D, g.texture); + var h = a._filterArea, + i = f.padding; + h.x -= i, h.y -= i, h.width += 2 * i, h.height += 2 * i, h.x < 0 && (h.x = 0), h.width > this.width && (h.width = this.width), h.y < 0 && (h.y = 0), h.height > this.height && (h.height = this.height), c.bindFramebuffer(c.FRAMEBUFFER, g.frameBuffer), c.viewport(0, 0, h.width * this.renderSession.resolution, h.height * this.renderSession.resolution), d.x = h.width / 2, d.y = -h.height / 2, e.x = -h.x, e.y = -h.y, c.colorMask(!0, !0, !0, !0), c.clearColor(0, 0, 0, 0), c.clear(c.COLOR_BUFFER_BIT), a._glFilterTexture = g + }, b.WebGLFilterManager.prototype.popFilter = function() { + var a = this.gl, + c = this.filterStack.pop(), + d = c._filterArea, + e = c._glFilterTexture, + f = this.renderSession.projection, + g = this.renderSession.offset; + if (c.filterPasses.length > 1) { + a.viewport(0, 0, d.width * this.renderSession.resolution, d.height * this.renderSession.resolution), a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), this.vertexArray[0] = 0, this.vertexArray[1] = d.height, this.vertexArray[2] = d.width, this.vertexArray[3] = d.height, this.vertexArray[4] = 0, this.vertexArray[5] = 0, this.vertexArray[6] = d.width, this.vertexArray[7] = 0, a.bufferSubData(a.ARRAY_BUFFER, 0, this.vertexArray), a.bindBuffer(a.ARRAY_BUFFER, this.uvBuffer), this.uvArray[2] = d.width / this.width, this.uvArray[5] = d.height / this.height, this.uvArray[6] = d.width / this.width, this.uvArray[7] = d.height / this.height, a.bufferSubData(a.ARRAY_BUFFER, 0, this.uvArray); + var h = e, + i = this.texturePool.pop(); + i || (i = new b.FilterTexture(this.gl, this.width * this.renderSession.resolution, this.height * this.renderSession.resolution)), i.resize(this.width * this.renderSession.resolution, this.height * this.renderSession.resolution), a.bindFramebuffer(a.FRAMEBUFFER, i.frameBuffer), a.clear(a.COLOR_BUFFER_BIT), a.disable(a.BLEND); + for (var j = 0; j < c.filterPasses.length - 1; j++) { + var k = c.filterPasses[j]; + a.bindFramebuffer(a.FRAMEBUFFER, i.frameBuffer), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, h.texture), this.applyFilterPass(k, d, d.width, d.height); + var l = h; + h = i, i = l + } + a.enable(a.BLEND), e = h, this.texturePool.push(i) + } + var m = c.filterPasses[c.filterPasses.length - 1]; + this.offsetX -= d.x, this.offsetY -= d.y; + var n = this.width, + o = this.height, + p = 0, + q = 0, + r = this.buffer; + if (0 === this.filterStack.length) a.colorMask(!0, !0, !0, !0); + else { + var s = this.filterStack[this.filterStack.length - 1]; + d = s._filterArea, n = d.width, o = d.height, p = d.x, q = d.y, r = s._glFilterTexture.frameBuffer + } + f.x = n / 2, f.y = -o / 2, g.x = p, g.y = q, d = c._filterArea; + var t = d.x - p, + u = d.y - q; + a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), this.vertexArray[0] = t, this.vertexArray[1] = u + d.height, this.vertexArray[2] = t + d.width, this.vertexArray[3] = u + d.height, this.vertexArray[4] = t, this.vertexArray[5] = u, this.vertexArray[6] = t + d.width, this.vertexArray[7] = u, a.bufferSubData(a.ARRAY_BUFFER, 0, this.vertexArray), a.bindBuffer(a.ARRAY_BUFFER, this.uvBuffer), this.uvArray[2] = d.width / this.width, this.uvArray[5] = d.height / this.height, this.uvArray[6] = d.width / this.width, this.uvArray[7] = d.height / this.height, a.bufferSubData(a.ARRAY_BUFFER, 0, this.uvArray), a.viewport(0, 0, n * this.renderSession.resolution, o * this.renderSession.resolution), a.bindFramebuffer(a.FRAMEBUFFER, r), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, e.texture), this.renderSession.stencilManager && this.renderSession.stencilManager.destroy(), this.renderSession.stencilManager = c._previous_stencil_mgr, c._previous_stencil_mgr = null, this.renderSession.stencilManager.count > 0 ? a.enable(a.STENCIL_TEST) : a.disable(a.STENCIL_TEST), this.applyFilterPass(m, d, n, o), this.texturePool.push(e), c._glFilterTexture = null + }, b.WebGLFilterManager.prototype.applyFilterPass = function(a, c, d, e) { + var f = this.gl, + g = a.shaders[f.id]; + g || (g = new b.PixiShader(f), g.fragmentSrc = a.fragmentSrc, g.uniforms = a.uniforms, g.init(), a.shaders[f.id] = g), this.renderSession.shaderManager.setShader(g), f.uniform2f(g.projectionVector, d / 2, -e / 2), f.uniform2f(g.offsetVector, 0, 0), a.uniforms.dimensions && (a.uniforms.dimensions.value[0] = this.width, a.uniforms.dimensions.value[1] = this.height, a.uniforms.dimensions.value[2] = this.vertexArray[0], a.uniforms.dimensions.value[3] = this.vertexArray[5]), g.syncUniforms(), f.bindBuffer(f.ARRAY_BUFFER, this.vertexBuffer), f.vertexAttribPointer(g.aVertexPosition, 2, f.FLOAT, !1, 0, 0), f.bindBuffer(f.ARRAY_BUFFER, this.uvBuffer), f.vertexAttribPointer(g.aTextureCoord, 2, f.FLOAT, !1, 0, 0), f.bindBuffer(f.ARRAY_BUFFER, this.colorBuffer), f.vertexAttribPointer(g.colorAttribute, 2, f.FLOAT, !1, 0, 0), f.bindBuffer(f.ELEMENT_ARRAY_BUFFER, this.indexBuffer), f.drawElements(f.TRIANGLES, 6, f.UNSIGNED_SHORT, 0), this.renderSession.drawCount++ + }, b.WebGLFilterManager.prototype.initShaderBuffers = function() { + var a = this.gl; + this.vertexBuffer = a.createBuffer(), this.uvBuffer = a.createBuffer(), this.colorBuffer = a.createBuffer(), this.indexBuffer = a.createBuffer(), this.vertexArray = new b.Float32Array([0, 0, 1, 0, 0, 1, 1, 1]), a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), a.bufferData(a.ARRAY_BUFFER, this.vertexArray, a.STATIC_DRAW), this.uvArray = new b.Float32Array([0, 0, 1, 0, 0, 1, 1, 1]), a.bindBuffer(a.ARRAY_BUFFER, this.uvBuffer), a.bufferData(a.ARRAY_BUFFER, this.uvArray, a.STATIC_DRAW), this.colorArray = new b.Float32Array([1, 16777215, 1, 16777215, 1, 16777215, 1, 16777215]), a.bindBuffer(a.ARRAY_BUFFER, this.colorBuffer), a.bufferData(a.ARRAY_BUFFER, this.colorArray, a.STATIC_DRAW), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer), a.bufferData(a.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 1, 3, 2]), a.STATIC_DRAW) + }, b.WebGLFilterManager.prototype.destroy = function() { + var a = this.gl; + this.filterStack = null, this.offsetX = 0, this.offsetY = 0; + for (var b = 0; b < this.texturePool.length; b++) this.texturePool[b].destroy(); + this.texturePool = null, a.deleteBuffer(this.vertexBuffer), a.deleteBuffer(this.uvBuffer), a.deleteBuffer(this.colorBuffer), a.deleteBuffer(this.indexBuffer) + }, b.FilterTexture = function(a, c, d, e) { + this.gl = a, this.frameBuffer = a.createFramebuffer(), this.texture = a.createTexture(), e = e || b.scaleModes.DEFAULT, a.bindTexture(a.TEXTURE_2D, this.texture), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, e === b.scaleModes.LINEAR ? a.LINEAR : a.NEAREST), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, e === b.scaleModes.LINEAR ? a.LINEAR : a.NEAREST), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.bindFramebuffer(a.FRAMEBUFFER, this.frameBuffer), a.bindFramebuffer(a.FRAMEBUFFER, this.frameBuffer), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, this.texture, 0), this.renderBuffer = a.createRenderbuffer(), a.bindRenderbuffer(a.RENDERBUFFER, this.renderBuffer), a.framebufferRenderbuffer(a.FRAMEBUFFER, a.DEPTH_STENCIL_ATTACHMENT, a.RENDERBUFFER, this.renderBuffer), this.resize(c, d) + }, b.FilterTexture.prototype.constructor = b.FilterTexture, b.FilterTexture.prototype.clear = function() { + var a = this.gl; + a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT) + }, b.FilterTexture.prototype.resize = function(a, b) { + if (this.width !== a || this.height !== b) { + this.width = a, this.height = b; + var c = this.gl; + c.bindTexture(c.TEXTURE_2D, this.texture), c.texImage2D(c.TEXTURE_2D, 0, c.RGBA, a, b, 0, c.RGBA, c.UNSIGNED_BYTE, null), c.bindRenderbuffer(c.RENDERBUFFER, this.renderBuffer), c.renderbufferStorage(c.RENDERBUFFER, c.DEPTH_STENCIL, a, b) + } + }, b.FilterTexture.prototype.destroy = function() { + var a = this.gl; + a.deleteFramebuffer(this.frameBuffer), a.deleteTexture(this.texture), this.frameBuffer = null, this.texture = null + }, b.CanvasBuffer = function(a, c) { + this.width = a, this.height = c, this.canvas = b.CanvasPool.create(this, this.width, this.height), this.context = this.canvas.getContext("2d"), this.canvas.width = a, this.canvas.height = c + }, b.CanvasBuffer.prototype.constructor = b.CanvasBuffer, b.CanvasBuffer.prototype.clear = function() { + this.context.setTransform(1, 0, 0, 1, 0, 0), this.context.clearRect(0, 0, this.width, this.height) + }, b.CanvasBuffer.prototype.resize = function(a, b) { + this.width = this.canvas.width = a, this.height = this.canvas.height = b + }, b.CanvasBuffer.prototype.destroy = function() { + b.CanvasPool.remove(this) + }, b.CanvasMaskManager = function() {}, b.CanvasMaskManager.prototype.constructor = b.CanvasMaskManager, b.CanvasMaskManager.prototype.pushMask = function(a, c) { + var d = c.context; + d.save(); + var e = a.alpha, + f = a.worldTransform, + g = c.resolution; + d.setTransform(f.a * g, f.b * g, f.c * g, f.d * g, f.tx * g, f.ty * g), b.CanvasGraphics.renderGraphicsMask(a, d), d.clip(), a.worldAlpha = e + }, b.CanvasMaskManager.prototype.popMask = function(a) { + a.context.restore() + }, b.CanvasTinter = function() {}, b.CanvasTinter.getTintedTexture = function(a, c) { + var d = a.tintedTexture || b.CanvasPool.create(this); + return b.CanvasTinter.tintMethod(a.texture, c, d), d + }, b.CanvasTinter.tintWithMultiply = function(a, b, c) { + var d = c.getContext("2d"), + e = a.crop; + c.width === e.width && c.height === e.height || (c.width = e.width, c.height = e.height), d.clearRect(0, 0, e.width, e.height), d.fillStyle = "#" + ("00000" + (0 | b).toString(16)).substr(-6), d.fillRect(0, 0, e.width, e.height), d.globalCompositeOperation = "multiply", d.drawImage(a.baseTexture.source, e.x, e.y, e.width, e.height, 0, 0, e.width, e.height), d.globalCompositeOperation = "destination-atop", d.drawImage(a.baseTexture.source, e.x, e.y, e.width, e.height, 0, 0, e.width, e.height) + }, b.CanvasTinter.tintWithPerPixel = function(a, c, d) { + var e = d.getContext("2d"), + f = a.crop; + d.width = f.width, d.height = f.height, e.globalCompositeOperation = "copy", e.drawImage(a.baseTexture.source, f.x, f.y, f.width, f.height, 0, 0, f.width, f.height); + for (var g = b.hex2rgb(c), h = g[0], i = g[1], j = g[2], k = e.getImageData(0, 0, f.width, f.height), l = k.data, m = 0; m < l.length; m += 4) + if (l[m + 0] *= h, l[m + 1] *= i, l[m + 2] *= j, !b.CanvasTinter.canHandleAlpha) { + var n = l[m + 3]; + l[m + 0] /= 255 / n, l[m + 1] /= 255 / n, l[m + 2] /= 255 / n + } e.putImageData(k, 0, 0) + }, b.CanvasTinter.checkInverseAlpha = function() { + var a = new b.CanvasBuffer(2, 1); + a.context.fillStyle = "rgba(10, 20, 30, 0.5)", a.context.fillRect(0, 0, 1, 1); + var c = a.context.getImageData(0, 0, 1, 1); + if (null === c) return !1; + a.context.putImageData(c, 1, 0); + var d = a.context.getImageData(1, 0, 1, 1); + return d.data[0] === c.data[0] && d.data[1] === c.data[1] && d.data[2] === c.data[2] && d.data[3] === c.data[3] + }, b.CanvasTinter.canHandleAlpha = b.CanvasTinter.checkInverseAlpha(), b.CanvasTinter.canUseMultiply = b.canUseNewCanvasBlendModes(), b.CanvasTinter.tintMethod = b.CanvasTinter.canUseMultiply ? b.CanvasTinter.tintWithMultiply : b.CanvasTinter.tintWithPerPixel, b.CanvasRenderer = function(a) { + this.game = a, b.defaultRenderer || (b.defaultRenderer = this), this.type = b.CANVAS_RENDERER, this.resolution = a.resolution, this.clearBeforeRender = a.clearBeforeRender, this.transparent = a.transparent, this.autoResize = !1, this.width = a.width * this.resolution, this.height = a.height * this.resolution, this.view = a.canvas, this.context = this.view.getContext("2d", { + alpha: this.transparent + }), this.refresh = !0, this.count = 0, this.maskManager = new b.CanvasMaskManager, this.renderSession = { + context: this.context, + maskManager: this.maskManager, + scaleMode: null, + smoothProperty: Phaser.Canvas.getSmoothingPrefix(this.context), + roundPixels: !1 + }, this.mapBlendModes(), this.resize(this.width, this.height) + }, b.CanvasRenderer.prototype.constructor = b.CanvasRenderer, b.CanvasRenderer.prototype.render = function(a) { + this.context.setTransform(1, 0, 0, 1, 0, 0), this.context.globalAlpha = 1, this.renderSession.currentBlendMode = 0, this.renderSession.shakeX = this.game.camera._shake.x, this.renderSession.shakeY = this.game.camera._shake.y, this.context.globalCompositeOperation = "source-over", navigator.isCocoonJS && this.view.screencanvas && (this.context.fillStyle = "black", this.context.clear()), this.clearBeforeRender && (this.transparent ? this.context.clearRect(0, 0, this.width, this.height) : a._bgColor && (this.context.fillStyle = a._bgColor.rgba, this.context.fillRect(0, 0, this.width, this.height))), this.renderDisplayObject(a) + }, b.CanvasRenderer.prototype.destroy = function(a) { + void 0 === a && (a = !0), a && this.view.parent && this.view.parent.removeChild(this.view), this.view = null, this.context = null, this.maskManager = null, this.renderSession = null + }, b.CanvasRenderer.prototype.resize = function(a, c) { + this.width = a * this.resolution, this.height = c * this.resolution, this.view.width = this.width, this.view.height = this.height, this.autoResize && (this.view.style.width = this.width / this.resolution + "px", this.view.style.height = this.height / this.resolution + "px"), this.renderSession.smoothProperty && (this.context[this.renderSession.smoothProperty] = this.renderSession.scaleMode === b.scaleModes.LINEAR) + }, b.CanvasRenderer.prototype.renderDisplayObject = function(a, b, c) { + this.renderSession.context = b || this.context, this.renderSession.resolution = this.resolution, a._renderCanvas(this.renderSession, c) + }, b.CanvasRenderer.prototype.mapBlendModes = function() { + if (!b.blendModesCanvas) { + var a = [], + c = b.blendModes, + d = b.canUseNewCanvasBlendModes(); + a[c.NORMAL] = "source-over", a[c.ADD] = "lighter", a[c.MULTIPLY] = d ? "multiply" : "source-over", a[c.SCREEN] = d ? "screen" : "source-over", a[c.OVERLAY] = d ? "overlay" : "source-over", a[c.DARKEN] = d ? "darken" : "source-over", a[c.LIGHTEN] = d ? "lighten" : "source-over", a[c.COLOR_DODGE] = d ? "color-dodge" : "source-over", a[c.COLOR_BURN] = d ? "color-burn" : "source-over", a[c.HARD_LIGHT] = d ? "hard-light" : "source-over", a[c.SOFT_LIGHT] = d ? "soft-light" : "source-over", a[c.DIFFERENCE] = d ? "difference" : "source-over", a[c.EXCLUSION] = d ? "exclusion" : "source-over", a[c.HUE] = d ? "hue" : "source-over", a[c.SATURATION] = d ? "saturation" : "source-over", a[c.COLOR] = d ? "color" : "source-over", a[c.LUMINOSITY] = d ? "luminosity" : "source-over", b.blendModesCanvas = a + } + }, b.BaseTexture = function(a, c) { + this.resolution = 1, this.width = 100, this.height = 100, this.scaleMode = c || b.scaleModes.DEFAULT, this.hasLoaded = !1, this.source = a, this.premultipliedAlpha = !0, this._glTextures = [], this.mipmap = !1, this._dirty = [!0, !0, !0, !0], a && ((this.source.complete || this.source.getContext) && this.source.width && this.source.height && (this.hasLoaded = !0, this.width = this.source.naturalWidth || this.source.width, this.height = this.source.naturalHeight || this.source.height, this.dirty()), this.skipRender = !1, this._powerOf2 = !1) + }, b.BaseTexture.prototype.constructor = b.BaseTexture, b.BaseTexture.prototype.forceLoaded = function(a, b) { + this.hasLoaded = !0, this.width = a, this.height = b, this.dirty() + }, b.BaseTexture.prototype.destroy = function() { + this.source && b.CanvasPool.removeByCanvas(this.source), this.source = null, this.unloadFromGPU() + }, b.BaseTexture.prototype.updateSourceImage = function(a) { + console.warn("PIXI.BaseTexture.updateSourceImage is deprecated. Use Phaser.Sprite.loadTexture instead.") + }, b.BaseTexture.prototype.dirty = function() { + for (var a = 0; a < this._glTextures.length; a++) this._dirty[a] = !0 + }, b.BaseTexture.prototype.unloadFromGPU = function() { + this.dirty(); + for (var a = this._glTextures.length - 1; a >= 0; a--) { + var c = this._glTextures[a], + d = b.glContexts[a]; + d && c && d.deleteTexture(c) + } + this._glTextures.length = 0, this.dirty() + }, b.BaseTexture.fromCanvas = function(a, c) { + return 0 === a.width && (a.width = 1), 0 === a.height && (a.height = 1), new b.BaseTexture(a, c) + }, b.TextureSilentFail = !1, b.Texture = function(a, c, d, e) { + this.noFrame = !1, c || (this.noFrame = !0, c = new b.Rectangle(0, 0, 1, 1)), a instanceof b.Texture && (a = a.baseTexture), this.baseTexture = a, this.frame = c, this.trim = e, this.valid = !1, this.isTiling = !1, this.requiresUpdate = !1, this.requiresReTint = !1, this._uvs = null, this.width = 0, this.height = 0, this.crop = d || new b.Rectangle(0, 0, 1, 1), a.hasLoaded && (this.noFrame && (c = new b.Rectangle(0, 0, a.width, a.height)), this.setFrame(c)) + }, b.Texture.prototype.constructor = b.Texture, b.Texture.prototype.onBaseTextureLoaded = function() { + var a = this.baseTexture; + this.noFrame && (this.frame = new b.Rectangle(0, 0, a.width, a.height)), this.setFrame(this.frame) + }, b.Texture.prototype.destroy = function(a) { + a && this.baseTexture.destroy(), this.valid = !1 + }, b.Texture.prototype.setFrame = function(a) { + if (this.noFrame = !1, this.frame = a, this.width = a.width, this.height = a.height, this.crop.x = a.x, this.crop.y = a.y, this.crop.width = a.width, this.crop.height = a.height, !this.trim && (a.x + a.width > this.baseTexture.width || a.y + a.height > this.baseTexture.height)) { + if (!b.TextureSilentFail) throw new Error("Texture Error: frame does not fit inside the base Texture dimensions " + this); + return void(this.valid = !1) + } + this.valid = a && a.width && a.height && this.baseTexture.source && this.baseTexture.hasLoaded, this.trim && (this.width = this.trim.width, this.height = this.trim.height, this.frame.width = this.trim.width, this.frame.height = this.trim.height), this.valid && this._updateUvs() + }, b.Texture.prototype._updateUvs = function() { + this._uvs || (this._uvs = new b.TextureUvs); + var a = this.crop, + c = this.baseTexture.width, + d = this.baseTexture.height; + this._uvs.x0 = a.x / c, this._uvs.y0 = a.y / d, this._uvs.x1 = (a.x + a.width) / c, this._uvs.y1 = a.y / d, this._uvs.x2 = (a.x + a.width) / c, this._uvs.y2 = (a.y + a.height) / d, this._uvs.x3 = a.x / c, this._uvs.y3 = (a.y + a.height) / d + }, b.Texture.fromCanvas = function(a, c) { + var d = b.BaseTexture.fromCanvas(a, c); + return new b.Texture(d) + }, b.TextureUvs = function() { + this.x0 = 0, this.y0 = 0, this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.x3 = 0, this.y3 = 0 + }, b.RenderTexture = function(a, c, d, e, f) { + if (this.width = a || 100, this.height = c || 100, this.resolution = f || 1, this.frame = new b.Rectangle(0, 0, this.width * this.resolution, this.height * this.resolution), this.crop = new b.Rectangle(0, 0, this.width * this.resolution, this.height * this.resolution), this.baseTexture = new b.BaseTexture, this.baseTexture.width = this.width * this.resolution, this.baseTexture.height = this.height * this.resolution, this.baseTexture._glTextures = [], this.baseTexture.resolution = this.resolution, this.baseTexture.scaleMode = e || b.scaleModes.DEFAULT, this.baseTexture.hasLoaded = !0, b.Texture.call(this, this.baseTexture, new b.Rectangle(0, 0, this.width * this.resolution, this.height * this.resolution)), this.renderer = d || b.defaultRenderer, this.renderer.type === b.WEBGL_RENDERER) { + var g = this.renderer.gl; + this.baseTexture._dirty[g.id] = !1, this.textureBuffer = new b.FilterTexture(g, this.width, this.height, this.baseTexture.scaleMode), + this.baseTexture._glTextures[g.id] = this.textureBuffer.texture, this.render = this.renderWebGL, this.projection = new b.Point(.5 * this.width, .5 * -this.height) + } else this.render = this.renderCanvas, this.textureBuffer = new b.CanvasBuffer(this.width * this.resolution, this.height * this.resolution), this.baseTexture.source = this.textureBuffer.canvas; + this.valid = !0, this.tempMatrix = new Phaser.Matrix, this._updateUvs() + }, b.RenderTexture.prototype = Object.create(b.Texture.prototype), b.RenderTexture.prototype.constructor = b.RenderTexture, b.RenderTexture.prototype.resize = function(a, c, d) { + a === this.width && c === this.height || (this.valid = a > 0 && c > 0, this.width = a, this.height = c, this.frame.width = this.crop.width = a * this.resolution, this.frame.height = this.crop.height = c * this.resolution, d && (this.baseTexture.width = this.width * this.resolution, this.baseTexture.height = this.height * this.resolution), this.renderer.type === b.WEBGL_RENDERER && (this.projection.x = this.width / 2, this.projection.y = -this.height / 2), this.valid && this.textureBuffer.resize(this.width, this.height)) + }, b.RenderTexture.prototype.clear = function() { + this.valid && (this.renderer.type === b.WEBGL_RENDERER && this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER, this.textureBuffer.frameBuffer), this.textureBuffer.clear()) + }, b.RenderTexture.prototype.renderWebGL = function(a, b, c) { + if (this.valid && 0 !== a.alpha) { + var d = a.worldTransform; + d.identity(), d.translate(0, 2 * this.projection.y), b && d.append(b), d.scale(1, -1); + for (var e = 0; e < a.children.length; e++) a.children[e].updateTransform(); + var f = this.renderer.gl; + f.viewport(0, 0, this.width * this.resolution, this.height * this.resolution), f.bindFramebuffer(f.FRAMEBUFFER, this.textureBuffer.frameBuffer), c && this.textureBuffer.clear(), this.renderer.spriteBatch.dirty = !0, this.renderer.renderDisplayObject(a, this.projection, this.textureBuffer.frameBuffer, b), this.renderer.spriteBatch.dirty = !0 + } + }, b.RenderTexture.prototype.renderCanvas = function(a, b, c) { + if (this.valid && 0 !== a.alpha) { + var d = a.worldTransform; + d.identity(), b && d.append(b); + for (var e = 0; e < a.children.length; e++) a.children[e].updateTransform(); + c && this.textureBuffer.clear(); + var f = this.renderer.resolution; + this.renderer.resolution = this.resolution, this.renderer.renderDisplayObject(a, this.textureBuffer.context, b), this.renderer.resolution = f + } + }, b.RenderTexture.prototype.getImage = function() { + var a = new Image; + return a.src = this.getBase64(), a + }, b.RenderTexture.prototype.getBase64 = function() { + return this.getCanvas().toDataURL() + }, b.RenderTexture.prototype.getCanvas = function() { + if (this.renderer.type === b.WEBGL_RENDERER) { + var a = this.renderer.gl, + c = this.textureBuffer.width, + d = this.textureBuffer.height, + e = new Uint8Array(4 * c * d); + a.bindFramebuffer(a.FRAMEBUFFER, this.textureBuffer.frameBuffer), a.readPixels(0, 0, c, d, a.RGBA, a.UNSIGNED_BYTE, e), a.bindFramebuffer(a.FRAMEBUFFER, null); + var f = new b.CanvasBuffer(c, d), + g = f.context.getImageData(0, 0, c, d); + return g.data.set(e), f.context.putImageData(g, 0, 0), f.canvas + } + return this.textureBuffer.canvas + }, b.AbstractFilter = function(a, b) { + this.passes = [this], this.shaders = [], this.dirty = !0, this.padding = 0, this.uniforms = b || {}, this.fragmentSrc = a || [] + }, b.AbstractFilter.prototype.constructor = b.AbstractFilter, b.AbstractFilter.prototype.syncUniforms = function() { + for (var a = 0, b = this.shaders.length; a < b; a++) this.shaders[a].dirty = !0 + }, b.Strip = function(a) { + b.DisplayObjectContainer.call(this), this.texture = a, this.uvs = new b.Float32Array([0, 1, 1, 1, 1, 0, 0, 1]), this.vertices = new b.Float32Array([0, 0, 100, 0, 100, 100, 0, 100]), this.colors = new b.Float32Array([1, 1, 1, 1]), this.indices = new b.Uint16Array([0, 1, 2, 3]), this.dirty = !0, this.blendMode = b.blendModes.NORMAL, this.canvasPadding = 0, this.drawMode = b.Strip.DrawModes.TRIANGLE_STRIP + }, b.Strip.prototype = Object.create(b.DisplayObjectContainer.prototype), b.Strip.prototype.constructor = b.Strip, b.Strip.prototype._renderWebGL = function(a) { + !this.visible || this.alpha <= 0 || (a.spriteBatch.stop(), this._vertexBuffer || this._initWebGL(a), a.shaderManager.setShader(a.shaderManager.stripShader), this._renderStrip(a), a.spriteBatch.start()) + }, b.Strip.prototype._initWebGL = function(a) { + var b = a.gl; + this._vertexBuffer = b.createBuffer(), this._indexBuffer = b.createBuffer(), this._uvBuffer = b.createBuffer(), this._colorBuffer = b.createBuffer(), b.bindBuffer(b.ARRAY_BUFFER, this._vertexBuffer), b.bufferData(b.ARRAY_BUFFER, this.vertices, b.DYNAMIC_DRAW), b.bindBuffer(b.ARRAY_BUFFER, this._uvBuffer), b.bufferData(b.ARRAY_BUFFER, this.uvs, b.STATIC_DRAW), b.bindBuffer(b.ARRAY_BUFFER, this._colorBuffer), b.bufferData(b.ARRAY_BUFFER, this.colors, b.STATIC_DRAW), b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this._indexBuffer), b.bufferData(b.ELEMENT_ARRAY_BUFFER, this.indices, b.STATIC_DRAW) + }, b.Strip.prototype._renderStrip = function(a) { + var c = a.gl, + d = a.projection, + e = a.offset, + f = a.shaderManager.stripShader, + g = this.drawMode === b.Strip.DrawModes.TRIANGLE_STRIP ? c.TRIANGLE_STRIP : c.TRIANGLES; + a.blendModeManager.setBlendMode(this.blendMode), c.uniformMatrix3fv(f.translationMatrix, !1, this.worldTransform.toArray(!0)), c.uniform2f(f.projectionVector, d.x, -d.y), c.uniform2f(f.offsetVector, -e.x, -e.y), c.uniform1f(f.alpha, this.worldAlpha), this.dirty ? (this.dirty = !1, c.bindBuffer(c.ARRAY_BUFFER, this._vertexBuffer), c.bufferData(c.ARRAY_BUFFER, this.vertices, c.STATIC_DRAW), c.vertexAttribPointer(f.aVertexPosition, 2, c.FLOAT, !1, 0, 0), c.bindBuffer(c.ARRAY_BUFFER, this._uvBuffer), c.bufferData(c.ARRAY_BUFFER, this.uvs, c.STATIC_DRAW), c.vertexAttribPointer(f.aTextureCoord, 2, c.FLOAT, !1, 0, 0), c.activeTexture(c.TEXTURE0), this.texture.baseTexture._dirty[c.id] ? a.renderer.updateTexture(this.texture.baseTexture) : c.bindTexture(c.TEXTURE_2D, this.texture.baseTexture._glTextures[c.id]), c.bindBuffer(c.ELEMENT_ARRAY_BUFFER, this._indexBuffer), c.bufferData(c.ELEMENT_ARRAY_BUFFER, this.indices, c.STATIC_DRAW)) : (c.bindBuffer(c.ARRAY_BUFFER, this._vertexBuffer), c.bufferSubData(c.ARRAY_BUFFER, 0, this.vertices), c.vertexAttribPointer(f.aVertexPosition, 2, c.FLOAT, !1, 0, 0), c.bindBuffer(c.ARRAY_BUFFER, this._uvBuffer), c.vertexAttribPointer(f.aTextureCoord, 2, c.FLOAT, !1, 0, 0), c.activeTexture(c.TEXTURE0), this.texture.baseTexture._dirty[c.id] ? a.renderer.updateTexture(this.texture.baseTexture) : c.bindTexture(c.TEXTURE_2D, this.texture.baseTexture._glTextures[c.id]), c.bindBuffer(c.ELEMENT_ARRAY_BUFFER, this._indexBuffer)), c.drawElements(g, this.indices.length, c.UNSIGNED_SHORT, 0) + }, b.Strip.prototype._renderCanvas = function(a) { + var c = a.context, + d = this.worldTransform, + e = d.tx * a.resolution + a.shakeX, + f = d.ty * a.resolution + a.shakeY; + a.roundPixels ? c.setTransform(d.a, d.b, d.c, d.d, 0 | e, 0 | f) : c.setTransform(d.a, d.b, d.c, d.d, e, f), this.drawMode === b.Strip.DrawModes.TRIANGLE_STRIP ? this._renderCanvasTriangleStrip(c) : this._renderCanvasTriangles(c) + }, b.Strip.prototype._renderCanvasTriangleStrip = function(a) { + var b = this.vertices, + c = this.uvs, + d = b.length / 2; + this.count++; + for (var e = 0; e < d - 2; e++) { + var f = 2 * e; + this._renderCanvasDrawTriangle(a, b, c, f, f + 2, f + 4) + } + }, b.Strip.prototype._renderCanvasTriangles = function(a) { + var b = this.vertices, + c = this.uvs, + d = this.indices, + e = d.length; + this.count++; + for (var f = 0; f < e; f += 3) { + var g = 2 * d[f], + h = 2 * d[f + 1], + i = 2 * d[f + 2]; + this._renderCanvasDrawTriangle(a, b, c, g, h, i) + } + }, b.Strip.prototype._renderCanvasDrawTriangle = function(a, b, c, d, e, f) { + var g = this.texture.baseTexture.source, + h = this.texture.width, + i = this.texture.height, + j = b[d], + k = b[e], + l = b[f], + m = b[d + 1], + n = b[e + 1], + o = b[f + 1], + p = c[d] * h, + q = c[e] * h, + r = c[f] * h, + s = c[d + 1] * i, + t = c[e + 1] * i, + u = c[f + 1] * i; + if (this.canvasPadding > 0) { + var v = this.canvasPadding / this.worldTransform.a, + w = this.canvasPadding / this.worldTransform.d, + x = (j + k + l) / 3, + y = (m + n + o) / 3, + z = j - x, + A = m - y, + B = Math.sqrt(z * z + A * A); + j = x + z / B * (B + v), m = y + A / B * (B + w), z = k - x, A = n - y, B = Math.sqrt(z * z + A * A), k = x + z / B * (B + v), n = y + A / B * (B + w), z = l - x, A = o - y, B = Math.sqrt(z * z + A * A), l = x + z / B * (B + v), o = y + A / B * (B + w) + } + a.save(), a.beginPath(), a.moveTo(j, m), a.lineTo(k, n), a.lineTo(l, o), a.closePath(), a.clip(); + var C = p * t + s * r + q * u - t * r - s * q - p * u, + D = j * t + s * l + k * u - t * l - s * k - j * u, + E = p * k + j * r + q * l - k * r - j * q - p * l, + F = p * t * l + s * k * r + j * q * u - j * t * r - s * q * l - p * k * u, + G = m * t + s * o + n * u - t * o - s * n - m * u, + H = p * n + m * r + q * o - n * r - m * q - p * o, + I = p * t * o + s * n * r + m * q * u - m * t * r - s * q * o - p * n * u; + a.transform(D / C, G / C, E / C, H / C, F / C, I / C), a.drawImage(g, 0, 0), a.restore() + }, b.Strip.prototype.renderStripFlat = function(a) { + var b = this.context, + c = a.vertices, + d = c.length / 2; + this.count++, b.beginPath(); + for (var e = 1; e < d - 2; e++) { + var f = 2 * e, + g = c[f], + h = c[f + 2], + i = c[f + 4], + j = c[f + 1], + k = c[f + 3], + l = c[f + 5]; + b.moveTo(g, j), b.lineTo(h, k), b.lineTo(i, l) + } + b.fillStyle = "#FF0000", b.fill(), b.closePath() + }, b.Strip.prototype.onTextureUpdate = function() { + this.updateFrame = !0 + }, b.Strip.prototype.getBounds = function(a) { + for (var c = a || this.worldTransform, d = c.a, e = c.b, f = c.c, g = c.d, h = c.tx, i = c.ty, j = -(1 / 0), k = -(1 / 0), l = 1 / 0, m = 1 / 0, n = this.vertices, o = 0, p = n.length; o < p; o += 2) { + var q = n[o], + r = n[o + 1], + s = d * q + f * r + h, + t = g * r + e * q + i; + l = s < l ? s : l, m = t < m ? t : m, j = s > j ? s : j, k = t > k ? t : k + } + if (l === -(1 / 0) || k === 1 / 0) return b.EmptyRectangle; + var u = this._bounds; + return u.x = l, u.width = j - l, u.y = m, u.height = k - m, this._currentBounds = u, u + }, b.Strip.DrawModes = { + TRIANGLE_STRIP: 0, + TRIANGLES: 1 + }, b.Rope = function(a, c) { + b.Strip.call(this, a), this.points = c, this.vertices = new b.Float32Array(4 * c.length), this.uvs = new b.Float32Array(4 * c.length), this.colors = new b.Float32Array(2 * c.length), this.indices = new b.Uint16Array(2 * c.length), this.refresh() + }, b.Rope.prototype = Object.create(b.Strip.prototype), b.Rope.prototype.constructor = b.Rope, b.Rope.prototype.refresh = function() { + var a = this.points; + if (!(a.length < 1)) { + var b = this.uvs, + c = a[0], + d = this.indices, + e = this.colors; + this.count -= .2, b[0] = 0, b[1] = 0, b[2] = 0, b[3] = 1, e[0] = 1, e[1] = 1, d[0] = 0, d[1] = 1; + for (var f, g, h, i = a.length, j = 1; j < i; j++) f = a[j], g = 4 * j, h = j / (i - 1), j % 2 ? (b[g] = h, b[g + 1] = 0, b[g + 2] = h, b[g + 3] = 1) : (b[g] = h, b[g + 1] = 0, b[g + 2] = h, b[g + 3] = 1), g = 2 * j, e[g] = 1, e[g + 1] = 1, g = 2 * j, d[g] = g, d[g + 1] = g + 1, c = f + } + }, b.Rope.prototype.updateTransform = function() { + var a = this.points; + if (!(a.length < 1)) { + var c, d = a[0], + e = { + x: 0, + y: 0 + }; + this.count -= .2; + for (var f, g, h, i, j, k = this.vertices, l = a.length, m = 0; m < l; m++) f = a[m], g = 4 * m, c = m < a.length - 1 ? a[m + 1] : f, e.y = -(c.x - d.x), e.x = c.y - d.y, h = 10 * (1 - m / (l - 1)), h > 1 && (h = 1), i = Math.sqrt(e.x * e.x + e.y * e.y), j = this.texture.height / 2, e.x /= i, e.y /= i, e.x *= j, e.y *= j, k[g] = f.x + e.x, k[g + 1] = f.y + e.y, k[g + 2] = f.x - e.x, k[g + 3] = f.y - e.y, d = f; + b.DisplayObjectContainer.prototype.updateTransform.call(this) + } + }, b.Rope.prototype.setTexture = function(a) { + this.texture = a + }, b.TilingSprite = function(a, c, d) { + b.Sprite.call(this, a), this._width = c || 128, this._height = d || 128, this.tileScale = new b.Point(1, 1), this.tileScaleOffset = new b.Point(1, 1), this.tilePosition = new b.Point, this.renderable = !0, this.tint = 16777215, this.textureDebug = !1, this.blendMode = b.blendModes.NORMAL, this.canvasBuffer = null, this.tilingTexture = null, this.tilePattern = null, this.refreshTexture = !0, this.frameWidth = 0, this.frameHeight = 0 + }, b.TilingSprite.prototype = Object.create(b.Sprite.prototype), b.TilingSprite.prototype.constructor = b.TilingSprite, b.TilingSprite.prototype.setTexture = function(a) { + this.texture !== a && (this.texture = a, this.refreshTexture = !0, this.cachedTint = 16777215) + }, b.TilingSprite.prototype._renderWebGL = function(a) { + if (this.visible && this.renderable && 0 !== this.alpha) { + if (this._mask && (a.spriteBatch.stop(), a.maskManager.pushMask(this.mask, a), a.spriteBatch.start()), this._filters && (a.spriteBatch.flush(), a.filterManager.pushFilter(this._filterBlock)), this.refreshTexture) { + if (this.generateTilingTexture(!0, a), !this.tilingTexture) return; + this.tilingTexture.needsUpdate && (a.renderer.updateTexture(this.tilingTexture.baseTexture), this.tilingTexture.needsUpdate = !1) + } + a.spriteBatch.renderTilingSprite(this); + for (var b = 0; b < this.children.length; b++) this.children[b]._renderWebGL(a); + a.spriteBatch.stop(), this._filters && a.filterManager.popFilter(), this._mask && a.maskManager.popMask(this._mask, a), a.spriteBatch.start() + } + }, b.TilingSprite.prototype._renderCanvas = function(a) { + if (this.visible && this.renderable && 0 !== this.alpha) { + var c = a.context; + this._mask && a.maskManager.pushMask(this._mask, a), c.globalAlpha = this.worldAlpha; + var d = this.worldTransform, + e = a.resolution, + f = d.tx * e + a.shakeX, + g = d.ty * e + a.shakeY; + if (c.setTransform(d.a * e, d.b * e, d.c * e, d.d * e, f, g), this.refreshTexture) { + if (this.generateTilingTexture(!1, a), !this.tilingTexture) return; + this.tilePattern = c.createPattern(this.tilingTexture.baseTexture.source, "repeat") + } + var h = a.currentBlendMode; + this.blendMode !== a.currentBlendMode && (a.currentBlendMode = this.blendMode, c.globalCompositeOperation = b.blendModesCanvas[a.currentBlendMode]); + var i = this.tilePosition, + j = this.tileScale; + i.x %= this.tilingTexture.baseTexture.width, i.y %= this.tilingTexture.baseTexture.height, c.scale(j.x, j.y), c.translate(i.x + this.anchor.x * -this._width, i.y + this.anchor.y * -this._height), c.fillStyle = this.tilePattern; + var f = -i.x, + g = -i.y, + k = this._width / j.x, + l = this._height / j.y; + a.roundPixels && (f |= 0, g |= 0, k |= 0, l |= 0), c.fillRect(f, g, k, l), c.scale(1 / j.x, 1 / j.y), c.translate(-i.x + this.anchor.x * this._width, -i.y + this.anchor.y * this._height), this._mask && a.maskManager.popMask(a); + for (var m = 0; m < this.children.length; m++) this.children[m]._renderCanvas(a); + h !== this.blendMode && (a.currentBlendMode = h, c.globalCompositeOperation = b.blendModesCanvas[h]) + } + }, b.TilingSprite.prototype.onTextureUpdate = function() {}, b.TilingSprite.prototype.generateTilingTexture = function(a, c) { + if (this.texture.baseTexture.hasLoaded) { + var d = this.texture, + e = d.frame, + f = this._frame.sourceSizeW || this._frame.width, + g = this._frame.sourceSizeH || this._frame.height, + h = 0, + i = 0; + this._frame.trimmed && (h = this._frame.spriteSourceSizeX, i = this._frame.spriteSourceSizeY), a && (f = b.getNextPowerOfTwo(f), g = b.getNextPowerOfTwo(g)), this.canvasBuffer ? (this.canvasBuffer.resize(f, g), this.tilingTexture.baseTexture.width = f, this.tilingTexture.baseTexture.height = g, this.tilingTexture.needsUpdate = !0) : (this.canvasBuffer = new b.CanvasBuffer(f, g), this.tilingTexture = b.Texture.fromCanvas(this.canvasBuffer.canvas), this.tilingTexture.isTiling = !0, this.tilingTexture.needsUpdate = !0), this.textureDebug && (this.canvasBuffer.context.strokeStyle = "#00ff00", this.canvasBuffer.context.strokeRect(0, 0, f, g)); + var j = d.crop.width, + k = d.crop.height; + j === f && k === g || (j = f, k = g), this.canvasBuffer.context.drawImage(d.baseTexture.source, d.crop.x, d.crop.y, d.crop.width, d.crop.height, h, i, j, k), this.tileScaleOffset.x = e.width / f, this.tileScaleOffset.y = e.height / g, this.refreshTexture = !1, this.tilingTexture.baseTexture._powerOf2 = !0 + } + }, b.TilingSprite.prototype.getBounds = function() { + var a = this._width, + b = this._height, + c = a * (1 - this.anchor.x), + d = a * -this.anchor.x, + e = b * (1 - this.anchor.y), + f = b * -this.anchor.y, + g = this.worldTransform, + h = g.a, + i = g.b, + j = g.c, + k = g.d, + l = g.tx, + m = g.ty, + n = h * d + j * f + l, + o = k * f + i * d + m, + p = h * c + j * f + l, + q = k * f + i * c + m, + r = h * c + j * e + l, + s = k * e + i * c + m, + t = h * d + j * e + l, + u = k * e + i * d + m, + v = -(1 / 0), + w = -(1 / 0), + x = 1 / 0, + y = 1 / 0; + x = n < x ? n : x, x = p < x ? p : x, x = r < x ? r : x, x = t < x ? t : x, y = o < y ? o : y, y = q < y ? q : y, y = s < y ? s : y, y = u < y ? u : y, v = n > v ? n : v, v = p > v ? p : v, v = r > v ? r : v, v = t > v ? t : v, w = o > w ? o : w, w = q > w ? q : w, w = s > w ? s : w, w = u > w ? u : w; + var z = this._bounds; + return z.x = x, z.width = v - x, z.y = y, z.height = w - y, this._currentBounds = z, z + }, b.TilingSprite.prototype.destroy = function() { + b.Sprite.prototype.destroy.call(this), this.canvasBuffer && (this.canvasBuffer.destroy(), this.canvasBuffer = null), this.tileScale = null, this.tileScaleOffset = null, this.tilePosition = null, this.tilingTexture && (this.tilingTexture.destroy(!0), this.tilingTexture = null) + }, Object.defineProperty(b.TilingSprite.prototype, "width", { + get: function() { + return this._width + }, + set: function(a) { + this._width = a + } + }), Object.defineProperty(b.TilingSprite.prototype, "height", { + get: function() { + return this._height + }, + set: function(a) { + this._height = a + } + }), "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = b), exports.PIXI = b) : "undefined" != typeof define && define.amd ? define("PIXI", function() { + return a.PIXI = b + }()) : a.PIXI = b, b +}.call(this), + function() { + function a(a, b) { + this._scaleFactor = a, this._deltaMode = b, this.originalEvent = null + } + var b = this, + c = c || { + VERSION: "2.6.2", + GAMES: [], + AUTO: 0, + CANVAS: 1, + WEBGL: 2, + HEADLESS: 3, + NONE: 0, + LEFT: 1, + RIGHT: 2, + UP: 3, + DOWN: 4, + SPRITE: 0, + BUTTON: 1, + IMAGE: 2, + GRAPHICS: 3, + TEXT: 4, + TILESPRITE: 5, + BITMAPTEXT: 6, + GROUP: 7, + RENDERTEXTURE: 8, + TILEMAP: 9, + TILEMAPLAYER: 10, + EMITTER: 11, + POLYGON: 12, + BITMAPDATA: 13, + CANVAS_FILTER: 14, + WEBGL_FILTER: 15, + ELLIPSE: 16, + SPRITEBATCH: 17, + RETROFONT: 18, + POINTER: 19, + ROPE: 20, + CIRCLE: 21, + RECTANGLE: 22, + LINE: 23, + MATRIX: 24, + POINT: 25, + ROUNDEDRECTANGLE: 26, + CREATURE: 27, + VIDEO: 28, + PENDING_ATLAS: -1, + HORIZONTAL: 0, + VERTICAL: 1, + LANDSCAPE: 0, + PORTRAIT: 1, + ANGLE_UP: 270, + ANGLE_DOWN: 90, + ANGLE_LEFT: 180, + ANGLE_RIGHT: 0, + ANGLE_NORTH_EAST: 315, + ANGLE_NORTH_WEST: 225, + ANGLE_SOUTH_EAST: 45, + ANGLE_SOUTH_WEST: 135, + TOP_LEFT: 0, + TOP_CENTER: 1, + TOP_RIGHT: 2, + LEFT_TOP: 3, + LEFT_CENTER: 4, + LEFT_BOTTOM: 5, + CENTER: 6, + RIGHT_TOP: 7, + RIGHT_CENTER: 8, + RIGHT_BOTTOM: 9, + BOTTOM_LEFT: 10, + BOTTOM_CENTER: 11, + BOTTOM_RIGHT: 12, + blendModes: { + NORMAL: 0, + ADD: 1, + MULTIPLY: 2, + SCREEN: 3, + OVERLAY: 4, + DARKEN: 5, + LIGHTEN: 6, + COLOR_DODGE: 7, + COLOR_BURN: 8, + HARD_LIGHT: 9, + SOFT_LIGHT: 10, + DIFFERENCE: 11, + EXCLUSION: 12, + HUE: 13, + SATURATION: 14, + COLOR: 15, + LUMINOSITY: 16 + }, + scaleModes: { + DEFAULT: 0, + LINEAR: 0, + NEAREST: 1 + }, + PIXI: PIXI || {} + }; + if (Math.trunc || (Math.trunc = function(a) { + return a < 0 ? Math.ceil(a) : Math.floor(a) + }), Function.prototype.bind || (Function.prototype.bind = function() { + var a = Array.prototype.slice; + return function(b) { + function c() { + var f = e.concat(a.call(arguments)); + d.apply(this instanceof c ? this : b, f) + } + var d = this, + e = a.call(arguments, 1); + if ("function" != typeof d) throw new TypeError; + return c.prototype = function a(b) { + if (b && (a.prototype = b), !(this instanceof a)) return new a + }(d.prototype), c + } + }()), Array.isArray || (Array.isArray = function(a) { + return "[object Array]" === Object.prototype.toString.call(a) + }), Array.prototype.forEach || (Array.prototype.forEach = function(a) { + "use strict"; + if (void 0 === this || null === this) throw new TypeError; + var b = Object(this), + c = b.length >>> 0; + if ("function" != typeof a) throw new TypeError; + for (var d = arguments.length >= 2 ? arguments[1] : void 0, e = 0; e < c; e++) e in b && a.call(d, b[e], e, b) + }), "function" != typeof window.Uint32Array && "object" != typeof window.Uint32Array) { + var d = function(a) { + var b = new Array; + window[a] = function(a) { + if ("number" == typeof a) { + Array.call(this, a), this.length = a; + for (var b = 0; b < this.length; b++) this[b] = 0 + } else { + Array.call(this, a.length), this.length = a.length; + for (var b = 0; b < this.length; b++) this[b] = a[b] + } + }, window[a].prototype = b, window[a].constructor = window[a] + }; + d("Uint32Array"), d("Int16Array") + } + window.console || (window.console = {}, window.console.log = window.console.assert = function() {}, window.console.warn = window.console.assert = function() {}), c.Utils = { + reverseString: function(a) { + return a.split("").reverse().join("") + }, + getProperty: function(a, b) { + for (var c = b.split("."), d = c.pop(), e = c.length, f = 1, g = c[0]; f < e && (a = a[g]);) g = c[f], f++; + return a ? a[d] : null + }, + setProperty: function(a, b, c) { + for (var d = b.split("."), e = d.pop(), f = d.length, g = 1, h = d[0]; g < f && (a = a[h]);) h = d[g], g++; + return a && (a[e] = c), a + }, + chanceRoll: function(a) { + return void 0 === a && (a = 50), a > 0 && 100 * Math.random() <= a + }, + randomChoice: function(a, b) { + return Math.random() < .5 ? a : b + }, + parseDimension: function(a, b) { + var c = 0, + d = 0; + return "string" == typeof a ? "%" === a.substr(-1) ? (c = parseInt(a, 10) / 100, d = 0 === b ? window.innerWidth * c : window.innerHeight * c) : d = parseInt(a, 10) : d = a, d + }, + pad: function(a, b, c, d) { + if (void 0 === b) var b = 0; + if (void 0 === c) var c = " "; + if (void 0 === d) var d = 3; + a = a.toString(); + var e = 0; + if (b + 1 >= a.length) switch (d) { + case 1: + a = new Array(b + 1 - a.length).join(c) + a; + break; + case 3: + var f = Math.ceil((e = b - a.length) / 2), + g = e - f; + a = new Array(g + 1).join(c) + a + new Array(f + 1).join(c); + break; + default: + a += new Array(b + 1 - a.length).join(c) + } + return a + }, + isPlainObject: function(a) { + if ("object" != typeof a || a.nodeType || a === a.window) return !1; + try { + if (a.constructor && !{}.hasOwnProperty.call(a.constructor.prototype, "isPrototypeOf")) return !1 + } catch (a) { + return !1 + } + return !0 + }, + extend: function() { + var a, b, d, e, f, g, h = arguments[0] || {}, + i = 1, + j = arguments.length, + k = !1; + for ("boolean" == typeof h && (k = h, h = arguments[1] || {}, i = 2), j === i && (h = this, --i); i < j; i++) + if (null != (a = arguments[i])) + for (b in a) d = h[b], e = a[b], h !== e && (k && e && (c.Utils.isPlainObject(e) || (f = Array.isArray(e))) ? (f ? (f = !1, g = d && Array.isArray(d) ? d : []) : g = d && c.Utils.isPlainObject(d) ? d : {}, h[b] = c.Utils.extend(k, g, e)) : void 0 !== e && (h[b] = e)); + return h + }, + mixinPrototype: function(a, b, c) { + void 0 === c && (c = !1); + for (var d = Object.keys(b), e = 0; e < d.length; e++) { + var f = d[e], + g = b[f]; + !c && f in a || (!g || "function" != typeof g.get && "function" != typeof g.set ? a[f] = g : "function" == typeof g.clone ? a[f] = g.clone() : Object.defineProperty(a, f, g)) + } + }, + mixin: function(a, b) { + if (!a || "object" != typeof a) return b; + for (var d in a) { + var e = a[d]; + if (!e.childNodes && !e.cloneNode) { + var f = typeof a[d]; + a[d] && "object" === f ? typeof b[d] === f ? b[d] = c.Utils.mixin(a[d], b[d]) : b[d] = c.Utils.mixin(a[d], new e.constructor) : b[d] = a[d] + } + } + return b + } + }, c.Circle = function(a, b, d) { + a = a || 0, b = b || 0, d = d || 0, this.x = a, this.y = b, this._diameter = d, this._radius = 0, d > 0 && (this._radius = .5 * d), this.type = c.CIRCLE + }, c.Circle.prototype = { + circumference: function() { + return 2 * (Math.PI * this._radius) + }, + random: function(a) { + void 0 === a && (a = new c.Point); + var b = 2 * Math.PI * Math.random(), + d = Math.random() + Math.random(), + e = d > 1 ? 2 - d : d, + f = e * Math.cos(b), + g = e * Math.sin(b); + return a.x = this.x + f * this.radius, a.y = this.y + g * this.radius, a + }, + getBounds: function() { + return new c.Rectangle(this.x - this.radius, this.y - this.radius, this.diameter, this.diameter) + }, + setTo: function(a, b, c) { + return this.x = a, this.y = b, this._diameter = c, this._radius = .5 * c, this + }, + copyFrom: function(a) { + return this.setTo(a.x, a.y, a.diameter) + }, + copyTo: function(a) { + return a.x = this.x, a.y = this.y, a.diameter = this._diameter, a + }, + distance: function(a, b) { + var d = c.Math.distance(this.x, this.y, a.x, a.y); + return b ? Math.round(d) : d + }, + clone: function(a) { + return void 0 === a || null === a ? a = new c.Circle(this.x, this.y, this.diameter) : a.setTo(this.x, this.y, this.diameter), a + }, + contains: function(a, b) { + return c.Circle.contains(this, a, b) + }, + circumferencePoint: function(a, b, d) { + return c.Circle.circumferencePoint(this, a, b, d) + }, + offset: function(a, b) { + return this.x += a, this.y += b, this + }, + offsetPoint: function(a) { + return this.offset(a.x, a.y) + }, + toString: function() { + return "[{Phaser.Circle (x=" + this.x + " y=" + this.y + " diameter=" + this.diameter + " radius=" + this.radius + ")}]" + } + }, c.Circle.prototype.constructor = c.Circle, Object.defineProperty(c.Circle.prototype, "diameter", { + get: function() { + return this._diameter + }, + set: function(a) { + a > 0 && (this._diameter = a, this._radius = .5 * a) + } + }), Object.defineProperty(c.Circle.prototype, "radius", { + get: function() { + return this._radius + }, + set: function(a) { + a > 0 && (this._radius = a, this._diameter = 2 * a) + } + }), Object.defineProperty(c.Circle.prototype, "left", { + get: function() { + return this.x - this._radius + }, + set: function(a) { + a > this.x ? (this._radius = 0, this._diameter = 0) : this.radius = this.x - a + } + }), Object.defineProperty(c.Circle.prototype, "right", { + get: function() { + return this.x + this._radius + }, + set: function(a) { + a < this.x ? (this._radius = 0, this._diameter = 0) : this.radius = a - this.x + } + }), Object.defineProperty(c.Circle.prototype, "top", { + get: function() { + return this.y - this._radius + }, + set: function(a) { + a > this.y ? (this._radius = 0, this._diameter = 0) : this.radius = this.y - a + } + }), Object.defineProperty(c.Circle.prototype, "bottom", { + get: function() { + return this.y + this._radius + }, + set: function(a) { + a < this.y ? (this._radius = 0, this._diameter = 0) : this.radius = a - this.y + } + }), Object.defineProperty(c.Circle.prototype, "area", { + get: function() { + return this._radius > 0 ? Math.PI * this._radius * this._radius : 0 + } + }), Object.defineProperty(c.Circle.prototype, "empty", { + get: function() { + return 0 === this._diameter + }, + set: function(a) { + a === !0 && this.setTo(0, 0, 0) + } + }), c.Circle.contains = function(a, b, c) { + if (a.radius > 0 && b >= a.left && b <= a.right && c >= a.top && c <= a.bottom) { + var d = (a.x - b) * (a.x - b), + e = (a.y - c) * (a.y - c); + return d + e <= a.radius * a.radius + } + return !1 + }, c.Circle.equals = function(a, b) { + return a.x === b.x && a.y === b.y && a.diameter === b.diameter + }, c.Circle.intersects = function(a, b) { + return c.Math.distance(a.x, a.y, b.x, b.y) <= a.radius + b.radius + }, c.Circle.circumferencePoint = function(a, b, d, e) { + return void 0 === d && (d = !1), void 0 === e && (e = new c.Point), d === !0 && (b = c.Math.degToRad(b)), e.x = a.x + a.radius * Math.cos(b), e.y = a.y + a.radius * Math.sin(b), e + }, c.Circle.intersectsRectangle = function(a, b) { + var c = Math.abs(a.x - b.x - b.halfWidth), + d = b.halfWidth + a.radius; + if (c > d) return !1; + var e = Math.abs(a.y - b.y - b.halfHeight), + f = b.halfHeight + a.radius; + if (e > f) return !1; + if (c <= b.halfWidth || e <= b.halfHeight) return !0; + var g = c - b.halfWidth, + h = e - b.halfHeight, + i = g * g, + j = h * h, + k = a.radius * a.radius; + return i + j <= k + }, PIXI.Circle = c.Circle, c.Ellipse = function(a, b, d, e) { + a = a || 0, b = b || 0, d = d || 0, e = e || 0, this.x = a, this.y = b, this.width = d, this.height = e, this.type = c.ELLIPSE + }, c.Ellipse.prototype = { + setTo: function(a, b, c, d) { + return this.x = a, this.y = b, this.width = c, this.height = d, this + }, + getBounds: function() { + return new c.Rectangle(this.x - this.width, this.y - this.height, this.width, this.height) + }, + copyFrom: function(a) { + return this.setTo(a.x, a.y, a.width, a.height) + }, + copyTo: function(a) { + return a.x = this.x, a.y = this.y, a.width = this.width, a.height = this.height, a + }, + clone: function(a) { + return void 0 === a || null === a ? a = new c.Ellipse(this.x, this.y, this.width, this.height) : a.setTo(this.x, this.y, this.width, this.height), a + }, + contains: function(a, b) { + return c.Ellipse.contains(this, a, b) + }, + random: function(a) { + void 0 === a && (a = new c.Point); + var b = Math.random() * Math.PI * 2, + d = Math.random(); + return a.x = Math.sqrt(d) * Math.cos(b), a.y = Math.sqrt(d) * Math.sin(b), a.x = this.x + a.x * this.width / 2, a.y = this.y + a.y * this.height / 2, a + }, + toString: function() { + return "[{Phaser.Ellipse (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")}]" + } + }, c.Ellipse.prototype.constructor = c.Ellipse, Object.defineProperty(c.Ellipse.prototype, "left", { + get: function() { + return this.x + }, + set: function(a) { + this.x = a + } + }), Object.defineProperty(c.Ellipse.prototype, "right", { + get: function() { + return this.x + this.width + }, + set: function(a) { + a < this.x ? this.width = 0 : this.width = a - this.x + } + }), Object.defineProperty(c.Ellipse.prototype, "top", { + get: function() { + return this.y + }, + set: function(a) { + this.y = a + } + }), Object.defineProperty(c.Ellipse.prototype, "bottom", { + get: function() { + return this.y + this.height + }, + set: function(a) { + a < this.y ? this.height = 0 : this.height = a - this.y + } + }), Object.defineProperty(c.Ellipse.prototype, "empty", { + get: function() { + return 0 === this.width || 0 === this.height + }, + set: function(a) { + a === !0 && this.setTo(0, 0, 0, 0) + } + }), c.Ellipse.contains = function(a, b, c) { + if (a.width <= 0 || a.height <= 0) return !1; + var d = (b - a.x) / a.width - .5, + e = (c - a.y) / a.height - .5; + return d *= d, e *= e, d + e < .25 + }, PIXI.Ellipse = c.Ellipse, c.Line = function(a, b, d, e) { + a = a || 0, b = b || 0, d = d || 0, e = e || 0, this.start = new c.Point(a, b), this.end = new c.Point(d, e), this.type = c.LINE + }, c.Line.prototype = { + setTo: function(a, b, c, d) { + return this.start.setTo(a, b), this.end.setTo(c, d), this + }, + fromSprite: function(a, b, c) { + return void 0 === c && (c = !1), c ? this.setTo(a.center.x, a.center.y, b.center.x, b.center.y) : this.setTo(a.x, a.y, b.x, b.y) + }, + fromAngle: function(a, b, c, d) { + return this.start.setTo(a, b), this.end.setTo(a + Math.cos(c) * d, b + Math.sin(c) * d), this + }, + rotate: function(a, b) { + var c = (this.start.x + this.end.x) / 2, + d = (this.start.y + this.end.y) / 2; + return this.start.rotate(c, d, a, b), this.end.rotate(c, d, a, b), this + }, + rotateAround: function(a, b, c, d) { + return this.start.rotate(a, b, c, d), this.end.rotate(a, b, c, d), this + }, + intersects: function(a, b, d) { + return c.Line.intersectsPoints(this.start, this.end, a.start, a.end, b, d) + }, + reflect: function(a) { + return c.Line.reflect(this, a) + }, + midPoint: function(a) { + return void 0 === a && (a = new c.Point), a.x = (this.start.x + this.end.x) / 2, a.y = (this.start.y + this.end.y) / 2, a + }, + centerOn: function(a, b) { + var c = (this.start.x + this.end.x) / 2, + d = (this.start.y + this.end.y) / 2, + e = a - c, + f = b - d; + this.start.add(e, f), this.end.add(e, f) + }, + pointOnLine: function(a, b) { + return (a - this.start.x) * (this.end.y - this.start.y) === (this.end.x - this.start.x) * (b - this.start.y) + }, + pointOnSegment: function(a, b) { + var c = Math.min(this.start.x, this.end.x), + d = Math.max(this.start.x, this.end.x), + e = Math.min(this.start.y, this.end.y), + f = Math.max(this.start.y, this.end.y); + return this.pointOnLine(a, b) && a >= c && a <= d && b >= e && b <= f + }, + random: function(a) { + void 0 === a && (a = new c.Point); + var b = Math.random(); + return a.x = this.start.x + b * (this.end.x - this.start.x), a.y = this.start.y + b * (this.end.y - this.start.y), a + }, + coordinatesOnLine: function(a, b) { + void 0 === a && (a = 1), void 0 === b && (b = []); + var c = Math.round(this.start.x), + d = Math.round(this.start.y), + e = Math.round(this.end.x), + f = Math.round(this.end.y), + g = Math.abs(e - c), + h = Math.abs(f - d), + i = c < e ? 1 : -1, + j = d < f ? 1 : -1, + k = g - h; + b.push([c, d]); + for (var l = 1; c !== e || d !== f;) { + var m = k << 1; + m > -h && (k -= h, c += i), m < g && (k += g, d += j), l % a === 0 && b.push([c, d]), l++ + } + return b + }, + clone: function(a) { + return void 0 === a || null === a ? a = new c.Line(this.start.x, this.start.y, this.end.x, this.end.y) : a.setTo(this.start.x, this.start.y, this.end.x, this.end.y), a + } + }, Object.defineProperty(c.Line.prototype, "length", { + get: function() { + return Math.sqrt((this.end.x - this.start.x) * (this.end.x - this.start.x) + (this.end.y - this.start.y) * (this.end.y - this.start.y)) + } + }), Object.defineProperty(c.Line.prototype, "angle", { + get: function() { + return Math.atan2(this.end.y - this.start.y, this.end.x - this.start.x) + } + }), Object.defineProperty(c.Line.prototype, "slope", { + get: function() { + return (this.end.y - this.start.y) / (this.end.x - this.start.x) + } + }), Object.defineProperty(c.Line.prototype, "perpSlope", { + get: function() { + return -((this.end.x - this.start.x) / (this.end.y - this.start.y)) + } + }), Object.defineProperty(c.Line.prototype, "x", { + get: function() { + return Math.min(this.start.x, this.end.x) + } + }), Object.defineProperty(c.Line.prototype, "y", { + get: function() { + return Math.min(this.start.y, this.end.y) + } + }), Object.defineProperty(c.Line.prototype, "left", { + get: function() { + return Math.min(this.start.x, this.end.x) + } + }), Object.defineProperty(c.Line.prototype, "right", { + get: function() { + return Math.max(this.start.x, this.end.x) + } + }), Object.defineProperty(c.Line.prototype, "top", { + get: function() { + return Math.min(this.start.y, this.end.y) + } + }), Object.defineProperty(c.Line.prototype, "bottom", { + get: function() { + return Math.max(this.start.y, this.end.y) + } + }), Object.defineProperty(c.Line.prototype, "width", { + get: function() { + return Math.abs(this.start.x - this.end.x) + } + }), Object.defineProperty(c.Line.prototype, "height", { + get: function() { + return Math.abs(this.start.y - this.end.y) + } + }), Object.defineProperty(c.Line.prototype, "normalX", { + get: function() { + return Math.cos(this.angle - 1.5707963267948966) + } + }), Object.defineProperty(c.Line.prototype, "normalY", { + get: function() { + return Math.sin(this.angle - 1.5707963267948966) + } + }), Object.defineProperty(c.Line.prototype, "normalAngle", { + get: function() { + return c.Math.wrap(this.angle - 1.5707963267948966, -Math.PI, Math.PI) + } + }), c.Line.intersectsPoints = function(a, b, d, e, f, g) { + void 0 === f && (f = !0), void 0 === g && (g = new c.Point); + var h = b.y - a.y, + i = e.y - d.y, + j = a.x - b.x, + k = d.x - e.x, + l = b.x * a.y - a.x * b.y, + m = e.x * d.y - d.x * e.y, + n = h * k - i * j; + if (0 === n) return null; + if (g.x = (j * m - k * l) / n, g.y = (i * l - h * m) / n, f) { + var o = (e.y - d.y) * (b.x - a.x) - (e.x - d.x) * (b.y - a.y), + p = ((e.x - d.x) * (a.y - d.y) - (e.y - d.y) * (a.x - d.x)) / o, + q = ((b.x - a.x) * (a.y - d.y) - (b.y - a.y) * (a.x - d.x)) / o; + return p >= 0 && p <= 1 && q >= 0 && q <= 1 ? g : null + } + return g + }, c.Line.intersects = function(a, b, d, e) { + return c.Line.intersectsPoints(a.start, a.end, b.start, b.end, d, e) + }, c.Line.intersectsRectangle = function(a, b) { + if (!c.Rectangle.intersects(a, b)) return !1; + var d = a.start.x, + e = a.start.y, + f = a.end.x, + g = a.end.y, + h = b.x, + i = b.y, + j = b.right, + k = b.bottom, + l = 0; + if (d >= h && d <= j && e >= i && e <= k || f >= h && f <= j && g >= i && g <= k) return !0; + if (d < h && f >= h) { + if (l = e + (g - e) * (h - d) / (f - d), l > i && l <= k) return !0 + } else if (d > j && f <= j && (l = e + (g - e) * (j - d) / (f - d), l >= i && l <= k)) return !0; + if (e < i && g >= i) { + if (l = d + (f - d) * (i - e) / (g - e), l >= h && l <= j) return !0 + } else if (e > k && g <= k && (l = d + (f - d) * (k - e) / (g - e), l >= h && l <= j)) return !0; + return !1 + }, c.Line.reflect = function(a, b) { + return 2 * b.normalAngle - 3.141592653589793 - a.angle + }, c.Matrix = function(a, b, d, e, f, g) { + void 0 !== a && null !== a || (a = 1), void 0 !== b && null !== b || (b = 0), void 0 !== d && null !== d || (d = 0), void 0 !== e && null !== e || (e = 1), void 0 !== f && null !== f || (f = 0), void 0 !== g && null !== g || (g = 0), this.a = a, this.b = b, this.c = d, this.d = e, this.tx = f, this.ty = g, this.type = c.MATRIX + }, c.Matrix.prototype = { + fromArray: function(a) { + return this.setTo(a[0], a[1], a[3], a[4], a[2], a[5]) + }, + setTo: function(a, b, c, d, e, f) { + return this.a = a, this.b = b, this.c = c, this.d = d, this.tx = e, this.ty = f, this + }, + clone: function(a) { + return void 0 === a || null === a ? a = new c.Matrix(this.a, this.b, this.c, this.d, this.tx, this.ty) : (a.a = this.a, a.b = this.b, a.c = this.c, a.d = this.d, a.tx = this.tx, a.ty = this.ty), a + }, + copyTo: function(a) { + return a.copyFrom(this), a + }, + copyFrom: function(a) { + return this.a = a.a, this.b = a.b, this.c = a.c, this.d = a.d, this.tx = a.tx, this.ty = a.ty, this + }, + toArray: function(a, b) { + return void 0 === b && (b = new PIXI.Float32Array(9)), a ? (b[0] = this.a, b[1] = this.b, b[2] = 0, b[3] = this.c, b[4] = this.d, b[5] = 0, b[6] = this.tx, b[7] = this.ty, b[8] = 1) : (b[0] = this.a, b[1] = this.c, b[2] = this.tx, b[3] = this.b, b[4] = this.d, b[5] = this.ty, b[6] = 0, b[7] = 0, b[8] = 1), b + }, + apply: function(a, b) { + return void 0 === b && (b = new c.Point), b.x = this.a * a.x + this.c * a.y + this.tx, b.y = this.b * a.x + this.d * a.y + this.ty, b + }, + applyInverse: function(a, b) { + void 0 === b && (b = new c.Point); + var d = 1 / (this.a * this.d + this.c * -this.b), + e = a.x, + f = a.y; + return b.x = this.d * d * e + -this.c * d * f + (this.ty * this.c - this.tx * this.d) * d, b.y = this.a * d * f + -this.b * d * e + (-this.ty * this.a + this.tx * this.b) * d, b + }, + translate: function(a, b) { + return this.tx += a, this.ty += b, this + }, + scale: function(a, b) { + return this.a *= a, this.d *= b, + this.c *= a, this.b *= b, this.tx *= a, this.ty *= b, this + }, + rotate: function(a) { + var b = Math.cos(a), + c = Math.sin(a), + d = this.a, + e = this.c, + f = this.tx; + return this.a = d * b - this.b * c, this.b = d * c + this.b * b, this.c = e * b - this.d * c, this.d = e * c + this.d * b, this.tx = f * b - this.ty * c, this.ty = f * c + this.ty * b, this + }, + append: function(a) { + var b = this.a, + c = this.b, + d = this.c, + e = this.d; + return this.a = a.a * b + a.b * d, this.b = a.a * c + a.b * e, this.c = a.c * b + a.d * d, this.d = a.c * c + a.d * e, this.tx = a.tx * b + a.ty * d + this.tx, this.ty = a.tx * c + a.ty * e + this.ty, this + }, + identity: function() { + return this.setTo(1, 0, 0, 1, 0, 0) + } + }, c.identityMatrix = new c.Matrix, PIXI.Matrix = c.Matrix, PIXI.identityMatrix = c.identityMatrix, c.Point = function(a, b) { + a = a || 0, b = b || 0, this.x = a, this.y = b, this.type = c.POINT + }, c.Point.prototype = { + copyFrom: function(a) { + return this.setTo(a.x, a.y) + }, + invert: function() { + return this.setTo(this.y, this.x) + }, + setTo: function(a, b) { + return this.x = a || 0, this.y = b || (0 !== b ? this.x : 0), this + }, + set: function(a, b) { + return this.x = a || 0, this.y = b || (0 !== b ? this.x : 0), this + }, + add: function(a, b) { + return this.x += a, this.y += b, this + }, + subtract: function(a, b) { + return this.x -= a, this.y -= b, this + }, + multiply: function(a, b) { + return this.x *= a, this.y *= b, this + }, + divide: function(a, b) { + return this.x /= a, this.y /= b, this + }, + clampX: function(a, b) { + return this.x = c.Math.clamp(this.x, a, b), this + }, + clampY: function(a, b) { + return this.y = c.Math.clamp(this.y, a, b), this + }, + clamp: function(a, b) { + return this.x = c.Math.clamp(this.x, a, b), this.y = c.Math.clamp(this.y, a, b), this + }, + clone: function(a) { + return void 0 === a || null === a ? a = new c.Point(this.x, this.y) : a.setTo(this.x, this.y), a + }, + copyTo: function(a) { + return a.x = this.x, a.y = this.y, a + }, + distance: function(a, b) { + return c.Point.distance(this, a, b) + }, + equals: function(a) { + return a.x === this.x && a.y === this.y + }, + angle: function(a, b) { + return void 0 === b && (b = !1), b ? c.Math.radToDeg(Math.atan2(a.y - this.y, a.x - this.x)) : Math.atan2(a.y - this.y, a.x - this.x) + }, + rotate: function(a, b, d, e, f) { + return c.Point.rotate(this, a, b, d, e, f) + }, + getMagnitude: function() { + return Math.sqrt(this.x * this.x + this.y * this.y) + }, + getMagnitudeSq: function() { + return this.x * this.x + this.y * this.y + }, + setMagnitude: function(a) { + return this.normalize().multiply(a, a) + }, + normalize: function() { + if (!this.isZero()) { + var a = this.getMagnitude(); + this.x /= a, this.y /= a + } + return this + }, + isZero: function() { + return 0 === this.x && 0 === this.y + }, + dot: function(a) { + return this.x * a.x + this.y * a.y + }, + cross: function(a) { + return this.x * a.y - this.y * a.x + }, + perp: function() { + return this.setTo(-this.y, this.x) + }, + rperp: function() { + return this.setTo(this.y, -this.x) + }, + normalRightHand: function() { + return this.setTo(this.y * -1, this.x) + }, + floor: function() { + return this.setTo(Math.floor(this.x), Math.floor(this.y)) + }, + ceil: function() { + return this.setTo(Math.ceil(this.x), Math.ceil(this.y)) + }, + toString: function() { + return "[{Point (x=" + this.x + " y=" + this.y + ")}]" + } + }, c.Point.prototype.constructor = c.Point, c.Point.add = function(a, b, d) { + return void 0 === d && (d = new c.Point), d.x = a.x + b.x, d.y = a.y + b.y, d + }, c.Point.subtract = function(a, b, d) { + return void 0 === d && (d = new c.Point), d.x = a.x - b.x, d.y = a.y - b.y, d + }, c.Point.multiply = function(a, b, d) { + return void 0 === d && (d = new c.Point), d.x = a.x * b.x, d.y = a.y * b.y, d + }, c.Point.divide = function(a, b, d) { + return void 0 === d && (d = new c.Point), d.x = a.x / b.x, d.y = a.y / b.y, d + }, c.Point.equals = function(a, b) { + return a.x === b.x && a.y === b.y + }, c.Point.angle = function(a, b) { + return Math.atan2(a.y - b.y, a.x - b.x) + }, c.Point.negative = function(a, b) { + return void 0 === b && (b = new c.Point), b.setTo(-a.x, -a.y) + }, c.Point.multiplyAdd = function(a, b, d, e) { + return void 0 === e && (e = new c.Point), e.setTo(a.x + b.x * d, a.y + b.y * d) + }, c.Point.interpolate = function(a, b, d, e) { + return void 0 === e && (e = new c.Point), e.setTo(a.x + (b.x - a.x) * d, a.y + (b.y - a.y) * d) + }, c.Point.perp = function(a, b) { + return void 0 === b && (b = new c.Point), b.setTo(-a.y, a.x) + }, c.Point.rperp = function(a, b) { + return void 0 === b && (b = new c.Point), b.setTo(a.y, -a.x) + }, c.Point.distance = function(a, b, d) { + var e = c.Math.distance(a.x, a.y, b.x, b.y); + return d ? Math.round(e) : e + }, c.Point.project = function(a, b, d) { + void 0 === d && (d = new c.Point); + var e = a.dot(b) / b.getMagnitudeSq(); + return 0 !== e && d.setTo(e * b.x, e * b.y), d + }, c.Point.projectUnit = function(a, b, d) { + void 0 === d && (d = new c.Point); + var e = a.dot(b); + return 0 !== e && d.setTo(e * b.x, e * b.y), d + }, c.Point.normalRightHand = function(a, b) { + return void 0 === b && (b = new c.Point), b.setTo(a.y * -1, a.x) + }, c.Point.normalize = function(a, b) { + void 0 === b && (b = new c.Point); + var d = a.getMagnitude(); + return 0 !== d && b.setTo(a.x / d, a.y / d), b + }, c.Point.rotate = function(a, b, d, e, f, g) { + if (f && (e = c.Math.degToRad(e)), void 0 === g) { + a.subtract(b, d); + var h = Math.sin(e), + i = Math.cos(e), + j = i * a.x - h * a.y, + k = h * a.x + i * a.y; + a.x = j + b, a.y = k + d + } else { + var l = e + Math.atan2(a.y - d, a.x - b); + a.x = b + g * Math.cos(l), a.y = d + g * Math.sin(l) + } + return a + }, c.Point.centroid = function(a, b) { + if (void 0 === b && (b = new c.Point), "[object Array]" !== Object.prototype.toString.call(a)) throw new Error("Phaser.Point. Parameter 'points' must be an array"); + var d = a.length; + if (d < 1) throw new Error("Phaser.Point. Parameter 'points' array must not be empty"); + if (1 === d) return b.copyFrom(a[0]), b; + for (var e = 0; e < d; e++) c.Point.add(b, a[e], b); + return b.divide(d, d), b + }, c.Point.parse = function(a, b, d) { + b = b || "x", d = d || "y"; + var e = new c.Point; + return a[b] && (e.x = parseInt(a[b], 10)), a[d] && (e.y = parseInt(a[d], 10)), e + }, PIXI.Point = c.Point, c.Polygon = function() { + this.area = 0, this._points = [], arguments.length > 0 && this.setTo.apply(this, arguments), this.closed = !0, this.flattened = !1, this.type = c.POLYGON + }, c.Polygon.prototype = { + toNumberArray: function(a) { + void 0 === a && (a = []); + for (var b = 0; b < this._points.length; b++) "number" == typeof this._points[b] ? (a.push(this._points[b]), a.push(this._points[b + 1]), b++) : (a.push(this._points[b].x), a.push(this._points[b].y)); + return a + }, + flatten: function() { + return this._points = this.toNumberArray(), this.flattened = !0, this + }, + clone: function(a) { + var b = this._points.slice(); + return void 0 === a || null === a ? a = new c.Polygon(b) : a.setTo(b), a + }, + contains: function(a, b) { + var c = !1; + if (this.flattened) + for (var d = -2, e = this._points.length - 2; + (d += 2) < this._points.length; e = d) { + var f = this._points[d], + g = this._points[d + 1], + h = this._points[e], + i = this._points[e + 1]; + (g <= b && b < i || i <= b && b < g) && a < (h - f) * (b - g) / (i - g) + f && (c = !c) + } else + for (var d = -1, e = this._points.length - 1; ++d < this._points.length; e = d) { + var f = this._points[d].x, + g = this._points[d].y, + h = this._points[e].x, + i = this._points[e].y; + (g <= b && b < i || i <= b && b < g) && a < (h - f) * (b - g) / (i - g) + f && (c = !c) + } + return c + }, + setTo: function(a) { + if (this.area = 0, this._points = [], arguments.length > 0) { + Array.isArray(a) || (a = Array.prototype.slice.call(arguments)); + for (var b = Number.MAX_VALUE, c = 0, d = a.length; c < d; c++) { + if ("number" == typeof a[c]) { + var e = new PIXI.Point(a[c], a[c + 1]); + c++ + } else if (Array.isArray(a[c])) var e = new PIXI.Point(a[c][0], a[c][1]); + else var e = new PIXI.Point(a[c].x, a[c].y); + this._points.push(e), e.y < b && (b = e.y) + } + this.calculateArea(b) + } + return this + }, + calculateArea: function(a) { + for (var b, c, d, e, f = 0, g = this._points.length; f < g; f++) b = this._points[f], c = f === g - 1 ? this._points[0] : this._points[f + 1], d = (b.y - a + (c.y - a)) / 2, e = b.x - c.x, this.area += d * e; + return this.area + } + }, c.Polygon.prototype.constructor = c.Polygon, Object.defineProperty(c.Polygon.prototype, "points", { + get: function() { + return this._points + }, + set: function(a) { + null != a ? this.setTo(a) : this.setTo() + } + }), PIXI.Polygon = c.Polygon, c.Rectangle = function(a, b, d, e) { + a = a || 0, b = b || 0, d = d || 0, e = e || 0, this.x = a, this.y = b, this.width = d, this.height = e, this.type = c.RECTANGLE + }, c.Rectangle.prototype = { + offset: function(a, b) { + return this.x += a, this.y += b, this + }, + offsetPoint: function(a) { + return this.offset(a.x, a.y) + }, + setTo: function(a, b, c, d) { + return this.x = a, this.y = b, this.width = c, this.height = d, this + }, + scale: function(a, b) { + return void 0 === b && (b = a), this.width *= a, this.height *= b, this + }, + centerOn: function(a, b) { + return this.centerX = a, this.centerY = b, this + }, + floor: function() { + this.x = Math.floor(this.x), this.y = Math.floor(this.y) + }, + floorAll: function() { + this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.width = Math.floor(this.width), this.height = Math.floor(this.height) + }, + ceil: function() { + this.x = Math.ceil(this.x), this.y = Math.ceil(this.y) + }, + ceilAll: function() { + this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.width = Math.ceil(this.width), this.height = Math.ceil(this.height) + }, + copyFrom: function(a) { + return this.setTo(a.x, a.y, a.width, a.height) + }, + copyTo: function(a) { + return a.x = this.x, a.y = this.y, a.width = this.width, a.height = this.height, a + }, + inflate: function(a, b) { + return c.Rectangle.inflate(this, a, b) + }, + size: function(a) { + return c.Rectangle.size(this, a) + }, + resize: function(a, b) { + return this.width = a, this.height = b, this + }, + clone: function(a) { + return c.Rectangle.clone(this, a) + }, + contains: function(a, b) { + return c.Rectangle.contains(this, a, b) + }, + containsRect: function(a) { + return c.Rectangle.containsRect(a, this) + }, + equals: function(a) { + return c.Rectangle.equals(this, a) + }, + intersection: function(a, b) { + return c.Rectangle.intersection(this, a, b) + }, + intersects: function(a) { + return c.Rectangle.intersects(this, a) + }, + intersectsRaw: function(a, b, d, e, f) { + return c.Rectangle.intersectsRaw(this, a, b, d, e, f) + }, + union: function(a, b) { + return c.Rectangle.union(this, a, b) + }, + random: function(a) { + return void 0 === a && (a = new c.Point), a.x = this.randomX, a.y = this.randomY, a + }, + getPoint: function(a, b) { + switch (void 0 === b && (b = new c.Point), a) { + default: + case c.TOP_LEFT: + return b.set(this.x, this.y); + case c.TOP_CENTER: + return b.set(this.centerX, this.y); + case c.TOP_RIGHT: + return b.set(this.right, this.y); + case c.LEFT_CENTER: + return b.set(this.x, this.centerY); + case c.CENTER: + return b.set(this.centerX, this.centerY); + case c.RIGHT_CENTER: + return b.set(this.right, this.centerY); + case c.BOTTOM_LEFT: + return b.set(this.x, this.bottom); + case c.BOTTOM_CENTER: + return b.set(this.centerX, this.bottom); + case c.BOTTOM_RIGHT: + return b.set(this.right, this.bottom) + } + }, + toString: function() { + return "[{Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + " empty=" + this.empty + ")}]" + } + }, Object.defineProperty(c.Rectangle.prototype, "halfWidth", { + get: function() { + return Math.round(this.width / 2) + } + }), Object.defineProperty(c.Rectangle.prototype, "halfHeight", { + get: function() { + return Math.round(this.height / 2) + } + }), Object.defineProperty(c.Rectangle.prototype, "bottom", { + get: function() { + return this.y + this.height + }, + set: function(a) { + a <= this.y ? this.height = 0 : this.height = a - this.y + } + }), Object.defineProperty(c.Rectangle.prototype, "bottomLeft", { + get: function() { + return new c.Point(this.x, this.bottom) + }, + set: function(a) { + this.x = a.x, this.bottom = a.y + } + }), Object.defineProperty(c.Rectangle.prototype, "bottomRight", { + get: function() { + return new c.Point(this.right, this.bottom) + }, + set: function(a) { + this.right = a.x, this.bottom = a.y + } + }), Object.defineProperty(c.Rectangle.prototype, "left", { + get: function() { + return this.x + }, + set: function(a) { + a >= this.right ? this.width = 0 : this.width = this.right - a, this.x = a + } + }), Object.defineProperty(c.Rectangle.prototype, "right", { + get: function() { + return this.x + this.width + }, + set: function(a) { + a <= this.x ? this.width = 0 : this.width = a - this.x + } + }), Object.defineProperty(c.Rectangle.prototype, "volume", { + get: function() { + return this.width * this.height + } + }), Object.defineProperty(c.Rectangle.prototype, "perimeter", { + get: function() { + return 2 * this.width + 2 * this.height + } + }), Object.defineProperty(c.Rectangle.prototype, "centerX", { + get: function() { + return this.x + this.halfWidth + }, + set: function(a) { + this.x = a - this.halfWidth + } + }), Object.defineProperty(c.Rectangle.prototype, "centerY", { + get: function() { + return this.y + this.halfHeight + }, + set: function(a) { + this.y = a - this.halfHeight + } + }), Object.defineProperty(c.Rectangle.prototype, "randomX", { + get: function() { + return this.x + Math.random() * this.width + } + }), Object.defineProperty(c.Rectangle.prototype, "randomY", { + get: function() { + return this.y + Math.random() * this.height + } + }), Object.defineProperty(c.Rectangle.prototype, "top", { + get: function() { + return this.y + }, + set: function(a) { + a >= this.bottom ? (this.height = 0, this.y = a) : this.height = this.bottom - a + } + }), Object.defineProperty(c.Rectangle.prototype, "topLeft", { + get: function() { + return new c.Point(this.x, this.y) + }, + set: function(a) { + this.x = a.x, this.y = a.y + } + }), Object.defineProperty(c.Rectangle.prototype, "topRight", { + get: function() { + return new c.Point(this.x + this.width, this.y) + }, + set: function(a) { + this.right = a.x, this.y = a.y + } + }), Object.defineProperty(c.Rectangle.prototype, "empty", { + get: function() { + return !this.width || !this.height + }, + set: function(a) { + a === !0 && this.setTo(0, 0, 0, 0) + } + }), c.Rectangle.prototype.constructor = c.Rectangle, c.Rectangle.inflate = function(a, b, c) { + return a.x -= b, a.width += 2 * b, a.y -= c, a.height += 2 * c, a + }, c.Rectangle.inflatePoint = function(a, b) { + return c.Rectangle.inflate(a, b.x, b.y) + }, c.Rectangle.size = function(a, b) { + return void 0 === b || null === b ? b = new c.Point(a.width, a.height) : b.setTo(a.width, a.height), b + }, c.Rectangle.clone = function(a, b) { + return void 0 === b || null === b ? b = new c.Rectangle(a.x, a.y, a.width, a.height) : b.setTo(a.x, a.y, a.width, a.height), b + }, c.Rectangle.contains = function(a, b, c) { + return !(a.width <= 0 || a.height <= 0) && (b >= a.x && b < a.right && c >= a.y && c < a.bottom) + }, c.Rectangle.containsRaw = function(a, b, c, d, e, f) { + return e >= a && e < a + c && f >= b && f < b + d + }, c.Rectangle.containsPoint = function(a, b) { + return c.Rectangle.contains(a, b.x, b.y) + }, c.Rectangle.containsRect = function(a, b) { + return !(a.volume > b.volume) && (a.x >= b.x && a.y >= b.y && a.right < b.right && a.bottom < b.bottom) + }, c.Rectangle.equals = function(a, b) { + return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height + }, c.Rectangle.sameDimensions = function(a, b) { + return a.width === b.width && a.height === b.height + }, c.Rectangle.intersection = function(a, b, d) { + return void 0 === d && (d = new c.Rectangle), c.Rectangle.intersects(a, b) && (d.x = Math.max(a.x, b.x), d.y = Math.max(a.y, b.y), d.width = Math.min(a.right, b.right) - d.x, d.height = Math.min(a.bottom, b.bottom) - d.y), d + }, c.Rectangle.intersects = function(a, b) { + return !(a.width <= 0 || a.height <= 0 || b.width <= 0 || b.height <= 0) && !(a.right < b.x || a.bottom < b.y || a.x > b.right || a.y > b.bottom) + }, c.Rectangle.intersectsRaw = function(a, b, c, d, e, f) { + return void 0 === f && (f = 0), !(b > a.right + f || c < a.left - f || d > a.bottom + f || e < a.top - f) + }, c.Rectangle.union = function(a, b, d) { + return void 0 === d && (d = new c.Rectangle), d.setTo(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.max(a.right, b.right) - Math.min(a.left, b.left), Math.max(a.bottom, b.bottom) - Math.min(a.top, b.top)) + }, c.Rectangle.aabb = function(a, b) { + void 0 === b && (b = new c.Rectangle); + var d = Number.NEGATIVE_INFINITY, + e = Number.POSITIVE_INFINITY, + f = Number.NEGATIVE_INFINITY, + g = Number.POSITIVE_INFINITY; + return a.forEach(function(a) { + a.x > d && (d = a.x), a.x < e && (e = a.x), a.y > f && (f = a.y), a.y < g && (g = a.y) + }), b.setTo(e, g, d - e, f - g), b + }, PIXI.Rectangle = c.Rectangle, PIXI.EmptyRectangle = new c.Rectangle(0, 0, 0, 0), c.RoundedRectangle = function(a, b, d, e, f) { + void 0 === a && (a = 0), void 0 === b && (b = 0), void 0 === d && (d = 0), void 0 === e && (e = 0), void 0 === f && (f = 20), this.x = a, this.y = b, this.width = d, this.height = e, this.radius = f || 20, this.type = c.ROUNDEDRECTANGLE + }, c.RoundedRectangle.prototype = { + clone: function() { + return new c.RoundedRectangle(this.x, this.y, this.width, this.height, this.radius) + }, + contains: function(a, b) { + if (this.width <= 0 || this.height <= 0) return !1; + var c = this.x; + if (a >= c && a <= c + this.width) { + var d = this.y; + if (b >= d && b <= d + this.height) return !0 + } + return !1 + } + }, c.RoundedRectangle.prototype.constructor = c.RoundedRectangle, PIXI.RoundedRectangle = c.RoundedRectangle, c.Camera = function(a, b, d, e, f, g) { + this.game = a, this.world = a.world, this.id = 0, this.view = new c.Rectangle(d, e, f, g), this.bounds = new c.Rectangle(d, e, f, g), this.deadzone = null, this.visible = !0, this.roundPx = !0, this.atLimit = { + x: !1, + y: !1 + }, this.target = null, this.displayObject = null, this.scale = null, this.totalInView = 0, this.lerp = new c.Point(1, 1), this.onShakeComplete = new c.Signal, this.onFlashComplete = new c.Signal, this.onFadeComplete = new c.Signal, this.fx = null, this._targetPosition = new c.Point, this._edge = 0, this._position = new c.Point, this._shake = { + intensity: 0, + duration: 0, + horizontal: !1, + vertical: !1, + shakeBounds: !0, + x: 0, + y: 0 + }, this._fxDuration = 0, this._fxType = 0 + }, c.Camera.FOLLOW_LOCKON = 0, c.Camera.FOLLOW_PLATFORMER = 1, c.Camera.FOLLOW_TOPDOWN = 2, c.Camera.FOLLOW_TOPDOWN_TIGHT = 3, c.Camera.SHAKE_BOTH = 4, c.Camera.SHAKE_HORIZONTAL = 5, c.Camera.SHAKE_VERTICAL = 6, c.Camera.ENABLE_FX = !0, c.Camera.prototype = { + boot: function() { + this.displayObject = this.game.world, this.scale = this.game.world.scale, this.game.camera = this, c.Graphics && c.Camera.ENABLE_FX && (this.fx = new c.Graphics(this.game), this.game.stage.addChild(this.fx)) + }, + preUpdate: function() { + this.totalInView = 0 + }, + follow: function(a, b, d, e) { + void 0 === b && (b = c.Camera.FOLLOW_LOCKON), void 0 === d && (d = 1), void 0 === e && (e = 1), this.target = a, this.lerp.set(d, e); + var f; + switch (b) { + case c.Camera.FOLLOW_PLATFORMER: + var g = this.width / 8, + h = this.height / 3; + this.deadzone = new c.Rectangle((this.width - g) / 2, (this.height - h) / 2 - .25 * h, g, h); + break; + case c.Camera.FOLLOW_TOPDOWN: + f = Math.max(this.width, this.height) / 4, this.deadzone = new c.Rectangle((this.width - f) / 2, (this.height - f) / 2, f, f); + break; + case c.Camera.FOLLOW_TOPDOWN_TIGHT: + f = Math.max(this.width, this.height) / 8, this.deadzone = new c.Rectangle((this.width - f) / 2, (this.height - f) / 2, f, f); + break; + case c.Camera.FOLLOW_LOCKON: + this.deadzone = null; + break; + default: + this.deadzone = null + } + }, + unfollow: function() { + this.target = null + }, + focusOn: function(a) { + this.setPosition(Math.round(a.x - this.view.halfWidth), Math.round(a.y - this.view.halfHeight)) + }, + focusOnXY: function(a, b) { + this.setPosition(Math.round(a - this.view.halfWidth), Math.round(b - this.view.halfHeight)) + }, + shake: function(a, b, d, e, f) { + return void 0 === a && (a = .05), void 0 === b && (b = 500), void 0 === d && (d = !0), void 0 === e && (e = c.Camera.SHAKE_BOTH), void 0 === f && (f = !0), !(!d && this._shake.duration > 0) && (this._shake.intensity = a, this._shake.duration = b, this._shake.shakeBounds = f, this._shake.x = 0, this._shake.y = 0, this._shake.horizontal = e === c.Camera.SHAKE_BOTH || e === c.Camera.SHAKE_HORIZONTAL, this._shake.vertical = e === c.Camera.SHAKE_BOTH || e === c.Camera.SHAKE_VERTICAL, !0) + }, + flash: function(a, b, c) { + return void 0 === a && (a = 16777215), void 0 === b && (b = 500), void 0 === c && (c = !1), !(!this.fx || !c && this._fxDuration > 0) && (this.fx.clear(), this.fx.beginFill(a), this.fx.drawRect(0, 0, this.width, this.height), this.fx.endFill(), this.fx.alpha = 1, this._fxDuration = b, this._fxType = 0, !0) + }, + fade: function(a, b, c) { + return void 0 === a && (a = 0), void 0 === b && (b = 500), void 0 === c && (c = !1), !(!this.fx || !c && this._fxDuration > 0) && (this.fx.clear(), this.fx.beginFill(a), this.fx.drawRect(0, 0, this.width, this.height), this.fx.endFill(), this.fx.alpha = 0, this._fxDuration = b, this._fxType = 1, !0) + }, + update: function() { + this._fxDuration > 0 && this.updateFX(), this._shake.duration > 0 && this.updateShake(), this.bounds && this.checkBounds(), this.roundPx && (this.view.floor(), this._shake.x = Math.floor(this._shake.x), this._shake.y = Math.floor(this._shake.y)), this.displayObject.position.x = -this.view.x, this.displayObject.position.y = -this.view.y + }, + updateFX: function() { + 0 === this._fxType ? (this.fx.alpha -= this.game.time.elapsedMS / this._fxDuration, this.fx.alpha <= 0 && (this._fxDuration = 0, this.fx.alpha = 0, this.onFlashComplete.dispatch())) : (this.fx.alpha += this.game.time.elapsedMS / this._fxDuration, this.fx.alpha >= 1 && (this._fxDuration = 0, this.fx.alpha = 1, this.onFadeComplete.dispatch())) + }, + updateShake: function() { + this._shake.duration -= this.game.time.elapsedMS, this._shake.duration <= 0 ? (this.onShakeComplete.dispatch(), this._shake.x = 0, this._shake.y = 0) : (this._shake.horizontal && (this._shake.x = this.game.rnd.frac() * this._shake.intensity * this.view.width * 2 - this._shake.intensity * this.view.width), this._shake.vertical && (this._shake.y = this.game.rnd.frac() * this._shake.intensity * this.view.height * 2 - this._shake.intensity * this.view.height)) + }, + updateTarget: function() { + this._targetPosition.x = this.view.x + this.target.worldPosition.x, this._targetPosition.y = this.view.y + this.target.worldPosition.y, this.deadzone ? (this._edge = this._targetPosition.x - this.view.x, this._edge < this.deadzone.left ? this.view.x = this.game.math.linear(this.view.x, this._targetPosition.x - this.deadzone.left, this.lerp.x) : this._edge > this.deadzone.right && (this.view.x = this.game.math.linear(this.view.x, this._targetPosition.x - this.deadzone.right, this.lerp.x)), this._edge = this._targetPosition.y - this.view.y, this._edge < this.deadzone.top ? this.view.y = this.game.math.linear(this.view.y, this._targetPosition.y - this.deadzone.top, this.lerp.y) : this._edge > this.deadzone.bottom && (this.view.y = this.game.math.linear(this.view.y, this._targetPosition.y - this.deadzone.bottom, this.lerp.y))) : (this.view.x = this.game.math.linear(this.view.x, this._targetPosition.x - this.view.halfWidth, this.lerp.x), this.view.y = this.game.math.linear(this.view.y, this._targetPosition.y - this.view.halfHeight, this.lerp.y)), this.bounds && this.checkBounds(), this.roundPx && this.view.floor(), this.displayObject.position.x = -this.view.x, this.displayObject.position.y = -this.view.y + }, + setBoundsToWorld: function() { + this.bounds && this.bounds.copyFrom(this.game.world.bounds) + }, + checkBounds: function() { + this.atLimit.x = !1, this.atLimit.y = !1; + var a = this.view.x + this._shake.x, + b = this.view.right + this._shake.x, + c = this.view.y + this._shake.y, + d = this.view.bottom + this._shake.y; + a <= this.bounds.x * this.scale.x && (this.atLimit.x = !0, this.view.x = this.bounds.x * this.scale.x, this._shake.shakeBounds || (this._shake.x = 0)), b >= this.bounds.right * this.scale.x && (this.atLimit.x = !0, this.view.x = this.bounds.right * this.scale.x - this.width, this._shake.shakeBounds || (this._shake.x = 0)), c <= this.bounds.top * this.scale.y && (this.atLimit.y = !0, this.view.y = this.bounds.top * this.scale.y, this._shake.shakeBounds || (this._shake.y = 0)), d >= this.bounds.bottom * this.scale.y && (this.atLimit.y = !0, this.view.y = this.bounds.bottom * this.scale.y - this.height, this._shake.shakeBounds || (this._shake.y = 0)) + }, + setPosition: function(a, b) { + this.view.x = a, this.view.y = b, this.bounds && this.checkBounds() + }, + setSize: function(a, b) { + this.view.width = a, this.view.height = b + }, + reset: function() { + this.target = null, this.view.x = 0, this.view.y = 0, this._shake.duration = 0, this.resetFX() + }, + resetFX: function() { + this.fx.clear(), this.fx.alpha = 0, this._fxDuration = 0 + } + }, c.Camera.prototype.constructor = c.Camera, Object.defineProperty(c.Camera.prototype, "x", { + get: function() { + return this.view.x + }, + set: function(a) { + this.view.x = a, this.bounds && this.checkBounds() + } + }), Object.defineProperty(c.Camera.prototype, "y", { + get: function() { + return this.view.y + }, + set: function(a) { + this.view.y = a, this.bounds && this.checkBounds() + } + }), Object.defineProperty(c.Camera.prototype, "position", { + get: function() { + return this._position.set(this.view.x, this.view.y), this._position + }, + set: function(a) { + "undefined" != typeof a.x && (this.view.x = a.x), "undefined" != typeof a.y && (this.view.y = a.y), this.bounds && this.checkBounds() + } + }), Object.defineProperty(c.Camera.prototype, "width", { + get: function() { + return this.view.width + }, + set: function(a) { + this.view.width = a + } + }), Object.defineProperty(c.Camera.prototype, "height", { + get: function() { + return this.view.height + }, + set: function(a) { + this.view.height = a + } + }), Object.defineProperty(c.Camera.prototype, "shakeIntensity", { + get: function() { + return this._shake.intensity + }, + set: function(a) { + this._shake.intensity = a + } + }), c.State = function() { + this.game = null, this.key = "", this.add = null, this.make = null, this.camera = null, this.cache = null, this.input = null, this.load = null, this.math = null, this.sound = null, this.scale = null, this.stage = null, this.state = null, this.time = null, this.tweens = null, this.world = null, this.particles = null, this.physics = null, this.rnd = null + }, c.State.prototype = { + init: function() {}, + preload: function() {}, + loadUpdate: function() {}, + loadRender: function() {}, + create: function() {}, + update: function() {}, + preRender: function() {}, + render: function() {}, + resize: function() {}, + paused: function() {}, + resumed: function() {}, + pauseUpdate: function() {}, + shutdown: function() {} + }, c.State.prototype.constructor = c.State, c.StateManager = function(a, b) { + this.game = a, this.states = {}, this._pendingState = null, "undefined" != typeof b && null !== b && (this._pendingState = b), this._clearWorld = !1, this._clearCache = !1, this._created = !1, this._args = [], this.current = "", this.onStateChange = new c.Signal, this.onInitCallback = null, this.onPreloadCallback = null, this.onCreateCallback = null, this.onUpdateCallback = null, this.onRenderCallback = null, this.onResizeCallback = null, this.onPreRenderCallback = null, this.onLoadUpdateCallback = null, this.onLoadRenderCallback = null, this.onPausedCallback = null, this.onResumedCallback = null, this.onPauseUpdateCallback = null, this.onShutDownCallback = null + }, c.StateManager.prototype = { + boot: function() { + this.game.onPause.add(this.pause, this), this.game.onResume.add(this.resume, this), null !== this._pendingState && "string" != typeof this._pendingState && this.add("default", this._pendingState, !0) + }, + add: function(a, b, d) { + void 0 === d && (d = !1); + var e; + return b instanceof c.State ? e = b : "object" == typeof b ? (e = b, e.game = this.game) : "function" == typeof b && (e = new b(this.game)), this.states[a] = e, d && (this.game.isBooted ? this.start(a) : this._pendingState = a), e + }, + remove: function(a) { + this.current === a && (this.callbackContext = null, this.onInitCallback = null, this.onShutDownCallback = null, this.onPreloadCallback = null, this.onLoadRenderCallback = null, this.onLoadUpdateCallback = null, this.onCreateCallback = null, this.onUpdateCallback = null, this.onPreRenderCallback = null, this.onRenderCallback = null, this.onResizeCallback = null, this.onPausedCallback = null, this.onResumedCallback = null, this.onPauseUpdateCallback = null), delete this.states[a] + }, + start: function(a, b, c) { + void 0 === b && (b = !0), void 0 === c && (c = !1), this.checkState(a) && (this._pendingState = a, this._clearWorld = b, this._clearCache = c, arguments.length > 3 && (this._args = Array.prototype.splice.call(arguments, 3))) + }, + restart: function(a, b) { + void 0 === a && (a = !0), void 0 === b && (b = !1), this._pendingState = this.current, this._clearWorld = a, this._clearCache = b, arguments.length > 2 && (this._args = Array.prototype.slice.call(arguments, 2)) + }, + dummy: function() {}, + preUpdate: function() { + if (this._pendingState && this.game.isBooted) { + var a = this.current; + if (this.clearCurrentState(), this.setCurrentState(this._pendingState), this.onStateChange.dispatch(this.current, a), this.current !== this._pendingState) return; + this._pendingState = null, this.onPreloadCallback ? (this.game.load.reset(!0), this.onPreloadCallback.call(this.callbackContext, this.game), 0 === this.game.load.totalQueuedFiles() && 0 === this.game.load.totalQueuedPacks() ? this.loadComplete() : this.game.load.start()) : this.loadComplete() + } + }, + clearCurrentState: function() { + this.current && (this.onShutDownCallback && this.onShutDownCallback.call(this.callbackContext, this.game), this.game.tweens.removeAll(), this.game.camera.reset(), this.game.input.reset(!0), this.game.physics.clear(), this.game.time.removeAll(), this.game.scale.reset(this._clearWorld), this.game.debug && this.game.debug.reset(), this._clearWorld && (this.game.world.shutdown(), this._clearCache && this.game.cache.destroy())) + }, + checkState: function(a) { + return this.states[a] ? !!(this.states[a].preload || this.states[a].create || this.states[a].update || this.states[a].render) || (console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render"), !1) : (console.warn("Phaser.StateManager - No state found with the key: " + a), !1) + }, + link: function(a) { + this.states[a].game = this.game, this.states[a].add = this.game.add, this.states[a].make = this.game.make, this.states[a].camera = this.game.camera, this.states[a].cache = this.game.cache, this.states[a].input = this.game.input, this.states[a].load = this.game.load, this.states[a].math = this.game.math, this.states[a].sound = this.game.sound, this.states[a].scale = this.game.scale, this.states[a].state = this, this.states[a].stage = this.game.stage, this.states[a].time = this.game.time, this.states[a].tweens = this.game.tweens, this.states[a].world = this.game.world, this.states[a].particles = this.game.particles, this.states[a].rnd = this.game.rnd, this.states[a].physics = this.game.physics, this.states[a].key = a + }, + unlink: function(a) { + this.states[a] && (this.states[a].game = null, this.states[a].add = null, this.states[a].make = null, this.states[a].camera = null, this.states[a].cache = null, this.states[a].input = null, this.states[a].load = null, this.states[a].math = null, this.states[a].sound = null, this.states[a].scale = null, this.states[a].state = null, this.states[a].stage = null, this.states[a].time = null, this.states[a].tweens = null, this.states[a].world = null, this.states[a].particles = null, this.states[a].rnd = null, this.states[a].physics = null) + }, + setCurrentState: function(a) { + this.callbackContext = this.states[a], this.link(a), this.onInitCallback = this.states[a].init || this.dummy, this.onPreloadCallback = this.states[a].preload || null, this.onLoadRenderCallback = this.states[a].loadRender || null, this.onLoadUpdateCallback = this.states[a].loadUpdate || null, this.onCreateCallback = this.states[a].create || null, this.onUpdateCallback = this.states[a].update || null, this.onPreRenderCallback = this.states[a].preRender || null, this.onRenderCallback = this.states[a].render || null, this.onResizeCallback = this.states[a].resize || null, this.onPausedCallback = this.states[a].paused || null, this.onResumedCallback = this.states[a].resumed || null, this.onPauseUpdateCallback = this.states[a].pauseUpdate || null, this.onShutDownCallback = this.states[a].shutdown || this.dummy, "" !== this.current && this.game.physics.reset(), this.current = a, this._created = !1, this.onInitCallback.apply(this.callbackContext, this._args), a === this._pendingState && (this._args = []), this.game._kickstart = !0 + }, + getCurrentState: function() { + return this.states[this.current] + }, + loadComplete: function() { + this._created === !1 && this.onLoadUpdateCallback && this.onLoadUpdateCallback.call(this.callbackContext, this.game), this._created === !1 && this.onCreateCallback ? (this._created = !0, this.onCreateCallback.call(this.callbackContext, this.game)) : this._created = !0 + }, + pause: function() { + this._created && this.onPausedCallback && this.onPausedCallback.call(this.callbackContext, this.game) + }, + resume: function() { + this._created && this.onResumedCallback && this.onResumedCallback.call(this.callbackContext, this.game) + }, + update: function() { + this._created ? this.onUpdateCallback && this.onUpdateCallback.call(this.callbackContext, this.game) : this.onLoadUpdateCallback && this.onLoadUpdateCallback.call(this.callbackContext, this.game) + }, + pauseUpdate: function() { + this._created ? this.onPauseUpdateCallback && this.onPauseUpdateCallback.call(this.callbackContext, this.game) : this.onLoadUpdateCallback && this.onLoadUpdateCallback.call(this.callbackContext, this.game) + }, + preRender: function(a) { + this._created && this.onPreRenderCallback && this.onPreRenderCallback.call(this.callbackContext, this.game, a) + }, + resize: function(a, b) { + this.onResizeCallback && this.onResizeCallback.call(this.callbackContext, a, b) + }, + render: function() { + this._created ? this.onRenderCallback && (this.game.renderType === c.CANVAS ? (this.game.context.save(), this.game.context.setTransform(1, 0, 0, 1, 0, 0), this.onRenderCallback.call(this.callbackContext, this.game), this.game.context.restore()) : this.onRenderCallback.call(this.callbackContext, this.game)) : this.onLoadRenderCallback && this.onLoadRenderCallback.call(this.callbackContext, this.game) + }, + destroy: function() { + this._clearWorld = !0, this._clearCache = !0, this.clearCurrentState(), this.callbackContext = null, this.onInitCallback = null, this.onShutDownCallback = null, this.onPreloadCallback = null, this.onLoadRenderCallback = null, this.onLoadUpdateCallback = null, this.onCreateCallback = null, this.onUpdateCallback = null, this.onRenderCallback = null, this.onPausedCallback = null, this.onResumedCallback = null, this.onPauseUpdateCallback = null, this.game = null, this.states = {}, this._pendingState = null, this.current = "" + } + }, c.StateManager.prototype.constructor = c.StateManager, Object.defineProperty(c.StateManager.prototype, "created", { + get: function() { + return this._created + } + }), c.Signal = function() {}, c.Signal.prototype = { + _bindings: null, + _prevParams: null, + memorize: !1, + _shouldPropagate: !0, + active: !0, + _boundDispatch: !1, + validateListener: function(a, b) { + if ("function" != typeof a) throw new Error("Phaser.Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}", b)) + }, + _registerListener: function(a, b, d, e, f) { + var g, h = this._indexOfListener(a, d); + if (h !== -1) { + if (g = this._bindings[h], g.isOnce() !== b) throw new Error("You cannot add" + (b ? "" : "Once") + "() then add" + (b ? "Once" : "") + "() the same listener without removing the relationship first.") + } else g = new c.SignalBinding(this, a, b, d, e, f), this._addBinding(g); + return this.memorize && this._prevParams && g.execute(this._prevParams), g + }, + _addBinding: function(a) { + this._bindings || (this._bindings = []); + var b = this._bindings.length; + do b--; while (this._bindings[b] && a._priority <= this._bindings[b]._priority); + this._bindings.splice(b + 1, 0, a) + }, + _indexOfListener: function(a, b) { + if (!this._bindings) return -1; + void 0 === b && (b = null); + for (var c, d = this._bindings.length; d--;) + if (c = this._bindings[d], c._listener === a && c.context === b) return d; + return -1 + }, + has: function(a, b) { + return this._indexOfListener(a, b) !== -1 + }, + add: function(a, b, c) { + this.validateListener(a, "add"); + var d = []; + if (arguments.length > 3) + for (var e = 3; e < arguments.length; e++) d.push(arguments[e]); + return this._registerListener(a, !1, b, c, d) + }, + addOnce: function(a, b, c) { + this.validateListener(a, "addOnce"); + var d = []; + if (arguments.length > 3) + for (var e = 3; e < arguments.length; e++) d.push(arguments[e]); + return this._registerListener(a, !0, b, c, d) + }, + remove: function(a, b) { + this.validateListener(a, "remove"); + var c = this._indexOfListener(a, b); + return c !== -1 && (this._bindings[c]._destroy(), this._bindings.splice(c, 1)), a + }, + removeAll: function(a) { + if (void 0 === a && (a = null), this._bindings) { + for (var b = this._bindings.length; b--;) a ? this._bindings[b].context === a && (this._bindings[b]._destroy(), this._bindings.splice(b, 1)) : this._bindings[b]._destroy(); + a || (this._bindings.length = 0) + } + }, + getNumListeners: function() { + return this._bindings ? this._bindings.length : 0 + }, + halt: function() { + this._shouldPropagate = !1 + }, + dispatch: function() { + if (this.active && this._bindings) { + var a, b = Array.prototype.slice.call(arguments), + c = this._bindings.length; + if (this.memorize && (this._prevParams = b), c) { + a = this._bindings.slice(), this._shouldPropagate = !0; + do c--; while (a[c] && this._shouldPropagate && a[c].execute(b) !== !1) + } + } + }, + forget: function() { + this._prevParams && (this._prevParams = null) + }, + dispose: function() { + this.removeAll(), this._bindings = null, this._prevParams && (this._prevParams = null) + }, + toString: function() { + return "[Phaser.Signal active:" + this.active + " numListeners:" + this.getNumListeners() + "]" + } + }, Object.defineProperty(c.Signal.prototype, "boundDispatch", { + get: function() { + var a = this; + return this._boundDispatch || (this._boundDispatch = function() { + return a.dispatch.apply(a, arguments) + }) + } + }), c.Signal.prototype.constructor = c.Signal, c.SignalBinding = function(a, b, c, d, e, f) { + this._listener = b, c && (this._isOnce = !0), null != d && (this.context = d), this._signal = a, e && (this._priority = e), f && f.length && (this._args = f) + }, c.SignalBinding.prototype = { + context: null, + _isOnce: !1, + _priority: 0, + _args: null, + callCount: 0, + active: !0, + params: null, + execute: function(a) { + var b, c; + return this.active && this._listener && (c = this.params ? this.params.concat(a) : a, this._args && (c = c.concat(this._args)), b = this._listener.apply(this.context, c), this.callCount++, this._isOnce && this.detach()), b + }, + detach: function() { + return this.isBound() ? this._signal.remove(this._listener, this.context) : null + }, + isBound: function() { + return !!this._signal && !!this._listener + }, + isOnce: function() { + return this._isOnce + }, + getListener: function() { + return this._listener + }, + getSignal: function() { + return this._signal + }, + _destroy: function() { + delete this._signal, delete this._listener, delete this.context + }, + toString: function() { + return "[Phaser.SignalBinding isOnce:" + this._isOnce + ", isBound:" + this.isBound() + ", active:" + this.active + "]" + } + }, c.SignalBinding.prototype.constructor = c.SignalBinding, c.Filter = function(a, b, d) { + this.game = a, this.type = c.WEBGL_FILTER, this.passes = [this], this.shaders = [], this.dirty = !0, this.padding = 0, this.prevPoint = new c.Point; + var e = new Date; + if (this.uniforms = { + resolution: { + type: "2f", + value: { + x: 256, + y: 256 + } + }, + time: { + type: "1f", + value: 0 + }, + mouse: { + type: "2f", + value: { + x: 0, + y: 0 + } + }, + date: { + type: "4fv", + value: [e.getFullYear(), e.getMonth(), e.getDate(), 60 * e.getHours() * 60 + 60 * e.getMinutes() + e.getSeconds()] + }, + sampleRate: { + type: "1f", + value: 44100 + }, + iChannel0: { + type: "sampler2D", + value: null, + textureData: { + repeat: !0 + } + }, + iChannel1: { + type: "sampler2D", + value: null, + textureData: { + repeat: !0 + } + }, + iChannel2: { + type: "sampler2D", + value: null, + textureData: { + repeat: !0 + } + }, + iChannel3: { + type: "sampler2D", + value: null, + textureData: { + repeat: !0 + } + } + }, b) + for (var f in b) this.uniforms[f] = b[f]; + this.fragmentSrc = d || "" + }, c.Filter.prototype = { + init: function() {}, + setResolution: function(a, b) { + this.uniforms.resolution.value.x = a, this.uniforms.resolution.value.y = b + }, + update: function(a) { + if ("undefined" != typeof a) { + var b = a.x / this.game.width, + c = 1 - a.y / this.game.height; + b === this.prevPoint.x && c === this.prevPoint.y || (this.uniforms.mouse.value.x = b.toFixed(2), this.uniforms.mouse.value.y = c.toFixed(2), this.prevPoint.set(b, c)) + } + this.uniforms.time.value = this.game.time.totalElapsedSeconds() + }, + addToWorld: function(a, b, c, d, e, f) { + void 0 === e && (e = 0), void 0 === f && (f = 0), void 0 !== c && null !== c ? this.width = c : c = this.width, void 0 !== d && null !== d ? this.height = d : d = this.height; + var g = this.game.add.image(a, b, "__default"); + return g.width = c, g.height = d, g.anchor.set(e, f), g.filters = [this], g + }, + destroy: function() { + this.game = null + } + }, c.Filter.prototype.constructor = c.Filter, Object.defineProperty(c.Filter.prototype, "width", { + get: function() { + return this.uniforms.resolution.value.x + }, + set: function(a) { + this.uniforms.resolution.value.x = a + } + }), Object.defineProperty(c.Filter.prototype, "height", { + get: function() { + return this.uniforms.resolution.value.y + }, + set: function(a) { + this.uniforms.resolution.value.y = a + } + }), c.Plugin = function(a, b) { + void 0 === b && (b = null), this.game = a, this.parent = b, this.active = !1, this.visible = !1, this.hasPreUpdate = !1, this.hasUpdate = !1, this.hasPostUpdate = !1, this.hasRender = !1, this.hasPostRender = !1 + }, c.Plugin.prototype = { + preUpdate: function() {}, + update: function() {}, + render: function() {}, + postRender: function() {}, + destroy: function() { + this.game = null, this.parent = null, this.active = !1, this.visible = !1 + } + }, c.Plugin.prototype.constructor = c.Plugin, c.PluginManager = function(a) { + this.game = a, this.plugins = [], this._len = 0, this._i = 0 + }, c.PluginManager.prototype = { + add: function(a) { + var b = Array.prototype.slice.call(arguments, 1), + c = !1; + return "function" == typeof a ? a = new a(this.game, this) : (a.game = this.game, a.parent = this), "function" == typeof a.preUpdate && (a.hasPreUpdate = !0, c = !0), "function" == typeof a.update && (a.hasUpdate = !0, c = !0), "function" == typeof a.postUpdate && (a.hasPostUpdate = !0, c = !0), "function" == typeof a.render && (a.hasRender = !0, c = !0), "function" == typeof a.postRender && (a.hasPostRender = !0, c = !0), c ? ((a.hasPreUpdate || a.hasUpdate || a.hasPostUpdate) && (a.active = !0), (a.hasRender || a.hasPostRender) && (a.visible = !0), this._len = this.plugins.push(a), "function" == typeof a.init && a.init.apply(a, b), a) : null + }, + remove: function(a, b) { + for (void 0 === b && (b = !0), this._i = this._len; this._i--;) + if (this.plugins[this._i] === a) return b && a.destroy(), this.plugins.splice(this._i, 1), void this._len-- + }, + removeAll: function() { + for (this._i = this._len; this._i--;) this.plugins[this._i].destroy(); + this.plugins.length = 0, this._len = 0 + }, + preUpdate: function() { + for (this._i = this._len; this._i--;) this.plugins[this._i].active && this.plugins[this._i].hasPreUpdate && this.plugins[this._i].preUpdate() + }, + update: function() { + for (this._i = this._len; this._i--;) this.plugins[this._i].active && this.plugins[this._i].hasUpdate && this.plugins[this._i].update() + }, + postUpdate: function() { + for (this._i = this._len; this._i--;) this.plugins[this._i].active && this.plugins[this._i].hasPostUpdate && this.plugins[this._i].postUpdate() + }, + render: function() { + for (this._i = this._len; this._i--;) this.plugins[this._i].visible && this.plugins[this._i].hasRender && this.plugins[this._i].render() + }, + postRender: function() { + for (this._i = this._len; this._i--;) this.plugins[this._i].visible && this.plugins[this._i].hasPostRender && this.plugins[this._i].postRender() + }, + destroy: function() { + this.removeAll(), this.game = null + } + }, c.PluginManager.prototype.constructor = c.PluginManager, c.Stage = function(a) { + this.game = a, PIXI.DisplayObjectContainer.call(this), this.name = "_stage_root", this.disableVisibilityChange = !1, this.exists = !0, this.worldTransform = new PIXI.Matrix, this.stage = this, this.currentRenderOrderID = 0, this._hiddenVar = "hidden", this._onChange = null, this._bgColor = { + r: 0, + g: 0, + b: 0, + a: 0, + color: 0, + rgba: "#000000" + }, this.game.transparent || (this._bgColor.a = 1), a.config && this.parseConfig(a.config) + }, c.Stage.prototype = Object.create(PIXI.DisplayObjectContainer.prototype), c.Stage.prototype.constructor = c.Stage, c.Stage.prototype.parseConfig = function(a) { + a.disableVisibilityChange && (this.disableVisibilityChange = a.disableVisibilityChange), a.backgroundColor && this.setBackgroundColor(a.backgroundColor) + }, c.Stage.prototype.boot = function() { + c.DOM.getOffset(this.game.canvas, this.offset), c.Canvas.setUserSelect(this.game.canvas, "none"), c.Canvas.setTouchAction(this.game.canvas, "none"), this.checkVisibility() + }, c.Stage.prototype.preUpdate = function() { + this.currentRenderOrderID = 0; + for (var a = 0; a < this.children.length; a++) this.children[a].preUpdate() + }, c.Stage.prototype.update = function() { + for (var a = this.children.length; a--;) this.children[a].update() + }, c.Stage.prototype.postUpdate = function() { + this.game.camera.update(), this.game.camera.target && (this.game.camera.target.postUpdate(), this.updateTransform(), this.game.camera.updateTarget()); + for (var a = 0; a < this.children.length; a++) this.children[a].postUpdate(); + this.updateTransform() + }, c.Stage.prototype.updateTransform = function() { + this.worldAlpha = 1; + for (var a = 0; a < this.children.length; a++) this.children[a].updateTransform() + }, c.Stage.prototype.checkVisibility = function() { + void 0 !== document.hidden ? this._hiddenVar = "visibilitychange" : void 0 !== document.webkitHidden ? this._hiddenVar = "webkitvisibilitychange" : void 0 !== document.mozHidden ? this._hiddenVar = "mozvisibilitychange" : void 0 !== document.msHidden ? this._hiddenVar = "msvisibilitychange" : this._hiddenVar = null; + var a = this; + this._onChange = function(b) { + return a.visibilityChange(b) + }, this._hiddenVar && document.addEventListener(this._hiddenVar, this._onChange, !1), window.onblur = this._onChange, window.onfocus = this._onChange, window.onpagehide = this._onChange, window.onpageshow = this._onChange, this.game.device.cocoonJSApp && (CocoonJS.App.onSuspended.addEventListener(function() { + c.Stage.prototype.visibilityChange.call(a, { + type: "pause" + }) + }), CocoonJS.App.onActivated.addEventListener(function() { + c.Stage.prototype.visibilityChange.call(a, { + type: "resume" + }) + })) + }, c.Stage.prototype.visibilityChange = function(a) { + return "pagehide" === a.type || "blur" === a.type || "pageshow" === a.type || "focus" === a.type ? void("pagehide" === a.type || "blur" === a.type ? this.game.focusLoss(a) : "pageshow" !== a.type && "focus" !== a.type || this.game.focusGain(a)) : void(this.disableVisibilityChange || (document.hidden || document.mozHidden || document.msHidden || document.webkitHidden || "pause" === a.type ? this.game.gamePaused(a) : this.game.gameResumed(a))) + }, c.Stage.prototype.setBackgroundColor = function(a) { + this.game.transparent || (c.Color.valueToColor(a, this._bgColor), c.Color.updateColor(this._bgColor), this._bgColor.r /= 255, this._bgColor.g /= 255, this._bgColor.b /= 255, this._bgColor.a = 1) + }, c.Stage.prototype.destroy = function() { + this._hiddenVar && document.removeEventListener(this._hiddenVar, this._onChange, !1), window.onpagehide = null, window.onpageshow = null, window.onblur = null, window.onfocus = null + }, Object.defineProperty(c.Stage.prototype, "backgroundColor", { + get: function() { + return this._bgColor.color + }, + set: function(a) { + this.setBackgroundColor(a) + } + }), Object.defineProperty(c.Stage.prototype, "smoothed", { + get: function() { + return PIXI.scaleModes.DEFAULT === PIXI.scaleModes.LINEAR + }, + set: function(a) { + a ? PIXI.scaleModes.DEFAULT = PIXI.scaleModes.LINEAR : PIXI.scaleModes.DEFAULT = PIXI.scaleModes.NEAREST + } + }), c.Group = function(a, b, d, e, f, g) { + void 0 === e && (e = !1), void 0 === f && (f = !1), void 0 === g && (g = c.Physics.ARCADE), this.game = a, void 0 === b && (b = a.world), this.name = d || "group", this.z = 0, PIXI.DisplayObjectContainer.call(this), e ? (this.game.stage.addChild(this), this.z = this.game.stage.children.length) : b && (b.addChild(this), this.z = b.children.length), this.type = c.GROUP, this.physicsType = c.GROUP, this.alive = !0, this.exists = !0, this.ignoreDestroy = !1, this.pendingDestroy = !1, this.classType = c.Sprite, this.cursor = null, this.inputEnableChildren = !1, this.onChildInputDown = new c.Signal, this.onChildInputUp = new c.Signal, this.onChildInputOver = new c.Signal, this.onChildInputOut = new c.Signal, this.enableBody = f, this.enableBodyDebug = !1, this.physicsBodyType = g, this.physicsSortDirection = null, this.onDestroy = new c.Signal, this.cursorIndex = 0, this.fixedToCamera = !1, this.cameraOffset = new c.Point, this.hash = [], this._sortProperty = "z" + }, c.Group.prototype = Object.create(PIXI.DisplayObjectContainer.prototype), c.Group.prototype.constructor = c.Group, c.Group.RETURN_NONE = 0, c.Group.RETURN_TOTAL = 1, c.Group.RETURN_CHILD = 2, c.Group.RETURN_ALL = 3, c.Group.SORT_ASCENDING = -1, c.Group.SORT_DESCENDING = 1, c.Group.prototype.add = function(a, b, c) { + return void 0 === b && (b = !1), a.parent === this ? a : (a.body && a.parent && a.parent.hash && a.parent.removeFromHash(a), void 0 === c ? (a.z = this.children.length, this.addChild(a)) : (this.addChildAt(a, c), this.updateZ()), this.enableBody && a.hasOwnProperty("body") && null === a.body ? this.game.physics.enable(a, this.physicsBodyType) : a.body && this.addToHash(a), !this.inputEnableChildren || a.input && !a.inputEnabled || (a.inputEnabled = !0), !b && a.events && a.events.onAddedToGroup$dispatch(a, this), null === this.cursor && (this.cursor = a), a) + }, c.Group.prototype.addAt = function(a, b, c) { + this.add(a, c, b) + }, c.Group.prototype.addToHash = function(a) { + if (a.parent === this) { + var b = this.hash.indexOf(a); + if (b === -1) return this.hash.push(a), !0 + } + return !1 + }, c.Group.prototype.removeFromHash = function(a) { + if (a) { + var b = this.hash.indexOf(a); + if (b !== -1) return this.hash.splice(b, 1), !0 + } + return !1 + }, c.Group.prototype.addMultiple = function(a, b) { + if (a instanceof c.Group) a.moveAll(this, b); + else if (Array.isArray(a)) + for (var d = 0; d < a.length; d++) this.add(a[d], b); + return a + }, c.Group.prototype.getAt = function(a) { + return a < 0 || a >= this.children.length ? -1 : this.getChildAt(a) + }, c.Group.prototype.create = function(a, b, c, d, e, f) { + void 0 === e && (e = !0); + var g = new this.classType(this.game, a, b, c, d); + return g.exists = e, g.visible = e, g.alive = e, this.add(g, !1, f) + }, c.Group.prototype.createMultiple = function(a, b, c, d) { + void 0 === c && (c = 0), void 0 === d && (d = !1), Array.isArray(b) || (b = [b]), Array.isArray(c) || (c = [c]); + var e = this, + f = []; + return b.forEach(function(b) { + c.forEach(function(c) { + for (var g = 0; g < a; g++) f.push(e.create(0, 0, b, c, d)) + }) + }), f + }, c.Group.prototype.updateZ = function() { + for (var a = this.children.length; a--;) this.children[a].z = a + }, c.Group.prototype.align = function(a, b, d, e, f, g) { + if (void 0 === f && (f = c.TOP_LEFT), void 0 === g && (g = 0), 0 === this.children.length || g > this.children.length || a === -1 && b === -1) return !1; + for (var h = new c.Rectangle(0, 0, d, e), i = a * d, j = b * e, k = g; k < this.children.length; k++) { + var l = this.children[k]; + if (l.alignIn) + if (l.alignIn(h, f), a === -1) h.y += e, h.y === j && (h.x += d, h.y = 0); + else if (b === -1) h.x += d, h.x === i && (h.x = 0, h.y += e); + else if (h.x += d, h.x === i && (h.x = 0, h.y += e, h.y === j)) return !0 + } + return !0 + }; + c.Group.prototype.resetCursor = function(a) { + if (void 0 === a && (a = 0), a > this.children.length - 1 && (a = 0), this.cursor) return this.cursorIndex = a, this.cursor = this.children[this.cursorIndex], this.cursor + }; + c.Group.prototype.next = function() { + if (this.cursor) return this.cursorIndex >= this.children.length - 1 ? this.cursorIndex = 0 : this.cursorIndex++, this.cursor = this.children[this.cursorIndex], this.cursor + }, c.Group.prototype.previous = function() { + if (this.cursor) return 0 === this.cursorIndex ? this.cursorIndex = this.children.length - 1 : this.cursorIndex--, this.cursor = this.children[this.cursorIndex], this.cursor + }, c.Group.prototype.swap = function(a, b) { + this.swapChildren(a, b), this.updateZ() + }, c.Group.prototype.bringToTop = function(a) { + return a.parent === this && this.getIndex(a) < this.children.length && (this.remove(a, !1, !0), this.add(a, !0)), a + }, c.Group.prototype.sendToBack = function(a) { + return a.parent === this && this.getIndex(a) > 0 && (this.remove(a, !1, !0), this.addAt(a, 0, !0)), a + }, c.Group.prototype.moveUp = function(a) { + if (a.parent === this && this.getIndex(a) < this.children.length - 1) { + var b = this.getIndex(a), + c = this.getAt(b + 1); + c && this.swap(a, c) + } + return a + }, c.Group.prototype.moveDown = function(a) { + if (a.parent === this && this.getIndex(a) > 0) { + var b = this.getIndex(a), + c = this.getAt(b - 1); + c && this.swap(a, c) + } + return a + }, c.Group.prototype.xy = function(a, b, c) { + return a < 0 || a > this.children.length ? -1 : (this.getChildAt(a).x = b, void(this.getChildAt(a).y = c)) + }, c.Group.prototype.reverse = function() { + this.children.reverse(), this.updateZ() + }, c.Group.prototype.getIndex = function(a) { + return this.children.indexOf(a) + }, c.Group.prototype.getByName = function(a) { + for (var b = 0; b < this.children.length; b++) + if (this.children[b].name === a) return this.children[b]; + return null + }, c.Group.prototype.replace = function(a, b) { + var d = this.getIndex(a); + if (d !== -1) return b.parent && (b.parent instanceof c.Group ? b.parent.remove(b) : b.parent.removeChild(b)), this.remove(a), this.addAt(b, d), a + }, c.Group.prototype.hasProperty = function(a, b) { + var c = b.length; + return 1 === c && b[0] in a || (2 === c && b[0] in a && b[1] in a[b[0]] || (3 === c && b[0] in a && b[1] in a[b[0]] && b[2] in a[b[0]][b[1]] || 4 === c && b[0] in a && b[1] in a[b[0]] && b[2] in a[b[0]][b[1]] && b[3] in a[b[0]][b[1]][b[2]])) + }, c.Group.prototype.setProperty = function(a, b, c, d, e) { + if (void 0 === e && (e = !1), d = d || 0, !this.hasProperty(a, b) && (!e || d > 0)) return !1; + var f = b.length; + return 1 === f ? 0 === d ? a[b[0]] = c : 1 === d ? a[b[0]] += c : 2 === d ? a[b[0]] -= c : 3 === d ? a[b[0]] *= c : 4 === d && (a[b[0]] /= c) : 2 === f ? 0 === d ? a[b[0]][b[1]] = c : 1 === d ? a[b[0]][b[1]] += c : 2 === d ? a[b[0]][b[1]] -= c : 3 === d ? a[b[0]][b[1]] *= c : 4 === d && (a[b[0]][b[1]] /= c) : 3 === f ? 0 === d ? a[b[0]][b[1]][b[2]] = c : 1 === d ? a[b[0]][b[1]][b[2]] += c : 2 === d ? a[b[0]][b[1]][b[2]] -= c : 3 === d ? a[b[0]][b[1]][b[2]] *= c : 4 === d && (a[b[0]][b[1]][b[2]] /= c) : 4 === f && (0 === d ? a[b[0]][b[1]][b[2]][b[3]] = c : 1 === d ? a[b[0]][b[1]][b[2]][b[3]] += c : 2 === d ? a[b[0]][b[1]][b[2]][b[3]] -= c : 3 === d ? a[b[0]][b[1]][b[2]][b[3]] *= c : 4 === d && (a[b[0]][b[1]][b[2]][b[3]] /= c)), !0 + }, c.Group.prototype.checkProperty = function(a, b, d, e) { + return void 0 === e && (e = !1), !(!c.Utils.getProperty(a, b) && e) && c.Utils.getProperty(a, b) === d + }, c.Group.prototype.set = function(a, b, c, d, e, f, g) { + if (void 0 === g && (g = !1), b = b.split("."), void 0 === d && (d = !1), void 0 === e && (e = !1), (d === !1 || d && a.alive) && (e === !1 || e && a.visible)) return this.setProperty(a, b, c, f, g) + }, c.Group.prototype.setAll = function(a, b, c, d, e, f) { + void 0 === c && (c = !1), void 0 === d && (d = !1), void 0 === f && (f = !1), a = a.split("."), e = e || 0; + for (var g = 0; g < this.children.length; g++)(!c || c && this.children[g].alive) && (!d || d && this.children[g].visible) && this.setProperty(this.children[g], a, b, e, f) + }, c.Group.prototype.setAllChildren = function(a, b, d, e, f, g) { + void 0 === d && (d = !1), void 0 === e && (e = !1), void 0 === g && (g = !1), f = f || 0; + for (var h = 0; h < this.children.length; h++)(!d || d && this.children[h].alive) && (!e || e && this.children[h].visible) && (this.children[h] instanceof c.Group ? this.children[h].setAllChildren(a, b, d, e, f, g) : this.setProperty(this.children[h], a.split("."), b, f, g)) + }, c.Group.prototype.checkAll = function(a, b, c, d, e) { + void 0 === c && (c = !1), void 0 === d && (d = !1), void 0 === e && (e = !1); + for (var f = 0; f < this.children.length; f++) + if ((!c || c && this.children[f].alive) && (!d || d && this.children[f].visible) && !this.checkProperty(this.children[f], a, b, e)) return !1; + return !0 + }, c.Group.prototype.addAll = function(a, b, c, d) { + this.setAll(a, b, c, d, 1) + }, c.Group.prototype.subAll = function(a, b, c, d) { + this.setAll(a, b, c, d, 2) + }, c.Group.prototype.multiplyAll = function(a, b, c, d) { + this.setAll(a, b, c, d, 3) + }, c.Group.prototype.divideAll = function(a, b, c, d) { + this.setAll(a, b, c, d, 4) + }, c.Group.prototype.callAllExists = function(a, b) { + var c; + if (arguments.length > 2) { + c = []; + for (var d = 2; d < arguments.length; d++) c.push(arguments[d]) + } + for (var d = 0; d < this.children.length; d++) this.children[d].exists === b && this.children[d][a] && this.children[d][a].apply(this.children[d], c) + }, c.Group.prototype.callbackFromArray = function(a, b, c) { + if (1 === c) { + if (a[b[0]]) return a[b[0]] + } else if (2 === c) { + if (a[b[0]][b[1]]) return a[b[0]][b[1]] + } else if (3 === c) { + if (a[b[0]][b[1]][b[2]]) return a[b[0]][b[1]][b[2]] + } else if (4 === c) { + if (a[b[0]][b[1]][b[2]][b[3]]) return a[b[0]][b[1]][b[2]][b[3]] + } else if (a[b]) return a[b]; + return !1 + }, c.Group.prototype.callAll = function(a, b) { + if (void 0 !== a) { + a = a.split("."); + var c = a.length; + if (void 0 === b || null === b || "" === b) b = null; + else if ("string" == typeof b) { + b = b.split("."); + var d = b.length + } + var e; + if (arguments.length > 2) { + e = []; + for (var f = 2; f < arguments.length; f++) e.push(arguments[f]) + } + for (var g = null, h = null, f = 0; f < this.children.length; f++) g = this.callbackFromArray(this.children[f], a, c), b && g ? (h = this.callbackFromArray(this.children[f], b, d), g && g.apply(h, e)) : g && g.apply(this.children[f], e) + } + }, c.Group.prototype.preUpdate = function() { + if (this.pendingDestroy) return this.destroy(), !1; + if (!this.exists || !this.parent.exists) return this.renderOrderID = -1, !1; + for (var a = 0; a < this.children.length; a++) this.children[a].preUpdate(); + return !0 + }, c.Group.prototype.update = function() { + for (var a = this.children.length; a--;) this.children[a].update() + }, c.Group.prototype.postUpdate = function() { + this.fixedToCamera && (this.x = this.game.camera.view.x + this.cameraOffset.x, this.y = this.game.camera.view.y + this.cameraOffset.y); + for (var a = 0; a < this.children.length; a++) this.children[a].postUpdate() + }, c.Group.prototype.filter = function(a, b) { + for (var d = -1, e = this.children.length, f = []; ++d < e;) { + var g = this.children[d]; + (!b || b && g.exists) && a(g, d, this.children) && f.push(g) + } + return new c.ArraySet(f) + }, c.Group.prototype.forEach = function(a, b, c) { + if (void 0 === c && (c = !1), arguments.length <= 3) + for (var d = 0; d < this.children.length; d++)(!c || c && this.children[d].exists) && a.call(b, this.children[d]); + else { + for (var e = [null], d = 3; d < arguments.length; d++) e.push(arguments[d]); + for (var d = 0; d < this.children.length; d++)(!c || c && this.children[d].exists) && (e[0] = this.children[d], a.apply(b, e)) + } + }, c.Group.prototype.forEachExists = function(a, b) { + var d; + if (arguments.length > 2) { + d = [null]; + for (var e = 2; e < arguments.length; e++) d.push(arguments[e]) + } + this.iterate("exists", !0, c.Group.RETURN_TOTAL, a, b, d) + }, c.Group.prototype.forEachAlive = function(a, b) { + var d; + if (arguments.length > 2) { + d = [null]; + for (var e = 2; e < arguments.length; e++) d.push(arguments[e]) + } + this.iterate("alive", !0, c.Group.RETURN_TOTAL, a, b, d) + }, c.Group.prototype.forEachDead = function(a, b) { + var d; + if (arguments.length > 2) { + d = [null]; + for (var e = 2; e < arguments.length; e++) d.push(arguments[e]) + } + this.iterate("alive", !1, c.Group.RETURN_TOTAL, a, b, d) + }, c.Group.prototype.sort = function(a, b) { + this.children.length < 2 || (void 0 === a && (a = "z"), void 0 === b && (b = c.Group.SORT_ASCENDING), this._sortProperty = a, b === c.Group.SORT_ASCENDING ? this.children.sort(this.ascendingSortHandler.bind(this)) : this.children.sort(this.descendingSortHandler.bind(this)), this.updateZ()) + }, c.Group.prototype.customSort = function(a, b) { + this.children.length < 2 || (this.children.sort(a.bind(b)), this.updateZ()) + }, c.Group.prototype.ascendingSortHandler = function(a, b) { + return a[this._sortProperty] < b[this._sortProperty] ? -1 : a[this._sortProperty] > b[this._sortProperty] ? 1 : a.z < b.z ? -1 : 1 + }, c.Group.prototype.descendingSortHandler = function(a, b) { + return a[this._sortProperty] < b[this._sortProperty] ? 1 : a[this._sortProperty] > b[this._sortProperty] ? -1 : 0 + }, c.Group.prototype.iterate = function(a, b, d, e, f, g) { + if (0 === this.children.length) { + if (d === c.Group.RETURN_TOTAL) return 0; + if (d === c.Group.RETURN_ALL) return [] + } + var h = 0; + if (d === c.Group.RETURN_ALL) var i = []; + for (var j = 0; j < this.children.length; j++) + if (this.children[j][a] === b) { + if (h++, e && (g ? (g[0] = this.children[j], e.apply(f, g)) : e.call(f, this.children[j])), d === c.Group.RETURN_CHILD) return this.children[j]; + d === c.Group.RETURN_ALL && i.push(this.children[j]) + } return d === c.Group.RETURN_TOTAL ? h : d === c.Group.RETURN_ALL ? i : null + }, c.Group.prototype.getFirstExists = function(a, b, d, e, f, g) { + void 0 === b && (b = !1), "boolean" != typeof a && (a = !0); + var h = this.iterate("exists", a, c.Group.RETURN_CHILD); + return null === h && b ? this.create(d, e, f, g) : this.resetChild(h, d, e, f, g) + }, c.Group.prototype.getFirstAlive = function(a, b, d, e, f) { + void 0 === a && (a = !1); + var g = this.iterate("alive", !0, c.Group.RETURN_CHILD); + return null === g && a ? this.create(b, d, e, f) : this.resetChild(g, b, d, e, f) + }, c.Group.prototype.getFirstDead = function(a, b, d, e, f) { + void 0 === a && (a = !1); + var g = this.iterate("alive", !1, c.Group.RETURN_CHILD); + return null === g && a ? this.create(b, d, e, f) : this.resetChild(g, b, d, e, f) + }, c.Group.prototype.resetChild = function(a, b, c, d, e) { + return null === a ? null : (void 0 === b && (b = null), void 0 === c && (c = null), null !== b && null !== c && a.reset(b, c), void 0 !== d && a.loadTexture(d, e), a) + }, c.Group.prototype.getTop = function() { + if (this.children.length > 0) return this.children[this.children.length - 1] + }, c.Group.prototype.getBottom = function() { + if (this.children.length > 0) return this.children[0] + }, c.Group.prototype.getClosestTo = function(a, b, d) { + for (var e = Number.MAX_VALUE, f = 0, g = null, h = 0; h < this.children.length; h++) { + var i = this.children[h]; + i.exists && (f = Math.abs(c.Point.distance(a, i)), f < e && (!b || b.call(d, i, f)) && (e = f, g = i)) + } + return g + }, c.Group.prototype.getFurthestFrom = function(a, b, d) { + for (var e = 0, f = 0, g = null, h = 0; h < this.children.length; h++) { + var i = this.children[h]; + i.exists && (f = Math.abs(c.Point.distance(a, i)), f > e && (!b || b.call(d, i, f)) && (e = f, g = i)) + } + return g + }, c.Group.prototype.countLiving = function() { + return this.iterate("alive", !0, c.Group.RETURN_TOTAL) + }, c.Group.prototype.countDead = function() { + return this.iterate("alive", !1, c.Group.RETURN_TOTAL) + }, c.Group.prototype.getRandom = function(a, b) { + return void 0 === a && (a = 0), void 0 === b && (b = this.children.length), 0 === b ? null : c.ArrayUtils.getRandomItem(this.children, a, b) + }, c.Group.prototype.getRandomExists = function(a, b) { + var c = this.getAll("exists", !0, a, b); + return this.game.rnd.pick(c) + }, c.Group.prototype.getAll = function(a, b, c, d) { + void 0 === c && (c = 0), void 0 === d && (d = this.children.length); + for (var e = [], f = c; f < d; f++) { + var g = this.children[f]; + a && g[a] === b && e.push(g) + } + return e + }, c.Group.prototype.remove = function(a, b, c) { + if (void 0 === b && (b = !1), void 0 === c && (c = !1), 0 === this.children.length || this.children.indexOf(a) === -1) return !1; + c || !a.events || a.destroyPhase || a.events.onRemovedFromGroup$dispatch(a, this); + var d = this.removeChild(a); + return this.removeFromHash(a), this.updateZ(), this.cursor === a && this.next(), b && d && d.destroy(!0), !0 + }, c.Group.prototype.moveAll = function(a, b) { + if (void 0 === b && (b = !1), this.children.length > 0 && a instanceof c.Group) { + do a.add(this.children[0], b); while (this.children.length > 0); + this.hash = [], this.cursor = null + } + return a + }, c.Group.prototype.removeAll = function(a, b, c) { + if (void 0 === a && (a = !1), void 0 === b && (b = !1), void 0 === c && (c = !1), 0 !== this.children.length) { + do { + !b && this.children[0].events && this.children[0].events.onRemovedFromGroup$dispatch(this.children[0], this); + var d = this.removeChild(this.children[0]); + this.removeFromHash(d), a && d && d.destroy(!0, c) + } while (this.children.length > 0); + this.hash = [], this.cursor = null + } + }, c.Group.prototype.removeBetween = function(a, b, c, d) { + if (void 0 === b && (b = this.children.length - 1), void 0 === c && (c = !1), void 0 === d && (d = !1), 0 !== this.children.length) { + if (a > b || a < 0 || b > this.children.length) return !1; + for (var e = b; e >= a;) { + !d && this.children[e].events && this.children[e].events.onRemovedFromGroup$dispatch(this.children[e], this); + var f = this.removeChild(this.children[e]); + this.removeFromHash(f), c && f && f.destroy(!0), this.cursor === this.children[e] && (this.cursor = null), e-- + } + this.updateZ() + } + }, c.Group.prototype.destroy = function(a, b) { + null === this.game || this.ignoreDestroy || (void 0 === a && (a = !0), void 0 === b && (b = !1), this.onDestroy.dispatch(this, a, b), this.removeAll(a), this.cursor = null, this.filters = null, this.pendingDestroy = !1, b || (this.parent && this.parent.removeChild(this), this.game = null, this.exists = !1)) + }, Object.defineProperty(c.Group.prototype, "total", { + get: function() { + return this.iterate("exists", !0, c.Group.RETURN_TOTAL) + } + }), Object.defineProperty(c.Group.prototype, "length", { + get: function() { + return this.children.length + } + }), Object.defineProperty(c.Group.prototype, "angle", { + get: function() { + return c.Math.radToDeg(this.rotation) + }, + set: function(a) { + this.rotation = c.Math.degToRad(a) + } + }), Object.defineProperty(c.Group.prototype, "centerX", { + get: function() { + return this.getBounds(this.parent).centerX + }, + set: function(a) { + var b = this.getBounds(this.parent), + c = this.x - b.x; + this.x = a + c - b.halfWidth + } + }), Object.defineProperty(c.Group.prototype, "centerY", { + get: function() { + return this.getBounds(this.parent).centerY + }, + set: function(a) { + var b = this.getBounds(this.parent), + c = this.y - b.y; + this.y = a + c - b.halfHeight + } + }), Object.defineProperty(c.Group.prototype, "left", { + get: function() { + return this.getBounds(this.parent).left + }, + set: function(a) { + var b = this.getBounds(this.parent), + c = this.x - b.x; + this.x = a + c + } + }), Object.defineProperty(c.Group.prototype, "right", { + get: function() { + return this.getBounds(this.parent).right + }, + set: function(a) { + var b = this.getBounds(this.parent), + c = this.x - b.x; + this.x = a + c - b.width + } + }), Object.defineProperty(c.Group.prototype, "top", { + get: function() { + return this.getBounds(this.parent).top + }, + set: function(a) { + var b = this.getBounds(this.parent), + c = this.y - b.y; + this.y = a + c + } + }), Object.defineProperty(c.Group.prototype, "bottom", { + get: function() { + return this.getBounds(this.parent).bottom + }, + set: function(a) { + var b = this.getBounds(this.parent), + c = this.y - b.y; + this.y = a + c - b.height + } + }), c.World = function(a) { + c.Group.call(this, a, null, "__world", !1), this.bounds = new c.Rectangle(0, 0, a.width, a.height), this.camera = null, this._definedSize = !1, this._width = a.width, this._height = a.height, this.game.state.onStateChange.add(this.stateChange, this) + }, c.World.prototype = Object.create(c.Group.prototype), c.World.prototype.constructor = c.World, c.World.prototype.boot = function() { + this.camera = new c.Camera(this.game, 0, 0, 0, this.game.width, this.game.height), this.game.stage.addChild(this), this.camera.boot() + }, c.World.prototype.stateChange = function() { + this.x = 0, this.y = 0, this.camera.reset() + }, c.World.prototype.setBounds = function(a, b, c, d) { + this._definedSize = !0, this._width = c, this._height = d, this.bounds.setTo(a, b, c, d), this.x = a, this.y = b, this.camera.bounds && this.camera.bounds.setTo(a, b, Math.max(c, this.game.width), Math.max(d, this.game.height)), this.game.physics.setBoundsToWorld() + }, c.World.prototype.resize = function(a, b) { + this._definedSize && (a < this._width && (a = this._width), b < this._height && (b = this._height)), this.bounds.width = a, this.bounds.height = b, this.game.camera.setBoundsToWorld(), this.game.physics.setBoundsToWorld() + }, c.World.prototype.shutdown = function() { + this.destroy(!0, !0) + }, c.World.prototype.wrap = function(a, b, c, d, e) { + void 0 === b && (b = 0), void 0 === c && (c = !1), void 0 === d && (d = !0), void 0 === e && (e = !0), c ? (a.getBounds(), d && (a.x + a._currentBounds.width < this.bounds.x ? a.x = this.bounds.right : a.x > this.bounds.right && (a.x = this.bounds.left)), e && (a.y + a._currentBounds.height < this.bounds.top ? a.y = this.bounds.bottom : a.y > this.bounds.bottom && (a.y = this.bounds.top))) : (d && a.x + b < this.bounds.x ? a.x = this.bounds.right + b : d && a.x - b > this.bounds.right && (a.x = this.bounds.left - b), e && a.y + b < this.bounds.top ? a.y = this.bounds.bottom + b : e && a.y - b > this.bounds.bottom && (a.y = this.bounds.top - b)) + }, Object.defineProperty(c.World.prototype, "width", { + get: function() { + return this.bounds.width + }, + set: function(a) { + a < this.game.width && (a = this.game.width), this.bounds.width = a, this._width = a, this._definedSize = !0 + } + }), Object.defineProperty(c.World.prototype, "height", { + get: function() { + return this.bounds.height + }, + set: function(a) { + a < this.game.height && (a = this.game.height), this.bounds.height = a, this._height = a, this._definedSize = !0 + } + }), Object.defineProperty(c.World.prototype, "centerX", { + get: function() { + return this.bounds.halfWidth + this.bounds.x + } + }), Object.defineProperty(c.World.prototype, "centerY", { + get: function() { + return this.bounds.halfHeight + this.bounds.y + } + }), Object.defineProperty(c.World.prototype, "randomX", { + get: function() { + return this.bounds.x < 0 ? this.game.rnd.between(this.bounds.x, this.bounds.width - Math.abs(this.bounds.x)) : this.game.rnd.between(this.bounds.x, this.bounds.width) + } + }), Object.defineProperty(c.World.prototype, "randomY", { + get: function() { + return this.bounds.y < 0 ? this.game.rnd.between(this.bounds.y, this.bounds.height - Math.abs(this.bounds.y)) : this.game.rnd.between(this.bounds.y, this.bounds.height) + } + }), c.Game = function(a, b, d, e, f, g, h, i) { + return this.id = c.GAMES.push(this) - 1, this.config = null, this.physicsConfig = i, this.parent = "", this.width = 800, this.height = 600, this.resolution = 1, this._width = 800, this._height = 600, this.transparent = !1, this.antialias = !0, this.preserveDrawingBuffer = !1, this.clearBeforeRender = !0, this.renderer = null, this.renderType = c.AUTO, this.state = null, this.isBooted = !1, this.isRunning = !1, this.raf = null, this.add = null, this.make = null, this.cache = null, this.input = null, this.load = null, this.math = null, this.net = null, this.scale = null, this.sound = null, this.stage = null, this.time = null, this.tweens = null, this.world = null, this.physics = null, this.plugins = null, this.rnd = null, this.device = c.Device, this.camera = null, this.canvas = null, this.context = null, this.debug = null, this.particles = null, this.create = null, this.lockRender = !1, this.stepping = !1, this.pendingStep = !1, this.stepCount = 0, this.onPause = null, this.onResume = null, this.onBlur = null, this.onFocus = null, this._paused = !1, this._codePaused = !1, this.currentUpdateID = 0, this.updatesThisFrame = 1, this._deltaTime = 0, this._lastCount = 0, this._spiraling = 0, this._kickstart = !0, this.fpsProblemNotifier = new c.Signal, this.forceSingleUpdate = !0, this._nextFpsNotification = 0, 1 === arguments.length && "object" == typeof arguments[0] ? this.parseConfig(arguments[0]) : (this.config = { + enableDebug: !0 + }, "undefined" != typeof a && (this._width = a), "undefined" != typeof b && (this._height = b), "undefined" != typeof d && (this.renderType = d), "undefined" != typeof e && (this.parent = e), "undefined" != typeof g && (this.transparent = g), "undefined" != typeof h && (this.antialias = h), this.rnd = new c.RandomDataGenerator([(Date.now() * Math.random()).toString()]), this.state = new c.StateManager(this, f)), this.device.whenReady(this.boot, this), this + }, c.Game.prototype = { + parseConfig: function(a) { + this.config = a, void 0 === a.enableDebug && (this.config.enableDebug = !0), a.width && (this._width = a.width), a.height && (this._height = a.height), a.renderer && (this.renderType = a.renderer), a.parent && (this.parent = a.parent), void 0 !== a.transparent && (this.transparent = a.transparent), void 0 !== a.antialias && (this.antialias = a.antialias), a.resolution && (this.resolution = a.resolution), + void 0 !== a.preserveDrawingBuffer && (this.preserveDrawingBuffer = a.preserveDrawingBuffer), a.physicsConfig && (this.physicsConfig = a.physicsConfig); + var b = [(Date.now() * Math.random()).toString()]; + a.seed && (b = a.seed), this.rnd = new c.RandomDataGenerator(b); + var d = null; + a.state && (d = a.state), this.state = new c.StateManager(this, d) + }, + boot: function() { + this.isBooted || (this.onPause = new c.Signal, this.onResume = new c.Signal, this.onBlur = new c.Signal, this.onFocus = new c.Signal, this.isBooted = !0, PIXI.game = this, this.math = c.Math, this.scale = new c.ScaleManager(this, this._width, this._height), this.stage = new c.Stage(this), this.setUpRenderer(), this.world = new c.World(this), this.add = new c.GameObjectFactory(this), this.make = new c.GameObjectCreator(this), this.cache = new c.Cache(this), this.load = new c.Loader(this), this.time = new c.Time(this), this.tweens = new c.TweenManager(this), this.input = new c.Input(this), this.sound = new c.SoundManager(this), this.physics = new c.Physics(this, this.physicsConfig), this.particles = new c.Particles(this), this.create = new c.Create(this), this.plugins = new c.PluginManager(this), this.net = new c.Net(this), this.time.boot(), this.stage.boot(), this.world.boot(), this.scale.boot(), this.input.boot(), this.sound.boot(), this.state.boot(), this.config.enableDebug ? (this.debug = new c.Utils.Debug(this), this.debug.boot()) : this.debug = { + preUpdate: function() {}, + update: function() {}, + reset: function() {} + }, this.showDebugHeader(), this.isRunning = !0, this.config && this.config.forceSetTimeOut ? this.raf = new c.RequestAnimationFrame(this, this.config.forceSetTimeOut) : this.raf = new c.RequestAnimationFrame(this, (!1)), this._kickstart = !0, window.focus && (!window.PhaserGlobal || window.PhaserGlobal && !window.PhaserGlobal.stopFocus) && window.focus(), this.raf.start()) + }, + showDebugHeader: function() { + if (!window.PhaserGlobal || !window.PhaserGlobal.hideBanner) { + var a = c.VERSION, + b = "Canvas", + d = "HTML Audio", + e = 1; + if (this.renderType === c.WEBGL ? (b = "WebGL", e++) : this.renderType === c.HEADLESS && (b = "Headless"), this.device.webAudio && (d = "WebAudio", e++), this.device.chrome) { + for (var f = ["%c %c %c Phaser v" + a + " | Pixi.js | " + b + " | " + d + " %c %c %c http://phaser.io %c♥%c♥%c♥", "background: #fb8cb3", "background: #d44a52", "color: #ffffff; background: #871905;", "background: #d44a52", "background: #fb8cb3", "background: #ffffff"], g = 0; g < 3; g++) g < e ? f.push("color: #ff2424; background: #fff") : f.push("color: #959595; background: #fff"); + console.log.apply(console, f) + } else window.console && console.log("Phaser v" + a + " | Pixi.js " + PIXI.VERSION + " | " + b + " | " + d + " | http://phaser.io") + } + }, + setUpRenderer: function() { + if (this.config.canvas ? this.canvas = this.config.canvas : this.canvas = c.Canvas.create(this, this.width, this.height, this.config.canvasID, !0), this.config.canvasStyle ? this.canvas.style = this.config.canvasStyle : this.canvas.style["-webkit-full-screen"] = "width: 100%; height: 100%", this.renderType === c.HEADLESS || this.renderType === c.CANVAS || this.renderType === c.AUTO && !this.device.webGL) { + if (!this.device.canvas) throw new Error("Phaser.Game - Cannot create Canvas or WebGL context, aborting."); + this.renderType = c.CANVAS, this.renderer = new PIXI.CanvasRenderer(this), this.context = this.renderer.context + } else this.renderType = c.WEBGL, this.renderer = new PIXI.WebGLRenderer(this), this.context = null, this.canvas.addEventListener("webglcontextlost", this.contextLost.bind(this), !1), this.canvas.addEventListener("webglcontextrestored", this.contextRestored.bind(this), !1); + this.device.cocoonJS && (this.canvas.screencanvas = this.renderType === c.CANVAS), this.renderType !== c.HEADLESS && (this.stage.smoothed = this.antialias, c.Canvas.addToDOM(this.canvas, this.parent, !1), c.Canvas.setTouchAction(this.canvas)) + }, + contextLost: function(a) { + a.preventDefault(), this.renderer.contextLost = !0 + }, + contextRestored: function() { + this.renderer.initContext(), this.cache.clearGLTextures(), this.renderer.contextLost = !1 + }, + update: function(a) { + if (this.time.update(a), this._kickstart) return this.updateLogic(this.time.desiredFpsMult), this.updateRender(this.time.slowMotion * this.time.desiredFps), void(this._kickstart = !1); + if (this._spiraling > 1 && !this.forceSingleUpdate) this.time.time > this._nextFpsNotification && (this._nextFpsNotification = this.time.time + 1e4, this.fpsProblemNotifier.dispatch()), this._deltaTime = 0, this._spiraling = 0, this.updateRender(this.time.slowMotion * this.time.desiredFps); + else { + var b = 1e3 * this.time.slowMotion / this.time.desiredFps; + this._deltaTime += Math.max(Math.min(3 * b, this.time.elapsed), 0); + var c = 0; + for (this.updatesThisFrame = Math.floor(this._deltaTime / b), this.forceSingleUpdate && (this.updatesThisFrame = Math.min(1, this.updatesThisFrame)); this._deltaTime >= b && (this._deltaTime -= b, this.currentUpdateID = c, this.updateLogic(this.time.desiredFpsMult), c++, !this.forceSingleUpdate || 1 !== c);) this.time.refresh(); + c > this._lastCount ? this._spiraling++ : c < this._lastCount && (this._spiraling = 0), this._lastCount = c, this.updateRender(this._deltaTime / b) + } + }, + updateLogic: function(a) { + this._paused || this.pendingStep ? (this.scale.pauseUpdate(), this.state.pauseUpdate(), this.debug.preUpdate()) : (this.stepping && (this.pendingStep = !0), this.scale.preUpdate(), this.debug.preUpdate(), this.camera.preUpdate(), this.physics.preUpdate(), this.state.preUpdate(a), this.plugins.preUpdate(a), this.stage.preUpdate(), this.state.update(), this.stage.update(), this.tweens.update(), this.sound.update(), this.input.update(), this.physics.update(), this.particles.update(), this.plugins.update(), this.stage.postUpdate(), this.plugins.postUpdate()), this.stage.updateTransform() + }, + updateRender: function(a) { + this.lockRender || (this.state.preRender(a), this.renderType !== c.HEADLESS && (this.renderer.render(this.stage), this.plugins.render(a), this.state.render(a)), this.plugins.postRender(a)) + }, + enableStep: function() { + this.stepping = !0, this.pendingStep = !1, this.stepCount = 0 + }, + disableStep: function() { + this.stepping = !1, this.pendingStep = !1 + }, + step: function() { + this.pendingStep = !1, this.stepCount++ + }, + destroy: function() { + this.raf.stop(), this.state.destroy(), this.sound.destroy(), this.scale.destroy(), this.stage.destroy(), this.input.destroy(), this.physics.destroy(), this.plugins.destroy(), this.state = null, this.sound = null, this.scale = null, this.stage = null, this.input = null, this.physics = null, this.plugins = null, this.cache = null, this.load = null, this.time = null, this.world = null, this.isBooted = !1, this.renderer.destroy(!1), c.Canvas.removeFromDOM(this.canvas), PIXI.defaultRenderer = null, c.GAMES[this.id] = null + }, + gamePaused: function(a) { + this._paused || (this._paused = !0, this.time.gamePaused(), this.sound.muteOnPause && this.sound.setMute(), this.onPause.dispatch(a), this.device.cordova && this.device.iOS && (this.lockRender = !0)) + }, + gameResumed: function(a) { + this._paused && !this._codePaused && (this._paused = !1, this.time.gameResumed(), this.input.reset(), this.sound.muteOnPause && this.sound.unsetMute(), this.onResume.dispatch(a), this.device.cordova && this.device.iOS && (this.lockRender = !1)) + }, + focusLoss: function(a) { + this.onBlur.dispatch(a), this.stage.disableVisibilityChange || this.gamePaused(a) + }, + focusGain: function(a) { + this.onFocus.dispatch(a), this.stage.disableVisibilityChange || this.gameResumed(a) + } + }, c.Game.prototype.constructor = c.Game, Object.defineProperty(c.Game.prototype, "paused", { + get: function() { + return this._paused + }, + set: function(a) { + a === !0 ? (this._paused === !1 && (this._paused = !0, this.sound.setMute(), this.time.gamePaused(), this.onPause.dispatch(this)), this._codePaused = !0) : (this._paused && (this._paused = !1, this.input.reset(), this.sound.unsetMute(), this.time.gameResumed(), this.onResume.dispatch(this)), this._codePaused = !1) + } + }), c.Input = function(a) { + this.game = a, this.hitCanvas = null, this.hitContext = null, this.moveCallbacks = [], this.customCandidateHandler = null, this.customCandidateHandlerContext = null, this.pollRate = 0, this.enabled = !0, this.multiInputOverride = c.Input.MOUSE_TOUCH_COMBINE, this.position = null, this.speed = null, this.circle = null, this.scale = null, this.maxPointers = -1, this.tapRate = 200, this.doubleTapRate = 300, this.holdRate = 2e3, this.justPressedRate = 200, this.justReleasedRate = 200, this.recordPointerHistory = !1, this.recordRate = 100, this.recordLimit = 100, this.pointer1 = null, this.pointer2 = null, this.pointer3 = null, this.pointer4 = null, this.pointer5 = null, this.pointer6 = null, this.pointer7 = null, this.pointer8 = null, this.pointer9 = null, this.pointer10 = null, this.pointers = [], this.activePointer = null, this.mousePointer = null, this.mouse = null, this.keyboard = null, this.touch = null, this.mspointer = null, this.gamepad = null, this.resetLocked = !1, this.onDown = null, this.onUp = null, this.onTap = null, this.onHold = null, this.minPriorityID = 0, this.interactiveItems = new c.ArraySet, this._localPoint = new c.Point, this._pollCounter = 0, this._oldPosition = null, this._x = 0, this._y = 0 + }, c.Input.MOUSE_OVERRIDES_TOUCH = 0, c.Input.TOUCH_OVERRIDES_MOUSE = 1, c.Input.MOUSE_TOUCH_COMBINE = 2, c.Input.MAX_POINTERS = 10, c.Input.prototype = { + boot: function() { + this.mousePointer = new c.Pointer(this.game, 0, c.PointerMode.CURSOR), this.addPointer(), this.addPointer(), this.mouse = new c.Mouse(this.game), this.touch = new c.Touch(this.game), this.mspointer = new c.MSPointer(this.game), c.Keyboard && (this.keyboard = new c.Keyboard(this.game)), c.Gamepad && (this.gamepad = new c.Gamepad(this.game)), this.onDown = new c.Signal, this.onUp = new c.Signal, this.onTap = new c.Signal, this.onHold = new c.Signal, this.scale = new c.Point(1, 1), this.speed = new c.Point, this.position = new c.Point, this._oldPosition = new c.Point, this.circle = new c.Circle(0, 0, 44), this.activePointer = this.mousePointer, this.hitCanvas = PIXI.CanvasPool.create(this, 1, 1), this.hitContext = this.hitCanvas.getContext("2d"), this.mouse.start(), this.touch.start(), this.mspointer.start(), this.mousePointer.active = !0, this.keyboard && this.keyboard.start(); + var a = this; + this._onClickTrampoline = function(b) { + a.onClickTrampoline(b) + }, this.game.canvas.addEventListener("click", this._onClickTrampoline, !1) + }, + destroy: function() { + this.mouse.stop(), this.touch.stop(), this.mspointer.stop(), this.keyboard && this.keyboard.stop(), this.gamepad && this.gamepad.stop(), this.moveCallbacks = [], PIXI.CanvasPool.remove(this), this.game.canvas.removeEventListener("click", this._onClickTrampoline) + }, + setInteractiveCandidateHandler: function(a, b) { + this.customCandidateHandler = a, this.customCandidateHandlerContext = b + }, + addMoveCallback: function(a, b) { + this.moveCallbacks.push({ + callback: a, + context: b + }) + }, + deleteMoveCallback: function(a, b) { + for (var c = this.moveCallbacks.length; c--;) + if (this.moveCallbacks[c].callback === a && this.moveCallbacks[c].context === b) return void this.moveCallbacks.splice(c, 1) + }, + addPointer: function() { + if (this.pointers.length >= c.Input.MAX_POINTERS) return console.warn("Phaser.Input.addPointer: Maximum limit of " + c.Input.MAX_POINTERS + " pointers reached."), null; + var a = this.pointers.length + 1, + b = new c.Pointer(this.game, a, c.PointerMode.TOUCH); + return this.pointers.push(b), this["pointer" + a] = b, b + }, + update: function() { + if (this.keyboard && this.keyboard.update(), this.pollRate > 0 && this._pollCounter < this.pollRate) return void this._pollCounter++; + this.speed.x = this.position.x - this._oldPosition.x, this.speed.y = this.position.y - this._oldPosition.y, this._oldPosition.copyFrom(this.position), this.mousePointer.update(), this.gamepad && this.gamepad.active && this.gamepad.update(); + for (var a = 0; a < this.pointers.length; a++) this.pointers[a].update(); + this._pollCounter = 0 + }, + reset: function(a) { + if (this.game.isBooted && !this.resetLocked) { + void 0 === a && (a = !1), this.mousePointer.reset(), this.keyboard && this.keyboard.reset(a), this.gamepad && this.gamepad.reset(); + for (var b = 0; b < this.pointers.length; b++) this.pointers[b].reset(); + "none" !== this.game.canvas.style.cursor && (this.game.canvas.style.cursor = "inherit"), a && (this.onDown.dispose(), this.onUp.dispose(), this.onTap.dispose(), this.onHold.dispose(), this.onDown = new c.Signal, this.onUp = new c.Signal, this.onTap = new c.Signal, this.onHold = new c.Signal, this.moveCallbacks = []), this._pollCounter = 0 + } + }, + resetSpeed: function(a, b) { + this._oldPosition.setTo(a, b), this.speed.setTo(0, 0) + }, + startPointer: function(a) { + if (this.maxPointers >= 0 && this.countActivePointers(this.maxPointers) >= this.maxPointers) return null; + if (!this.pointer1.active) return this.pointer1.start(a); + if (!this.pointer2.active) return this.pointer2.start(a); + for (var b = 2; b < this.pointers.length; b++) { + var c = this.pointers[b]; + if (!c.active) return c.start(a) + } + return null + }, + updatePointer: function(a) { + if (this.pointer1.active && this.pointer1.identifier === a.identifier) return this.pointer1.move(a); + if (this.pointer2.active && this.pointer2.identifier === a.identifier) return this.pointer2.move(a); + for (var b = 2; b < this.pointers.length; b++) { + var c = this.pointers[b]; + if (c.active && c.identifier === a.identifier) return c.move(a) + } + return null + }, + stopPointer: function(a) { + if (this.pointer1.active && this.pointer1.identifier === a.identifier) return this.pointer1.stop(a); + if (this.pointer2.active && this.pointer2.identifier === a.identifier) return this.pointer2.stop(a); + for (var b = 2; b < this.pointers.length; b++) { + var c = this.pointers[b]; + if (c.active && c.identifier === a.identifier) return c.stop(a) + } + return null + }, + countActivePointers: function(a) { + void 0 === a && (a = this.pointers.length); + for (var b = a, c = 0; c < this.pointers.length && b > 0; c++) { + var d = this.pointers[c]; + d.active && b-- + } + return a - b + }, + getPointer: function(a) { + void 0 === a && (a = !1); + for (var b = 0; b < this.pointers.length; b++) { + var c = this.pointers[b]; + if (c.active === a) return c + } + return null + }, + getPointerFromIdentifier: function(a) { + for (var b = 0; b < this.pointers.length; b++) { + var c = this.pointers[b]; + if (c.identifier === a) return c + } + return null + }, + getPointerFromId: function(a) { + for (var b = 0; b < this.pointers.length; b++) { + var c = this.pointers[b]; + if (c.pointerId === a) return c + } + return null + }, + getLocalPosition: function(a, b, d) { + void 0 === d && (d = new c.Point); + var e = a.worldTransform, + f = 1 / (e.a * e.d + e.c * -e.b); + return d.setTo(e.d * f * b.x + -e.c * f * b.y + (e.ty * e.c - e.tx * e.d) * f, e.a * f * b.y + -e.b * f * b.x + (-e.ty * e.a + e.tx * e.b) * f) + }, + hitTest: function(a, b, d) { + if (!a.worldVisible) return !1; + if (this.getLocalPosition(a, b, this._localPoint), d.copyFrom(this._localPoint), a.hitArea && a.hitArea.contains) return a.hitArea.contains(this._localPoint.x, this._localPoint.y); + if (a instanceof c.TileSprite) { + var e = a.width, + f = a.height, + g = -e * a.anchor.x; + if (this._localPoint.x >= g && this._localPoint.x < g + e) { + var h = -f * a.anchor.y; + if (this._localPoint.y >= h && this._localPoint.y < h + f) return !0 + } + } else if (a instanceof PIXI.Sprite) { + var e = a.texture.frame.width, + f = a.texture.frame.height, + g = -e * a.anchor.x; + if (this._localPoint.x >= g && this._localPoint.x < g + e) { + var h = -f * a.anchor.y; + if (this._localPoint.y >= h && this._localPoint.y < h + f) return !0 + } + } else if (a instanceof c.Graphics) + for (var i = 0; i < a.graphicsData.length; i++) { + var j = a.graphicsData[i]; + if (j.fill && j.shape && j.shape.contains(this._localPoint.x, this._localPoint.y)) return !0 + } + for (var i = 0; i < a.children.length; i++) + if (this.hitTest(a.children[i], b, d)) return !0; + return !1 + }, + onClickTrampoline: function() { + this.activePointer.processClickTrampolines() + } + }, c.Input.prototype.constructor = c.Input, Object.defineProperty(c.Input.prototype, "x", { + get: function() { + return this._x + }, + set: function(a) { + this._x = Math.floor(a) + } + }), Object.defineProperty(c.Input.prototype, "y", { + get: function() { + return this._y + }, + set: function(a) { + this._y = Math.floor(a) + } + }), Object.defineProperty(c.Input.prototype, "pollLocked", { + get: function() { + return this.pollRate > 0 && this._pollCounter < this.pollRate + } + }), Object.defineProperty(c.Input.prototype, "totalInactivePointers", { + get: function() { + return this.pointers.length - this.countActivePointers() + } + }), Object.defineProperty(c.Input.prototype, "totalActivePointers", { + get: function() { + return this.countActivePointers() + } + }), Object.defineProperty(c.Input.prototype, "worldX", { + get: function() { + return this.game.camera.view.x + this.x + } + }), Object.defineProperty(c.Input.prototype, "worldY", { + get: function() { + return this.game.camera.view.y + this.y + } + }), c.Mouse = function(a) { + this.game = a, this.input = a.input, this.callbackContext = this.game, this.mouseDownCallback = null, this.mouseUpCallback = null, this.mouseOutCallback = null, this.mouseOverCallback = null, this.mouseWheelCallback = null, this.capture = !1, this.button = -1, this.wheelDelta = 0, this.enabled = !0, this.locked = !1, this.stopOnGameOut = !1, this.pointerLock = new c.Signal, this.event = null, this._onMouseDown = null, this._onMouseMove = null, this._onMouseUp = null, this._onMouseOut = null, this._onMouseOver = null, this._onMouseWheel = null, this._wheelEvent = null + }, c.Mouse.NO_BUTTON = -1, c.Mouse.LEFT_BUTTON = 0, c.Mouse.MIDDLE_BUTTON = 1, c.Mouse.RIGHT_BUTTON = 2, c.Mouse.BACK_BUTTON = 3, c.Mouse.FORWARD_BUTTON = 4, c.Mouse.WHEEL_UP = 1, c.Mouse.WHEEL_DOWN = -1, c.Mouse.prototype = { + start: function() { + if ((!this.game.device.android || this.game.device.chrome !== !1) && null === this._onMouseDown) { + var b = this; + this._onMouseDown = function(a) { + return b.onMouseDown(a) + }, this._onMouseMove = function(a) { + return b.onMouseMove(a) + }, this._onMouseUp = function(a) { + return b.onMouseUp(a) + }, this._onMouseUpGlobal = function(a) { + return b.onMouseUpGlobal(a) + }, this._onMouseOutGlobal = function(a) { + return b.onMouseOutGlobal(a) + }, this._onMouseOut = function(a) { + return b.onMouseOut(a) + }, this._onMouseOver = function(a) { + return b.onMouseOver(a) + }, this._onMouseWheel = function(a) { + return b.onMouseWheel(a) + }; + var c = this.game.canvas; + c.addEventListener("mousedown", this._onMouseDown, !0), c.addEventListener("mousemove", this._onMouseMove, !0), c.addEventListener("mouseup", this._onMouseUp, !0), this.game.device.cocoonJS || (window.addEventListener("mouseup", this._onMouseUpGlobal, !0), window.addEventListener("mouseout", this._onMouseOutGlobal, !0), c.addEventListener("mouseover", this._onMouseOver, !0), c.addEventListener("mouseout", this._onMouseOut, !0)); + var d = this.game.device.wheelEvent; + d && (c.addEventListener(d, this._onMouseWheel, !0), "mousewheel" === d ? this._wheelEvent = new a((-.025), 1) : "DOMMouseScroll" === d && (this._wheelEvent = new a(1, 1))) + } + }, + onMouseDown: function(a) { + this.event = a, this.capture && a.preventDefault(), this.mouseDownCallback && this.mouseDownCallback.call(this.callbackContext, a), this.input.enabled && this.enabled && (a.identifier = 0, this.input.mousePointer.start(a)) + }, + onMouseMove: function(a) { + this.event = a, this.capture && a.preventDefault(), this.mouseMoveCallback && this.mouseMoveCallback.call(this.callbackContext, a), this.input.enabled && this.enabled && (a.identifier = 0, this.input.mousePointer.move(a)) + }, + onMouseUp: function(a) { + this.event = a, this.capture && a.preventDefault(), this.mouseUpCallback && this.mouseUpCallback.call(this.callbackContext, a), this.input.enabled && this.enabled && (a.identifier = 0, this.input.mousePointer.stop(a)) + }, + onMouseUpGlobal: function(a) { + this.input.mousePointer.withinGame || (this.mouseUpCallback && this.mouseUpCallback.call(this.callbackContext, a), a.identifier = 0, this.input.mousePointer.stop(a)) + }, + onMouseOutGlobal: function(a) { + this.event = a, this.capture && a.preventDefault(), this.input.mousePointer.withinGame = !1, this.input.enabled && this.enabled && (this.input.mousePointer.stop(a), this.input.mousePointer.leftButton.stop(a), this.input.mousePointer.rightButton.stop(a)) + }, + onMouseOut: function(a) { + this.event = a, this.capture && a.preventDefault(), this.input.mousePointer.withinGame = !1, this.mouseOutCallback && this.mouseOutCallback.call(this.callbackContext, a), this.input.enabled && this.enabled && this.stopOnGameOut && (a.identifier = 0, this.input.mousePointer.stop(a)) + }, + onMouseOver: function(a) { + this.event = a, this.capture && a.preventDefault(), this.input.mousePointer.withinGame = !0, this.mouseOverCallback && this.mouseOverCallback.call(this.callbackContext, a) + }, + onMouseWheel: function(a) { + this._wheelEvent && (a = this._wheelEvent.bindEvent(a)), this.event = a, this.capture && a.preventDefault(), this.wheelDelta = c.Math.clamp(-a.deltaY, -1, 1), this.mouseWheelCallback && this.mouseWheelCallback.call(this.callbackContext, a) + }, + requestPointerLock: function() { + if (this.game.device.pointerLock) { + var a = this.game.canvas; + a.requestPointerLock = a.requestPointerLock || a.mozRequestPointerLock || a.webkitRequestPointerLock, a.requestPointerLock(); + var b = this; + this._pointerLockChange = function(a) { + return b.pointerLockChange(a) + }, document.addEventListener("pointerlockchange", this._pointerLockChange, !0), document.addEventListener("mozpointerlockchange", this._pointerLockChange, !0), document.addEventListener("webkitpointerlockchange", this._pointerLockChange, !0) + } + }, + pointerLockChange: function(a) { + var b = this.game.canvas; + document.pointerLockElement === b || document.mozPointerLockElement === b || document.webkitPointerLockElement === b ? (this.locked = !0, this.pointerLock.dispatch(!0, a)) : (this.locked = !1, this.pointerLock.dispatch(!1, a)) + }, + releasePointerLock: function() { + document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock, document.exitPointerLock(), document.removeEventListener("pointerlockchange", this._pointerLockChange, !0), document.removeEventListener("mozpointerlockchange", this._pointerLockChange, !0), document.removeEventListener("webkitpointerlockchange", this._pointerLockChange, !0) + }, + stop: function() { + var a = this.game.canvas; + a.removeEventListener("mousedown", this._onMouseDown, !0), a.removeEventListener("mousemove", this._onMouseMove, !0), a.removeEventListener("mouseup", this._onMouseUp, !0), a.removeEventListener("mouseover", this._onMouseOver, !0), a.removeEventListener("mouseout", this._onMouseOut, !0); + var b = this.game.device.wheelEvent; + b && a.removeEventListener(b, this._onMouseWheel, !0), window.removeEventListener("mouseup", this._onMouseUpGlobal, !0), window.removeEventListener("mouseout", this._onMouseOutGlobal, !0), document.removeEventListener("pointerlockchange", this._pointerLockChange, !0), document.removeEventListener("mozpointerlockchange", this._pointerLockChange, !0), document.removeEventListener("webkitpointerlockchange", this._pointerLockChange, !0) + } + }, c.Mouse.prototype.constructor = c.Mouse, a.prototype = {}, a.prototype.constructor = a, a.prototype.bindEvent = function(b) { + if (!a._stubsGenerated && b) { + var c = function(a) { + return function() { + var b = this.originalEvent[a]; + return "function" != typeof b ? b : b.bind(this.originalEvent) + } + }; + for (var d in b) d in a.prototype || Object.defineProperty(a.prototype, d, { + get: c(d) + }); + a._stubsGenerated = !0 + } + return this.originalEvent = b, this + }, Object.defineProperties(a.prototype, { + type: { + value: "wheel" + }, + deltaMode: { + get: function() { + return this._deltaMode + } + }, + deltaY: { + get: function() { + return this._scaleFactor * (this.originalEvent.wheelDelta || this.originalEvent.detail) || 0 + } + }, + deltaX: { + get: function() { + return this._scaleFactor * this.originalEvent.wheelDeltaX || 0 + } + }, + deltaZ: { + value: 0 + } + }), c.MSPointer = function(a) { + this.game = a, this.input = a.input, this.callbackContext = this.game, this.pointerDownCallback = null, this.pointerMoveCallback = null, this.pointerUpCallback = null, this.capture = !0, this.button = -1, this.event = null, this.enabled = !0, this._onMSPointerDown = null, this._onMSPointerMove = null, this._onMSPointerUp = null, this._onMSPointerUpGlobal = null, this._onMSPointerOut = null, this._onMSPointerOver = null + }, c.MSPointer.prototype = { + start: function() { + if (null === this._onMSPointerDown) { + var a = this; + if (this.game.device.mspointer) { + this._onMSPointerDown = function(b) { + return a.onPointerDown(b) + }, this._onMSPointerMove = function(b) { + return a.onPointerMove(b) + }, this._onMSPointerUp = function(b) { + return a.onPointerUp(b) + }, this._onMSPointerUpGlobal = function(b) { + return a.onPointerUpGlobal(b) + }, this._onMSPointerOut = function(b) { + return a.onPointerOut(b) + }, this._onMSPointerOver = function(b) { + return a.onPointerOver(b) + }; + var b = this.game.canvas; + b.addEventListener("MSPointerDown", this._onMSPointerDown, !1), b.addEventListener("MSPointerMove", this._onMSPointerMove, !1), b.addEventListener("MSPointerUp", this._onMSPointerUp, !1), b.addEventListener("pointerdown", this._onMSPointerDown, !1), b.addEventListener("pointermove", this._onMSPointerMove, !1), b.addEventListener("pointerup", this._onMSPointerUp, !1), b.style["-ms-content-zooming"] = "none", b.style["-ms-touch-action"] = "none", this.game.device.cocoonJS || (window.addEventListener("MSPointerUp", this._onMSPointerUpGlobal, !0), b.addEventListener("MSPointerOver", this._onMSPointerOver, !0), b.addEventListener("MSPointerOut", this._onMSPointerOut, !0), window.addEventListener("pointerup", this._onMSPointerUpGlobal, !0), b.addEventListener("pointerover", this._onMSPointerOver, !0), b.addEventListener("pointerout", this._onMSPointerOut, !0)) + } + } + }, + onPointerDown: function(a) { + this.event = a, this.capture && a.preventDefault(), this.pointerDownCallback && this.pointerDownCallback.call(this.callbackContext, a), this.input.enabled && this.enabled && (a.identifier = a.pointerId, "mouse" === a.pointerType || 4 === a.pointerType ? this.input.mousePointer.start(a) : this.input.startPointer(a)) + }, + onPointerMove: function(a) { + this.event = a, this.capture && a.preventDefault(), this.pointerMoveCallback && this.pointerMoveCallback.call(this.callbackContext, a), this.input.enabled && this.enabled && (a.identifier = a.pointerId, "mouse" === a.pointerType || 4 === a.pointerType ? this.input.mousePointer.move(a) : this.input.updatePointer(a)) + }, + onPointerUp: function(a) { + this.event = a, this.capture && a.preventDefault(), this.pointerUpCallback && this.pointerUpCallback.call(this.callbackContext, a), this.input.enabled && this.enabled && (a.identifier = a.pointerId, "mouse" === a.pointerType || 4 === a.pointerType ? this.input.mousePointer.stop(a) : this.input.stopPointer(a)) + }, + onPointerUpGlobal: function(a) { + if ("mouse" !== a.pointerType && 4 !== a.pointerType || this.input.mousePointer.withinGame) { + var b = this.input.getPointerFromIdentifier(a.identifier); + b && b.withinGame && this.onPointerUp(a) + } else this.onPointerUp(a) + }, + onPointerOut: function(a) { + if (this.event = a, this.capture && a.preventDefault(), "mouse" === a.pointerType || 4 === a.pointerType) this.input.mousePointer.withinGame = !1; + else { + var b = this.input.getPointerFromIdentifier(a.identifier); + b && (b.withinGame = !1) + } + this.input.mouse.mouseOutCallback && this.input.mouse.mouseOutCallback.call(this.input.mouse.callbackContext, a), this.input.enabled && this.enabled && this.input.mouse.stopOnGameOut && (a.identifier = 0, b ? b.stop(a) : this.input.mousePointer.stop(a)) + }, + onPointerOver: function(a) { + if (this.event = a, this.capture && a.preventDefault(), "mouse" === a.pointerType || 4 === a.pointerType) this.input.mousePointer.withinGame = !0; + else { + var b = this.input.getPointerFromIdentifier(a.identifier); + b && (b.withinGame = !0) + } + this.input.mouse.mouseOverCallback && this.input.mouse.mouseOverCallback.call(this.input.mouse.callbackContext, a) + }, + stop: function() { + var a = this.game.canvas; + a.removeEventListener("MSPointerDown", this._onMSPointerDown, !1), a.removeEventListener("MSPointerMove", this._onMSPointerMove, !1), a.removeEventListener("MSPointerUp", this._onMSPointerUp, !1), a.removeEventListener("pointerdown", this._onMSPointerDown, !1), a.removeEventListener("pointermove", this._onMSPointerMove, !1), a.removeEventListener("pointerup", this._onMSPointerUp, !1), window.removeEventListener("MSPointerUp", this._onMSPointerUpGlobal, !0), a.removeEventListener("MSPointerOver", this._onMSPointerOver, !0), a.removeEventListener("MSPointerOut", this._onMSPointerOut, !0), window.removeEventListener("pointerup", this._onMSPointerUpGlobal, !0), a.removeEventListener("pointerover", this._onMSPointerOver, !0), a.removeEventListener("pointerout", this._onMSPointerOut, !0) + } + }, c.MSPointer.prototype.constructor = c.MSPointer, c.DeviceButton = function(a, b) { + this.parent = a, this.game = a.game, this.event = null, this.isDown = !1, this.isUp = !0, this.timeDown = 0, this.timeUp = 0, this.repeats = 0, this.altKey = !1, this.shiftKey = !1, this.ctrlKey = !1, this.value = 0, this.buttonCode = b, this.onDown = new c.Signal, this.onUp = new c.Signal, this.onFloat = new c.Signal + }, c.DeviceButton.prototype = { + start: function(a, b) { + this.isDown || (this.isDown = !0, this.isUp = !1, this.timeDown = this.game.time.time, this.repeats = 0, this.event = a, this.value = b, a && (this.altKey = a.altKey, this.shiftKey = a.shiftKey, this.ctrlKey = a.ctrlKey), this.onDown.dispatch(this, b)) + }, + stop: function(a, b) { + this.isUp || (this.isDown = !1, this.isUp = !0, this.timeUp = this.game.time.time, this.event = a, this.value = b, a && (this.altKey = a.altKey, this.shiftKey = a.shiftKey, this.ctrlKey = a.ctrlKey), this.onUp.dispatch(this, b)) + }, + padFloat: function(a) { + this.value = a, this.onFloat.dispatch(this, a) + }, + justPressed: function(a) { + return a = a || 250, this.isDown && this.timeDown + a > this.game.time.time + }, + justReleased: function(a) { + return a = a || 250, this.isUp && this.timeUp + a > this.game.time.time + }, + reset: function() { + this.isDown = !1, this.isUp = !0, this.timeDown = this.game.time.time, this.repeats = 0, this.altKey = !1, this.shiftKey = !1, this.ctrlKey = !1 + }, + destroy: function() { + this.onDown.dispose(), this.onUp.dispose(), this.onFloat.dispose(), this.parent = null, this.game = null + } + }, c.DeviceButton.prototype.constructor = c.DeviceButton, Object.defineProperty(c.DeviceButton.prototype, "duration", { + get: function() { + return this.isUp ? -1 : this.game.time.time - this.timeDown + } + }), c.Pointer = function(a, b, d) { + this.game = a, this.id = b, this.type = c.POINTER, this.exists = !0, this.identifier = 0, this.pointerId = null, this.pointerMode = d || c.PointerMode.CURSOR | c.PointerMode.CONTACT, this.target = null, this.button = null, this.leftButton = new c.DeviceButton(this, c.Pointer.LEFT_BUTTON), this.middleButton = new c.DeviceButton(this, c.Pointer.MIDDLE_BUTTON), this.rightButton = new c.DeviceButton(this, c.Pointer.RIGHT_BUTTON), this.backButton = new c.DeviceButton(this, c.Pointer.BACK_BUTTON), this.forwardButton = new c.DeviceButton(this, c.Pointer.FORWARD_BUTTON), this.eraserButton = new c.DeviceButton(this, c.Pointer.ERASER_BUTTON), this._holdSent = !1, this._history = [], this._nextDrop = 0, this._stateReset = !1, this.withinGame = !1, this.clientX = -1, this.clientY = -1, this.pageX = -1, this.pageY = -1, this.screenX = -1, this.screenY = -1, this.rawMovementX = 0, this.rawMovementY = 0, this.movementX = 0, this.movementY = 0, this.x = -1, this.y = -1, this.isMouse = 0 === b, this.isDown = !1, this.isUp = !0, this.timeDown = 0, this.timeUp = 0, this.previousTapTime = 0, this.totalTouches = 0, this.msSinceLastClick = Number.MAX_VALUE, this.targetObject = null, this.interactiveCandidates = [], this.active = !1, this.dirty = !1, this.position = new c.Point, this.positionDown = new c.Point, this.positionUp = new c.Point, this.circle = new c.Circle(0, 0, 44), this._clickTrampolines = null, this._trampolineTargetObject = null + }, c.Pointer.NO_BUTTON = 0, c.Pointer.LEFT_BUTTON = 1, c.Pointer.RIGHT_BUTTON = 2, c.Pointer.MIDDLE_BUTTON = 4, c.Pointer.BACK_BUTTON = 8, c.Pointer.FORWARD_BUTTON = 16, c.Pointer.ERASER_BUTTON = 32, c.Pointer.prototype = { + resetButtons: function() { + this.isDown = !1, this.isUp = !0, this.isMouse && (this.leftButton.reset(), this.middleButton.reset(), this.rightButton.reset(), this.backButton.reset(), this.forwardButton.reset(), this.eraserButton.reset()) + }, + processButtonsDown: function(a, b) { + c.Pointer.LEFT_BUTTON & a && this.leftButton.start(b), c.Pointer.RIGHT_BUTTON & a && this.rightButton.start(b), c.Pointer.MIDDLE_BUTTON & a && this.middleButton.start(b), c.Pointer.BACK_BUTTON & a && this.backButton.start(b), c.Pointer.FORWARD_BUTTON & a && this.forwardButton.start(b), c.Pointer.ERASER_BUTTON & a && this.eraserButton.start(b) + }, + processButtonsUp: function(a, b) { + a === c.Mouse.LEFT_BUTTON && this.leftButton.stop(b), a === c.Mouse.RIGHT_BUTTON && this.rightButton.stop(b), a === c.Mouse.MIDDLE_BUTTON && this.middleButton.stop(b), a === c.Mouse.BACK_BUTTON && this.backButton.stop(b), a === c.Mouse.FORWARD_BUTTON && this.forwardButton.stop(b), 5 === a && this.eraserButton.stop(b) + }, + updateButtons: function(a) { + this.button = a.button; + var b = "down" === a.type.toLowerCase().substr(-4); + void 0 !== a.buttons ? b ? this.processButtonsDown(a.buttons, a) : this.processButtonsUp(a.button, a) : b ? this.leftButton.start(a) : (this.leftButton.stop(a), this.rightButton.stop(a)), 1 === a.buttons && a.ctrlKey && this.leftButton.isDown && (this.leftButton.stop(a), this.rightButton.start(a)), this.isUp = !0, this.isDown = !1, (this.leftButton.isDown || this.rightButton.isDown || this.middleButton.isDown || this.backButton.isDown || this.forwardButton.isDown || this.eraserButton.isDown) && (this.isUp = !1, this.isDown = !0) + }, + start: function(a) { + var b = this.game.input; + return a.pointerId && (this.pointerId = a.pointerId), this.identifier = a.identifier, this.target = a.target, this.isMouse ? this.updateButtons(a) : (this.isDown = !0, this.isUp = !1), this.active = !0, this.withinGame = !0, this.dirty = !1, this._history = [], this._clickTrampolines = null, this._trampolineTargetObject = null, this.msSinceLastClick = this.game.time.time - this.timeDown, this.timeDown = this.game.time.time, this._holdSent = !1, this.move(a, !0), this.positionDown.setTo(this.x, this.y), (b.multiInputOverride === c.Input.MOUSE_OVERRIDES_TOUCH || b.multiInputOverride === c.Input.MOUSE_TOUCH_COMBINE || b.multiInputOverride === c.Input.TOUCH_OVERRIDES_MOUSE && 0 === b.totalActivePointers) && (b.x = this.x, b.y = this.y, b.position.setTo(this.x, this.y), b.onDown.dispatch(this, a), b.resetSpeed(this.x, this.y)), this._stateReset = !1, this.totalTouches++, null !== this.targetObject && this.targetObject._touchedHandler(this), this + }, + update: function() { + var a = this.game.input; + this.active && (this.dirty && (a.interactiveItems.total > 0 && this.processInteractiveObjects(!1), this.dirty = !1), this._holdSent === !1 && this.duration >= a.holdRate && ((a.multiInputOverride === c.Input.MOUSE_OVERRIDES_TOUCH || a.multiInputOverride === c.Input.MOUSE_TOUCH_COMBINE || a.multiInputOverride === c.Input.TOUCH_OVERRIDES_MOUSE && 0 === a.totalActivePointers) && a.onHold.dispatch(this), + this._holdSent = !0), a.recordPointerHistory && this.game.time.time >= this._nextDrop && (this._nextDrop = this.game.time.time + a.recordRate, this._history.push({ + x: this.position.x, + y: this.position.y + }), this._history.length > a.recordLimit && this._history.shift())) + }, + move: function(a, b) { + var d = this.game.input; + if (!d.pollLocked) { + if (void 0 === b && (b = !1), void 0 !== a.button && (this.button = a.button), b && this.isMouse && this.updateButtons(a), this.clientX = a.clientX, this.clientY = a.clientY, this.pageX = a.pageX, this.pageY = a.pageY, this.screenX = a.screenX, this.screenY = a.screenY, this.isMouse && d.mouse.locked && !b && (this.rawMovementX = a.movementX || a.mozMovementX || a.webkitMovementX || 0, this.rawMovementY = a.movementY || a.mozMovementY || a.webkitMovementY || 0, this.movementX += this.rawMovementX, this.movementY += this.rawMovementY), this.x = (this.pageX - this.game.scale.offset.x) * d.scale.x, this.y = (this.pageY - this.game.scale.offset.y) * d.scale.y, this.position.setTo(this.x, this.y), this.circle.x = this.x, this.circle.y = this.y, (d.multiInputOverride === c.Input.MOUSE_OVERRIDES_TOUCH || d.multiInputOverride === c.Input.MOUSE_TOUCH_COMBINE || d.multiInputOverride === c.Input.TOUCH_OVERRIDES_MOUSE && 0 === d.totalActivePointers) && (d.activePointer = this, d.x = this.x, d.y = this.y, d.position.setTo(d.x, d.y), d.circle.x = d.x, d.circle.y = d.y), this.withinGame = this.game.scale.bounds.contains(this.pageX, this.pageY), this.game.paused) return this; + for (var e = d.moveCallbacks.length; e--;) d.moveCallbacks[e].callback.call(d.moveCallbacks[e].context, this, this.x, this.y, b); + return null !== this.targetObject && this.targetObject.isDragged === !0 ? this.targetObject.update(this) === !1 && (this.targetObject = null) : d.interactiveItems.total > 0 && this.processInteractiveObjects(b), this + } + }, + processInteractiveObjects: function(a) { + var b = 0, + c = -1, + d = null, + e = this.game.input.interactiveItems.first; + for (this.interactiveCandidates = []; e;) e.checked = !1, e.validForInput(c, b, !1) && (e.checked = !0, (a && e.checkPointerDown(this, !0) || !a && e.checkPointerOver(this, !0)) && (b = e.sprite.renderOrderID, c = e.priorityID, d = e, this.interactiveCandidates.push(e))), e = this.game.input.interactiveItems.next; + for (e = this.game.input.interactiveItems.first; e;) !e.checked && e.validForInput(c, b, !0) && (a && e.checkPointerDown(this, !1) || !a && e.checkPointerOver(this, !1)) && (b = e.sprite.renderOrderID, c = e.priorityID, d = e, this.interactiveCandidates.push(e)), e = this.game.input.interactiveItems.next; + return this.game.input.customCandidateHandler && (d = this.game.input.customCandidateHandler.call(this.game.input.customCandidateHandlerContext, this, this.interactiveCandidates, d)), this.swapTarget(d, !1), null !== this.targetObject + }, + swapTarget: function(a, b) { + void 0 === b && (b = !1), null === a ? this.targetObject && (this.targetObject._pointerOutHandler(this, b), this.targetObject = null) : null === this.targetObject ? (this.targetObject = a, a._pointerOverHandler(this, b)) : this.targetObject === a ? a.update(this) === !1 && (this.targetObject = null) : (this.targetObject._pointerOutHandler(this, b), this.targetObject = a, this.targetObject._pointerOverHandler(this, b)) + }, + leave: function(a) { + this.withinGame = !1, this.move(a, !1) + }, + stop: function(a) { + var b = this.game.input; + return this._stateReset && this.withinGame ? void a.preventDefault() : (this.timeUp = this.game.time.time, (b.multiInputOverride === c.Input.MOUSE_OVERRIDES_TOUCH || b.multiInputOverride === c.Input.MOUSE_TOUCH_COMBINE || b.multiInputOverride === c.Input.TOUCH_OVERRIDES_MOUSE && 0 === b.totalActivePointers) && (b.onUp.dispatch(this, a), this.duration >= 0 && this.duration <= b.tapRate && (this.timeUp - this.previousTapTime < b.doubleTapRate ? b.onTap.dispatch(this, !0) : b.onTap.dispatch(this, !1), this.previousTapTime = this.timeUp)), this.isMouse ? this.updateButtons(a) : (this.isDown = !1, this.isUp = !0), this.id > 0 && (this.active = !1), this.withinGame = this.game.scale.bounds.contains(a.pageX, a.pageY), this.pointerId = null, this.identifier = null, this.positionUp.setTo(this.x, this.y), this.isMouse === !1 && b.currentPointers--, b.interactiveItems.callAll("_releasedHandler", this), this._clickTrampolines && (this._trampolineTargetObject = this.targetObject), this.targetObject = null, this) + }, + justPressed: function(a) { + return a = a || this.game.input.justPressedRate, this.isDown === !0 && this.timeDown + a > this.game.time.time + }, + justReleased: function(a) { + return a = a || this.game.input.justReleasedRate, this.isUp && this.timeUp + a > this.game.time.time + }, + addClickTrampoline: function(a, b, c, d) { + if (this.isDown) { + for (var e = this._clickTrampolines = this._clickTrampolines || [], f = 0; f < e.length; f++) + if (e[f].name === a) { + e.splice(f, 1); + break + } e.push({ + name: a, + targetObject: this.targetObject, + callback: b, + callbackContext: c, + callbackArgs: d + }) + } + }, + processClickTrampolines: function() { + var a = this._clickTrampolines; + if (a) { + for (var b = 0; b < a.length; b++) { + var c = a[b]; + c.targetObject === this._trampolineTargetObject && c.callback.apply(c.callbackContext, c.callbackArgs) + } + this._clickTrampolines = null, this._trampolineTargetObject = null + } + }, + reset: function() { + this.isMouse === !1 && (this.active = !1), this.pointerId = null, this.identifier = null, this.dirty = !1, this.totalTouches = 0, this._holdSent = !1, this._history.length = 0, this._stateReset = !0, this.resetButtons(), this.targetObject && this.targetObject._releasedHandler(this), this.targetObject = null + }, + resetMovement: function() { + this.movementX = 0, this.movementY = 0 + } + }, c.Pointer.prototype.constructor = c.Pointer, Object.defineProperty(c.Pointer.prototype, "duration", { + get: function() { + return this.isUp ? -1 : this.game.time.time - this.timeDown + } + }), Object.defineProperty(c.Pointer.prototype, "worldX", { + get: function() { + return this.game.world.camera.x + this.x + } + }), Object.defineProperty(c.Pointer.prototype, "worldY", { + get: function() { + return this.game.world.camera.y + this.y + } + }), c.PointerMode = { + CURSOR: 1, + CONTACT: 2 + }, c.Touch = function(a) { + this.game = a, this.enabled = !0, this.touchLockCallbacks = [], this.callbackContext = this.game, this.touchStartCallback = null, this.touchMoveCallback = null, this.touchEndCallback = null, this.touchEnterCallback = null, this.touchLeaveCallback = null, this.touchCancelCallback = null, this.preventDefault = !0, this.event = null, this._onTouchStart = null, this._onTouchMove = null, this._onTouchEnd = null, this._onTouchEnter = null, this._onTouchLeave = null, this._onTouchCancel = null, this._onTouchMove = null + }, c.Touch.prototype = { + start: function() { + if (null === this._onTouchStart) { + var a = this; + this.game.device.touch && (this._onTouchStart = function(b) { + return a.onTouchStart(b) + }, this._onTouchMove = function(b) { + return a.onTouchMove(b) + }, this._onTouchEnd = function(b) { + return a.onTouchEnd(b) + }, this._onTouchEnter = function(b) { + return a.onTouchEnter(b) + }, this._onTouchLeave = function(b) { + return a.onTouchLeave(b) + }, this._onTouchCancel = function(b) { + return a.onTouchCancel(b) + }, this.game.canvas.addEventListener("touchstart", this._onTouchStart, !1), this.game.canvas.addEventListener("touchmove", this._onTouchMove, !1), this.game.canvas.addEventListener("touchend", this._onTouchEnd, !1), this.game.canvas.addEventListener("touchcancel", this._onTouchCancel, !1), this.game.device.cocoonJS || (this.game.canvas.addEventListener("touchenter", this._onTouchEnter, !1), this.game.canvas.addEventListener("touchleave", this._onTouchLeave, !1))) + } + }, + consumeDocumentTouches: function() { + this._documentTouchMove = function(a) { + a.preventDefault() + }, document.addEventListener("touchmove", this._documentTouchMove, !1) + }, + addTouchLockCallback: function(a, b, c) { + void 0 === c && (c = !1), this.touchLockCallbacks.push({ + callback: a, + context: b, + onEnd: c + }) + }, + removeTouchLockCallback: function(a, b) { + for (var c = this.touchLockCallbacks.length; c--;) + if (this.touchLockCallbacks[c].callback === a && this.touchLockCallbacks[c].context === b) return this.touchLockCallbacks.splice(c, 1), !0; + return !1 + }, + onTouchStart: function(a) { + for (var b = this.touchLockCallbacks.length; b--;) { + var c = this.touchLockCallbacks[b]; + !c.onEnd && c.callback.call(c.context, this, a) && this.touchLockCallbacks.splice(b, 1) + } + if (this.event = a, this.game.input.enabled && this.enabled) { + this.touchStartCallback && this.touchStartCallback.call(this.callbackContext, a), this.preventDefault && a.preventDefault(); + for (var b = 0; b < a.changedTouches.length; b++) this.game.input.startPointer(a.changedTouches[b]) + } + }, + onTouchCancel: function(a) { + if (this.event = a, this.touchCancelCallback && this.touchCancelCallback.call(this.callbackContext, a), this.game.input.enabled && this.enabled) { + this.preventDefault && a.preventDefault(); + for (var b = 0; b < a.changedTouches.length; b++) this.game.input.stopPointer(a.changedTouches[b]) + } + }, + onTouchEnter: function(a) { + this.event = a, this.touchEnterCallback && this.touchEnterCallback.call(this.callbackContext, a), this.game.input.enabled && this.enabled && this.preventDefault && a.preventDefault() + }, + onTouchLeave: function(a) { + this.event = a, this.touchLeaveCallback && this.touchLeaveCallback.call(this.callbackContext, a), this.preventDefault && a.preventDefault() + }, + onTouchMove: function(a) { + this.event = a, this.touchMoveCallback && this.touchMoveCallback.call(this.callbackContext, a), this.preventDefault && a.preventDefault(); + for (var b = 0; b < a.changedTouches.length; b++) this.game.input.updatePointer(a.changedTouches[b]) + }, + onTouchEnd: function(a) { + for (var b = this.touchLockCallbacks.length; b--;) { + var c = this.touchLockCallbacks[b]; + c.onEnd && c.callback.call(c.context, this, a) && this.touchLockCallbacks.splice(b, 1) + } + this.event = a, this.touchEndCallback && this.touchEndCallback.call(this.callbackContext, a), this.preventDefault && a.preventDefault(); + for (var b = 0; b < a.changedTouches.length; b++) this.game.input.stopPointer(a.changedTouches[b]) + }, + stop: function() { + this.game.device.touch && (this.game.canvas.removeEventListener("touchstart", this._onTouchStart), this.game.canvas.removeEventListener("touchmove", this._onTouchMove), this.game.canvas.removeEventListener("touchend", this._onTouchEnd), this.game.canvas.removeEventListener("touchenter", this._onTouchEnter), this.game.canvas.removeEventListener("touchleave", this._onTouchLeave), this.game.canvas.removeEventListener("touchcancel", this._onTouchCancel)) + } + }, c.Touch.prototype.constructor = c.Touch, c.InputHandler = function(a) { + this.sprite = a, this.game = a.game, this.enabled = !1, this.checked = !1, this.priorityID = 0, this.useHandCursor = !1, this._setHandCursor = !1, this.isDragged = !1, this.allowHorizontalDrag = !0, this.allowVerticalDrag = !0, this.bringToTop = !1, this.snapOffset = null, this.snapOnDrag = !1, this.snapOnRelease = !1, this.snapX = 0, this.snapY = 0, this.snapOffsetX = 0, this.snapOffsetY = 0, this.pixelPerfectOver = !1, this.pixelPerfectClick = !1, this.pixelPerfectAlpha = 255, this.draggable = !1, this.boundsRect = null, this.boundsSprite = null, this.scaleLayer = !1, this.dragOffset = new c.Point, this.dragFromCenter = !1, this.dragStopBlocksInputUp = !1, this.dragStartPoint = new c.Point, this.dragDistanceThreshold = 0, this.dragTimeThreshold = 0, this.downPoint = new c.Point, this.snapPoint = new c.Point, this._dragPoint = new c.Point, this._dragPhase = !1, this._pendingDrag = !1, this._dragTimePass = !1, this._dragDistancePass = !1, this._wasEnabled = !1, this._tempPoint = new c.Point, this._pointerData = [], this._pointerData.push({ + id: 0, + x: 0, + y: 0, + camX: 0, + camY: 0, + isDown: !1, + isUp: !1, + isOver: !1, + isOut: !1, + timeOver: 0, + timeOut: 0, + timeDown: 0, + timeUp: 0, + downDuration: 0, + isDragged: !1 + }) + }, c.InputHandler.prototype = { + start: function(a, b) { + if (a = a || 0, void 0 === b && (b = !1), this.enabled === !1) { + this.game.input.interactiveItems.add(this), this.useHandCursor = b, this.priorityID = a; + for (var d = 0; d < 10; d++) this._pointerData[d] = { + id: d, + x: 0, + y: 0, + isDown: !1, + isUp: !1, + isOver: !1, + isOut: !1, + timeOver: 0, + timeOut: 0, + timeDown: 0, + timeUp: 0, + downDuration: 0, + isDragged: !1 + }; + this.snapOffset = new c.Point, this.enabled = !0, this._wasEnabled = !0 + } + return this.sprite.events.onAddedToGroup.add(this.addedToGroup, this), this.sprite.events.onRemovedFromGroup.add(this.removedFromGroup, this), this.sprite + }, + addedToGroup: function() { + this._dragPhase || this._wasEnabled && !this.enabled && this.start() + }, + removedFromGroup: function() { + this._dragPhase || (this.enabled ? (this._wasEnabled = !0, this.stop()) : this._wasEnabled = !1) + }, + reset: function() { + this.enabled = !1; + for (var a = 0; a < 10; a++) this._pointerData[a] = { + id: a, + x: 0, + y: 0, + isDown: !1, + isUp: !1, + isOver: !1, + isOut: !1, + timeOver: 0, + timeOut: 0, + timeDown: 0, + timeUp: 0, + downDuration: 0, + isDragged: !1 + } + }, + stop: function() { + this.enabled !== !1 && (this.enabled = !1, this.game.input.interactiveItems.remove(this)) + }, + destroy: function() { + this.sprite && (this._setHandCursor && (this.game.canvas.style.cursor = "default", this._setHandCursor = !1), this.enabled = !1, this.game.input.interactiveItems.remove(this), this._pointerData.length = 0, this.boundsRect = null, this.boundsSprite = null, this.sprite = null) + }, + validForInput: function(a, b, c) { + return void 0 === c && (c = !0), !(!this.enabled || 0 === this.sprite.scale.x || 0 === this.sprite.scale.y || this.priorityID < this.game.input.minPriorityID || this.sprite.parent && this.sprite.parent.ignoreChildInput) && (!(!c && (this.pixelPerfectClick || this.pixelPerfectOver)) && (this.priorityID > a || this.priorityID === a && this.sprite.renderOrderID > b)) + }, + isPixelPerfect: function() { + return this.pixelPerfectClick || this.pixelPerfectOver + }, + pointerX: function(a) { + return a = a || 0, this._pointerData[a].x + }, + pointerY: function(a) { + return a = a || 0, this._pointerData[a].y + }, + pointerDown: function(a) { + return a = a || 0, this._pointerData[a].isDown + }, + pointerUp: function(a) { + return a = a || 0, this._pointerData[a].isUp + }, + pointerTimeDown: function(a) { + return a = a || 0, this._pointerData[a].timeDown + }, + pointerTimeUp: function(a) { + return a = a || 0, this._pointerData[a].timeUp + }, + pointerOver: function(a) { + if (!this.enabled) return !1; + if (void 0 === a) { + for (var b = 0; b < 10; b++) + if (this._pointerData[b].isOver) return !0; + return !1 + } + return this._pointerData[a].isOver + }, + pointerOut: function(a) { + if (!this.enabled) return !1; + if (void 0 !== a) return this._pointerData[a].isOut; + for (var b = 0; b < 10; b++) + if (this._pointerData[b].isOut) return !0 + }, + pointerTimeOver: function(a) { + return a = a || 0, this._pointerData[a].timeOver + }, + pointerTimeOut: function(a) { + return a = a || 0, this._pointerData[a].timeOut + }, + pointerDragged: function(a) { + return a = a || 0, this._pointerData[a].isDragged + }, + checkPointerDown: function(a, b) { + return !!(a.isDown && this.enabled && this.sprite && this.sprite.parent && this.sprite.visible && this.sprite.parent.visible && 0 !== this.sprite.worldScale.x && 0 !== this.sprite.worldScale.y) && (!!this.game.input.hitTest(this.sprite, a, this._tempPoint) && (void 0 === b && (b = !1), !(!b && this.pixelPerfectClick) || this.checkPixel(this._tempPoint.x, this._tempPoint.y))) + }, + checkPointerOver: function(a, b) { + return !!(this.enabled && this.sprite && this.sprite.parent && this.sprite.visible && this.sprite.parent.visible && 0 !== this.sprite.worldScale.x && 0 !== this.sprite.worldScale.y) && (!!this.game.input.hitTest(this.sprite, a, this._tempPoint) && (void 0 === b && (b = !1), !(!b && this.pixelPerfectOver) || this.checkPixel(this._tempPoint.x, this._tempPoint.y))) + }, + checkPixel: function(a, b, c) { + if (this.sprite.texture.baseTexture.source) { + if (null === a && null === b) { + this.game.input.getLocalPosition(this.sprite, c, this._tempPoint); + var a = this._tempPoint.x, + b = this._tempPoint.y + } + if (0 !== this.sprite.anchor.x && (a -= -this.sprite.texture.frame.width * this.sprite.anchor.x), 0 !== this.sprite.anchor.y && (b -= -this.sprite.texture.frame.height * this.sprite.anchor.y), a += this.sprite.texture.frame.x, b += this.sprite.texture.frame.y, this.sprite.texture.trim && (a -= this.sprite.texture.trim.x, b -= this.sprite.texture.trim.y, a < this.sprite.texture.crop.x || a > this.sprite.texture.crop.right || b < this.sprite.texture.crop.y || b > this.sprite.texture.crop.bottom)) return this._dx = a, this._dy = b, !1; + this._dx = a, this._dy = b, this.game.input.hitContext.clearRect(0, 0, 1, 1), this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source, a, b, 1, 1, 0, 0, 1, 1); + var d = this.game.input.hitContext.getImageData(0, 0, 1, 1); + if (d.data[3] >= this.pixelPerfectAlpha) return !0 + } + return !1 + }, + update: function(a) { + if (null !== this.sprite && void 0 !== this.sprite.parent) return this.enabled && this.sprite.visible && this.sprite.parent.visible ? this._pendingDrag ? (this._dragDistancePass || (this._dragDistancePass = c.Math.distance(a.x, a.y, this.downPoint.x, this.downPoint.y) >= this.dragDistanceThreshold), this._dragDistancePass && this._dragTimePass && this.startDrag(a), !0) : this.draggable && this._draggedPointerID === a.id ? this.updateDrag(a, !1) : this._pointerData[a.id].isOver ? this.checkPointerOver(a) ? (this._pointerData[a.id].x = a.x - this.sprite.x, this._pointerData[a.id].y = a.y - this.sprite.y, !0) : (this._pointerOutHandler(a), !1) : void 0 : (this._pointerOutHandler(a), !1) + }, + _pointerOverHandler: function(a, b) { + if (null !== this.sprite) { + var d = this._pointerData[a.id]; + if (d.isOver === !1 || a.dirty) { + var e = d.isOver === !1; + d.isOver = !0, d.isOut = !1, d.timeOver = this.game.time.time, d.x = a.x - this.sprite.x, d.y = a.y - this.sprite.y, this.useHandCursor && d.isDragged === !1 && (this.game.canvas.style.cursor = "pointer", this._setHandCursor = !0), !b && e && this.sprite && this.sprite.events && this.sprite.events.onInputOver$dispatch(this.sprite, a), this.sprite.parent && this.sprite.parent.type === c.GROUP && this.sprite.parent.onChildInputOver.dispatch(this.sprite, a) + } + } + }, + _pointerOutHandler: function(a, b) { + if (null !== this.sprite) { + var d = this._pointerData[a.id]; + d.isOver = !1, d.isOut = !0, d.timeOut = this.game.time.time, this.useHandCursor && d.isDragged === !1 && (this.game.canvas.style.cursor = "default", this._setHandCursor = !1), !b && this.sprite && this.sprite.events && (this.sprite.events.onInputOut$dispatch(this.sprite, a), this.sprite && this.sprite.parent && this.sprite.parent.type === c.GROUP && this.sprite.parent.onChildInputOut.dispatch(this.sprite, a)) + } + }, + _touchedHandler: function(a) { + if (null !== this.sprite) { + var b = this._pointerData[a.id]; + if (!b.isDown && b.isOver) { + if (this.pixelPerfectClick && !this.checkPixel(null, null, a)) return; + if (b.isDown = !0, b.isUp = !1, b.timeDown = this.game.time.time, this.downPoint.set(a.x, a.y), a.dirty = !0, this.sprite && this.sprite.events && (this.sprite.events.onInputDown$dispatch(this.sprite, a), this.sprite && this.sprite.parent && this.sprite.parent.type === c.GROUP && this.sprite.parent.onChildInputDown.dispatch(this.sprite, a), null === this.sprite)) return; + this.draggable && this.isDragged === !1 && (0 === this.dragTimeThreshold && 0 === this.dragDistanceThreshold ? this.startDrag(a) : (this._pendingDrag = !0, this._dragDistancePass = 0 === this.dragDistanceThreshold, this.dragTimeThreshold > 0 ? (this._dragTimePass = !1, this.game.time.events.add(this.dragTimeThreshold, this.dragTimeElapsed, this, a)) : this._dragTimePass = !0)), this.bringToTop && this.sprite.bringToTop() + } + } + }, + dragTimeElapsed: function(a) { + this._dragTimePass = !0, this._pendingDrag && this.sprite && this._dragDistancePass && this.startDrag(a) + }, + _releasedHandler: function(a) { + if (null !== this.sprite) { + var b = this._pointerData[a.id]; + if (b.isDown && a.isUp) { + b.isDown = !1, b.isUp = !0, b.timeUp = this.game.time.time, b.downDuration = b.timeUp - b.timeDown; + var d = this.checkPointerOver(a); + this.sprite && this.sprite.events && (this.dragStopBlocksInputUp && (!this.dragStopBlocksInputUp || this.draggable && this.isDragged && this._draggedPointerID === a.id) || this.sprite.events.onInputUp$dispatch(this.sprite, a, d), this.sprite && this.sprite.parent && this.sprite.parent.type === c.GROUP && this.sprite.parent.onChildInputUp.dispatch(this.sprite, a, d), d && (d = this.checkPointerOver(a))), b.isOver = d, !d && this.useHandCursor && (this.game.canvas.style.cursor = "default", this._setHandCursor = !1), a.dirty = !0, this._pendingDrag = !1, this.draggable && this.isDragged && this._draggedPointerID === a.id && this.stopDrag(a) + } + } + }, + updateDrag: function(a, b) { + if (void 0 === b && (b = !1), a.isUp) return this.stopDrag(a), !1; + var c = this.globalToLocalX(a.x) + this._dragPoint.x + this.dragOffset.x, + d = this.globalToLocalY(a.y) + this._dragPoint.y + this.dragOffset.y; + if (this.sprite.fixedToCamera) this.allowHorizontalDrag && (this.sprite.cameraOffset.x = c), this.allowVerticalDrag && (this.sprite.cameraOffset.y = d), this.boundsRect && this.checkBoundsRect(), this.boundsSprite && this.checkBoundsSprite(), this.snapOnDrag && (this.sprite.cameraOffset.x = Math.round((this.sprite.cameraOffset.x - this.snapOffsetX % this.snapX) / this.snapX) * this.snapX + this.snapOffsetX % this.snapX, this.sprite.cameraOffset.y = Math.round((this.sprite.cameraOffset.y - this.snapOffsetY % this.snapY) / this.snapY) * this.snapY + this.snapOffsetY % this.snapY, this.snapPoint.set(this.sprite.cameraOffset.x, this.sprite.cameraOffset.y)); + else { + var e = this.game.camera.x - this._pointerData[a.id].camX, + f = this.game.camera.y - this._pointerData[a.id].camY; + this.allowHorizontalDrag && (this.sprite.x = c + e), this.allowVerticalDrag && (this.sprite.y = d + f), this.boundsRect && this.checkBoundsRect(), this.boundsSprite && this.checkBoundsSprite(), this.snapOnDrag && (this.sprite.x = Math.round((this.sprite.x - this.snapOffsetX % this.snapX) / this.snapX) * this.snapX + this.snapOffsetX % this.snapX, this.sprite.y = Math.round((this.sprite.y - this.snapOffsetY % this.snapY) / this.snapY) * this.snapY + this.snapOffsetY % this.snapY, this.snapPoint.set(this.sprite.x, this.sprite.y)) + } + return this.sprite.events.onDragUpdate.dispatch(this.sprite, a, c, d, this.snapPoint, b), !0 + }, + justOver: function(a, b) { + return a = a || 0, b = b || 500, this._pointerData[a].isOver && this.overDuration(a) < b + }, + justOut: function(a, b) { + return a = a || 0, b = b || 500, this._pointerData[a].isOut && this.game.time.time - this._pointerData[a].timeOut < b + }, + justPressed: function(a, b) { + return a = a || 0, b = b || 500, this._pointerData[a].isDown && this.downDuration(a) < b + }, + justReleased: function(a, b) { + return a = a || 0, b = b || 500, this._pointerData[a].isUp && this.game.time.time - this._pointerData[a].timeUp < b + }, + overDuration: function(a) { + return a = a || 0, this._pointerData[a].isOver ? this.game.time.time - this._pointerData[a].timeOver : -1 + }, + downDuration: function(a) { + return a = a || 0, this._pointerData[a].isDown ? this.game.time.time - this._pointerData[a].timeDown : -1 + }, + enableDrag: function(a, b, d, e, f, g) { + void 0 === a && (a = !1), void 0 === b && (b = !1), void 0 === d && (d = !1), void 0 === e && (e = 255), void 0 === f && (f = null), void 0 === g && (g = null), this._dragPoint = new c.Point, this.draggable = !0, this.bringToTop = b, this.dragOffset = new c.Point, this.dragFromCenter = a, this.pixelPerfectClick = d, this.pixelPerfectAlpha = e, f && (this.boundsRect = f), g && (this.boundsSprite = g) + }, + disableDrag: function() { + if (this._pointerData) + for (var a = 0; a < 10; a++) this._pointerData[a].isDragged = !1; + this.draggable = !1, this.isDragged = !1, this._draggedPointerID = -1, this._pendingDrag = !1 + }, + startDrag: function(a) { + var b = this.sprite.x, + c = this.sprite.y; + if (this.isDragged = !0, this._draggedPointerID = a.id, this._pointerData[a.id].camX = this.game.camera.x, this._pointerData[a.id].camY = this.game.camera.y, this._pointerData[a.id].isDragged = !0, this.sprite.fixedToCamera) { + if (this.dragFromCenter) { + var d = this.sprite.getBounds(); + this.sprite.cameraOffset.x = this.globalToLocalX(a.x) + (this.sprite.cameraOffset.x - d.centerX), this.sprite.cameraOffset.y = this.globalToLocalY(a.y) + (this.sprite.cameraOffset.y - d.centerY) + } + this._dragPoint.setTo(this.sprite.cameraOffset.x - a.x, this.sprite.cameraOffset.y - a.y) + } else { + if (this.dragFromCenter) { + var d = this.sprite.getBounds(); + this.sprite.x = this.globalToLocalX(a.x) + (this.sprite.x - d.centerX), this.sprite.y = this.globalToLocalY(a.y) + (this.sprite.y - d.centerY) + } + this._dragPoint.setTo(this.sprite.x - this.globalToLocalX(a.x), this.sprite.y - this.globalToLocalY(a.y)) + } + this.updateDrag(a, !0), this.bringToTop && (this._dragPhase = !0, this.sprite.bringToTop()), this.dragStartPoint.set(b, c), this.sprite.events.onDragStart$dispatch(this.sprite, a, b, c), this._pendingDrag = !1 + }, + globalToLocalX: function(a) { + return this.scaleLayer && (a -= this.game.scale.grid.boundsFluid.x, a *= this.game.scale.grid.scaleFluidInversed.x), a + }, + globalToLocalY: function(a) { + return this.scaleLayer && (a -= this.game.scale.grid.boundsFluid.y, a *= this.game.scale.grid.scaleFluidInversed.y), a + }, + stopDrag: function(a) { + this.isDragged = !1, this._draggedPointerID = -1, this._pointerData[a.id].isDragged = !1, this._dragPhase = !1, this._pendingDrag = !1, this.snapOnRelease && (this.sprite.fixedToCamera ? (this.sprite.cameraOffset.x = Math.round((this.sprite.cameraOffset.x - this.snapOffsetX % this.snapX) / this.snapX) * this.snapX + this.snapOffsetX % this.snapX, this.sprite.cameraOffset.y = Math.round((this.sprite.cameraOffset.y - this.snapOffsetY % this.snapY) / this.snapY) * this.snapY + this.snapOffsetY % this.snapY) : (this.sprite.x = Math.round((this.sprite.x - this.snapOffsetX % this.snapX) / this.snapX) * this.snapX + this.snapOffsetX % this.snapX, this.sprite.y = Math.round((this.sprite.y - this.snapOffsetY % this.snapY) / this.snapY) * this.snapY + this.snapOffsetY % this.snapY)), this.sprite.events.onDragStop$dispatch(this.sprite, a), this.checkPointerOver(a) === !1 && this._pointerOutHandler(a) + }, + setDragLock: function(a, b) { + void 0 === a && (a = !0), void 0 === b && (b = !0), this.allowHorizontalDrag = a, this.allowVerticalDrag = b + }, + enableSnap: function(a, b, c, d, e, f) { + void 0 === c && (c = !0), void 0 === d && (d = !1), void 0 === e && (e = 0), void 0 === f && (f = 0), this.snapX = a, this.snapY = b, this.snapOffsetX = e, this.snapOffsetY = f, this.snapOnDrag = c, this.snapOnRelease = d + }, + disableSnap: function() { + this.snapOnDrag = !1, this.snapOnRelease = !1 + }, + checkBoundsRect: function() { + this.sprite.fixedToCamera ? (this.sprite.cameraOffset.x < this.boundsRect.left ? this.sprite.cameraOffset.x = this.boundsRect.left : this.sprite.cameraOffset.x + this.sprite.width > this.boundsRect.right && (this.sprite.cameraOffset.x = this.boundsRect.right - this.sprite.width), this.sprite.cameraOffset.y < this.boundsRect.top ? this.sprite.cameraOffset.y = this.boundsRect.top : this.sprite.cameraOffset.y + this.sprite.height > this.boundsRect.bottom && (this.sprite.cameraOffset.y = this.boundsRect.bottom - this.sprite.height)) : (this.sprite.left < this.boundsRect.left ? this.sprite.x = this.boundsRect.x + this.sprite.offsetX : this.sprite.right > this.boundsRect.right && (this.sprite.x = this.boundsRect.right - (this.sprite.width - this.sprite.offsetX)), this.sprite.top < this.boundsRect.top ? this.sprite.y = this.boundsRect.top + this.sprite.offsetY : this.sprite.bottom > this.boundsRect.bottom && (this.sprite.y = this.boundsRect.bottom - (this.sprite.height - this.sprite.offsetY))) + }, + checkBoundsSprite: function() { + this.sprite.fixedToCamera && this.boundsSprite.fixedToCamera ? (this.sprite.cameraOffset.x < this.boundsSprite.cameraOffset.x ? this.sprite.cameraOffset.x = this.boundsSprite.cameraOffset.x : this.sprite.cameraOffset.x + this.sprite.width > this.boundsSprite.cameraOffset.x + this.boundsSprite.width && (this.sprite.cameraOffset.x = this.boundsSprite.cameraOffset.x + this.boundsSprite.width - this.sprite.width), this.sprite.cameraOffset.y < this.boundsSprite.cameraOffset.y ? this.sprite.cameraOffset.y = this.boundsSprite.cameraOffset.y : this.sprite.cameraOffset.y + this.sprite.height > this.boundsSprite.cameraOffset.y + this.boundsSprite.height && (this.sprite.cameraOffset.y = this.boundsSprite.cameraOffset.y + this.boundsSprite.height - this.sprite.height)) : (this.sprite.left < this.boundsSprite.left ? this.sprite.x = this.boundsSprite.left + this.sprite.offsetX : this.sprite.right > this.boundsSprite.right && (this.sprite.x = this.boundsSprite.right - (this.sprite.width - this.sprite.offsetX)), this.sprite.top < this.boundsSprite.top ? this.sprite.y = this.boundsSprite.top + this.sprite.offsetY : this.sprite.bottom > this.boundsSprite.bottom && (this.sprite.y = this.boundsSprite.bottom - (this.sprite.height - this.sprite.offsetY))) + } + }, c.InputHandler.prototype.constructor = c.InputHandler, c.Gamepad = function(a) { + this.game = a, this._gamepadIndexMap = {}, this._rawPads = [], this._active = !1, this.enabled = !0, this._gamepadSupportAvailable = !!navigator.webkitGetGamepads || !!navigator.webkitGamepads || navigator.userAgent.indexOf("Firefox/") !== -1 || !!navigator.getGamepads, this._prevRawGamepadTypes = [], this._prevTimestamps = [], this.callbackContext = this, this.onConnectCallback = null, this.onDisconnectCallback = null, this.onDownCallback = null, this.onUpCallback = null, this.onAxisCallback = null, this.onFloatCallback = null, this._ongamepadconnected = null, this._gamepaddisconnected = null, this._gamepads = [new c.SinglePad(a, this), new c.SinglePad(a, this), new c.SinglePad(a, this), new c.SinglePad(a, this)] + }, c.Gamepad.prototype = { + addCallbacks: function(a, b) { + "undefined" != typeof b && (this.onConnectCallback = "function" == typeof b.onConnect ? b.onConnect : this.onConnectCallback, this.onDisconnectCallback = "function" == typeof b.onDisconnect ? b.onDisconnect : this.onDisconnectCallback, this.onDownCallback = "function" == typeof b.onDown ? b.onDown : this.onDownCallback, this.onUpCallback = "function" == typeof b.onUp ? b.onUp : this.onUpCallback, this.onAxisCallback = "function" == typeof b.onAxis ? b.onAxis : this.onAxisCallback, this.onFloatCallback = "function" == typeof b.onFloat ? b.onFloat : this.onFloatCallback, this.callbackContext = a) + }, + start: function() { + if (!this._active) { + this._active = !0; + var a = this; + this._onGamepadConnected = function(b) { + return a.onGamepadConnected(b) + }, this._onGamepadDisconnected = function(b) { + return a.onGamepadDisconnected(b) + }, window.addEventListener("gamepadconnected", this._onGamepadConnected, !1), window.addEventListener("gamepaddisconnected", this._onGamepadDisconnected, !1) + } + }, + onGamepadConnected: function(a) { + var b = a.gamepad; + this._rawPads.push(b), this._gamepads[b.index].connect(b) + }, + onGamepadDisconnected: function(a) { + var b = a.gamepad; + for (var c in this._rawPads) this._rawPads[c].index === b.index && this._rawPads.splice(c, 1); + this._gamepads[b.index].disconnect() + }, + update: function() { + this._pollGamepads(), this.pad1.pollStatus(), this.pad2.pollStatus(), this.pad3.pollStatus(), this.pad4.pollStatus() + }, + _pollGamepads: function() { + if (this._active) { + if (navigator.getGamepads) var a = navigator.getGamepads(); + else if (navigator.webkitGetGamepads) var a = navigator.webkitGetGamepads(); + else if (navigator.webkitGamepads) var a = navigator.webkitGamepads(); + if (a) { + this._rawPads = []; + for (var b = !1, c = 0; c < a.length && (typeof a[c] !== this._prevRawGamepadTypes[c] && (b = !0, this._prevRawGamepadTypes[c] = typeof a[c]), a[c] && this._rawPads.push(a[c]), 3 !== c); c++); + for (var d = 0; d < this._gamepads.length; d++) this._gamepads[d]._rawPad = this._rawPads[d]; + if (b) { + for (var e, f = { + rawIndices: {}, + padIndices: {} + }, g = 0; g < this._gamepads.length; g++) + if (e = this._gamepads[g], e.connected) + for (var h = 0; h < this._rawPads.length; h++) this._rawPads[h].index === e.index && (f.rawIndices[e.index] = !0, f.padIndices[g] = !0); + for (var i = 0; i < this._gamepads.length; i++) + if (e = this._gamepads[i], !f.padIndices[i]) { + this._rawPads.length < 1 && e.disconnect(); + for (var j = 0; j < this._rawPads.length && !f.padIndices[i]; j++) { + var k = this._rawPads[j]; + if (k) { + if (f.rawIndices[k.index]) { + e.disconnect(); + continue + } + e.connect(k), f.rawIndices[k.index] = !0, f.padIndices[i] = !0 + } else e.disconnect() + } + } + } + } + } + }, + setDeadZones: function(a) { + for (var b = 0; b < this._gamepads.length; b++) this._gamepads[b].deadZone = a + }, + stop: function() { + this._active = !1, window.removeEventListener("gamepadconnected", this._onGamepadConnected), window.removeEventListener("gamepaddisconnected", this._onGamepadDisconnected) + }, + reset: function() { + this.update(); + for (var a = 0; a < this._gamepads.length; a++) this._gamepads[a].reset() + }, + justPressed: function(a, b) { + for (var c = 0; c < this._gamepads.length; c++) + if (this._gamepads[c].justPressed(a, b) === !0) return !0; + return !1 + }, + justReleased: function(a, b) { + for (var c = 0; c < this._gamepads.length; c++) + if (this._gamepads[c].justReleased(a, b) === !0) return !0; + return !1 + }, + isDown: function(a) { + for (var b = 0; b < this._gamepads.length; b++) + if (this._gamepads[b].isDown(a) === !0) return !0; + return !1 + }, + destroy: function() { + this.stop(); + for (var a = 0; a < this._gamepads.length; a++) this._gamepads[a].destroy() + } + }, c.Gamepad.prototype.constructor = c.Gamepad, Object.defineProperty(c.Gamepad.prototype, "active", { + get: function() { + return this._active + } + }), Object.defineProperty(c.Gamepad.prototype, "supported", { + get: function() { + return this._gamepadSupportAvailable + } + }), Object.defineProperty(c.Gamepad.prototype, "padsConnected", { + get: function() { + return this._rawPads.length + } + }), Object.defineProperty(c.Gamepad.prototype, "pad1", { + get: function() { + return this._gamepads[0] + } + }), Object.defineProperty(c.Gamepad.prototype, "pad2", { + get: function() { + return this._gamepads[1] + } + }), Object.defineProperty(c.Gamepad.prototype, "pad3", { + get: function() { + return this._gamepads[2] + } + }), Object.defineProperty(c.Gamepad.prototype, "pad4", { + get: function() { + return this._gamepads[3] + } + }), c.Gamepad.BUTTON_0 = 0, c.Gamepad.BUTTON_1 = 1, c.Gamepad.BUTTON_2 = 2, c.Gamepad.BUTTON_3 = 3, c.Gamepad.BUTTON_4 = 4, c.Gamepad.BUTTON_5 = 5, c.Gamepad.BUTTON_6 = 6, c.Gamepad.BUTTON_7 = 7, c.Gamepad.BUTTON_8 = 8, c.Gamepad.BUTTON_9 = 9, c.Gamepad.BUTTON_10 = 10, c.Gamepad.BUTTON_11 = 11, c.Gamepad.BUTTON_12 = 12, c.Gamepad.BUTTON_13 = 13, c.Gamepad.BUTTON_14 = 14, c.Gamepad.BUTTON_15 = 15, c.Gamepad.AXIS_0 = 0, c.Gamepad.AXIS_1 = 1, c.Gamepad.AXIS_2 = 2, c.Gamepad.AXIS_3 = 3, c.Gamepad.AXIS_4 = 4, c.Gamepad.AXIS_5 = 5, c.Gamepad.AXIS_6 = 6, c.Gamepad.AXIS_7 = 7, c.Gamepad.AXIS_8 = 8, c.Gamepad.AXIS_9 = 9, c.Gamepad.XBOX360_A = 0, c.Gamepad.XBOX360_B = 1, c.Gamepad.XBOX360_X = 2, c.Gamepad.XBOX360_Y = 3, c.Gamepad.XBOX360_LEFT_BUMPER = 4, c.Gamepad.XBOX360_RIGHT_BUMPER = 5, c.Gamepad.XBOX360_LEFT_TRIGGER = 6, c.Gamepad.XBOX360_RIGHT_TRIGGER = 7, c.Gamepad.XBOX360_BACK = 8, c.Gamepad.XBOX360_START = 9, c.Gamepad.XBOX360_STICK_LEFT_BUTTON = 10, c.Gamepad.XBOX360_STICK_RIGHT_BUTTON = 11, c.Gamepad.XBOX360_DPAD_LEFT = 14, c.Gamepad.XBOX360_DPAD_RIGHT = 15, c.Gamepad.XBOX360_DPAD_UP = 12, c.Gamepad.XBOX360_DPAD_DOWN = 13, c.Gamepad.XBOX360_STICK_LEFT_X = 0, c.Gamepad.XBOX360_STICK_LEFT_Y = 1, c.Gamepad.XBOX360_STICK_RIGHT_X = 2, c.Gamepad.XBOX360_STICK_RIGHT_Y = 3, c.Gamepad.PS3XC_X = 0, c.Gamepad.PS3XC_CIRCLE = 1, + c.Gamepad.PS3XC_SQUARE = 2; + c.Gamepad.PS3XC_TRIANGLE = 3; + c.Gamepad.PS3XC_L1 = 4, c.Gamepad.PS3XC_R1 = 5, c.Gamepad.PS3XC_L2 = 6, c.Gamepad.PS3XC_R2 = 7, c.Gamepad.PS3XC_SELECT = 8, c.Gamepad.PS3XC_START = 9, c.Gamepad.PS3XC_STICK_LEFT_BUTTON = 10, c.Gamepad.PS3XC_STICK_RIGHT_BUTTON = 11, c.Gamepad.PS3XC_DPAD_UP = 12, c.Gamepad.PS3XC_DPAD_DOWN = 13, c.Gamepad.PS3XC_DPAD_LEFT = 14, c.Gamepad.PS3XC_DPAD_RIGHT = 15, c.Gamepad.PS3XC_STICK_LEFT_X = 0, c.Gamepad.PS3XC_STICK_LEFT_Y = 1, c.Gamepad.PS3XC_STICK_RIGHT_X = 2, c.Gamepad.PS3XC_STICK_RIGHT_Y = 3, c.SinglePad = function(a, b) { + this.game = a, this.index = null, this.connected = !1, this.callbackContext = this, this.onConnectCallback = null, this.onDisconnectCallback = null, this.onDownCallback = null, this.onUpCallback = null, this.onAxisCallback = null, this.onFloatCallback = null, this.deadZone = .26, this._padParent = b, this._rawPad = null, this._prevTimestamp = null, this._buttons = [], this._buttonsLen = 0, this._axes = [], this._axesLen = 0 + }, c.SinglePad.prototype = { + addCallbacks: function(a, b) { + "undefined" != typeof b && (this.onConnectCallback = "function" == typeof b.onConnect ? b.onConnect : this.onConnectCallback, this.onDisconnectCallback = "function" == typeof b.onDisconnect ? b.onDisconnect : this.onDisconnectCallback, this.onDownCallback = "function" == typeof b.onDown ? b.onDown : this.onDownCallback, this.onUpCallback = "function" == typeof b.onUp ? b.onUp : this.onUpCallback, this.onAxisCallback = "function" == typeof b.onAxis ? b.onAxis : this.onAxisCallback, this.onFloatCallback = "function" == typeof b.onFloat ? b.onFloat : this.onFloatCallback, this.callbackContext = a) + }, + getButton: function(a) { + return this._buttons[a] ? this._buttons[a] : null + }, + pollStatus: function() { + if (this.connected && this.game.input.enabled && this.game.input.gamepad.enabled && (!this._rawPad.timestamp || this._rawPad.timestamp !== this._prevTimestamp)) { + for (var a = 0; a < this._buttonsLen; a++) { + var b = isNaN(this._rawPad.buttons[a]) ? this._rawPad.buttons[a].value : this._rawPad.buttons[a]; + b !== this._buttons[a].value && (1 === b ? this.processButtonDown(a, b) : 0 === b ? this.processButtonUp(a, b) : this.processButtonFloat(a, b)) + } + for (var c = 0; c < this._axesLen; c++) { + var d = this._rawPad.axes[c]; + d > 0 && d > this.deadZone || d < 0 && d < -this.deadZone ? this.processAxisChange(c, d) : this.processAxisChange(c, 0) + } + this._prevTimestamp = this._rawPad.timestamp + } + }, + connect: function(a) { + var b = !this.connected; + this.connected = !0, this.index = a.index, this._rawPad = a, this._buttons = [], this._buttonsLen = a.buttons.length, this._axes = [], this._axesLen = a.axes.length; + for (var d = 0; d < this._axesLen; d++) this._axes[d] = a.axes[d]; + for (var e in a.buttons) e = parseInt(e, 10), this._buttons[e] = new c.DeviceButton(this, e); + b && this._padParent.onConnectCallback && this._padParent.onConnectCallback.call(this._padParent.callbackContext, this.index), b && this.onConnectCallback && this.onConnectCallback.call(this.callbackContext) + }, + disconnect: function() { + var a = this.connected, + b = this.index; + this.connected = !1, this.index = null, this._rawPad = void 0; + for (var c = 0; c < this._buttonsLen; c++) this._buttons[c].destroy(); + this._buttons = [], this._buttonsLen = 0, this._axes = [], this._axesLen = 0, a && this._padParent.onDisconnectCallback && this._padParent.onDisconnectCallback.call(this._padParent.callbackContext, b), a && this.onDisconnectCallback && this.onDisconnectCallback.call(this.callbackContext) + }, + destroy: function() { + this._rawPad = void 0; + for (var a = 0; a < this._buttonsLen; a++) this._buttons[a].destroy(); + this._buttons = [], this._buttonsLen = 0, this._axes = [], this._axesLen = 0, this.onConnectCallback = null, this.onDisconnectCallback = null, this.onDownCallback = null, this.onUpCallback = null, this.onAxisCallback = null, this.onFloatCallback = null + }, + processAxisChange: function(a, b) { + this._axes[a] !== b && (this._axes[a] = b, this._padParent.onAxisCallback && this._padParent.onAxisCallback.call(this._padParent.callbackContext, this, a, b), this.onAxisCallback && this.onAxisCallback.call(this.callbackContext, this, a, b)) + }, + processButtonDown: function(a, b) { + this._buttons[a] && this._buttons[a].start(null, b), this._padParent.onDownCallback && this._padParent.onDownCallback.call(this._padParent.callbackContext, a, b, this.index), this.onDownCallback && this.onDownCallback.call(this.callbackContext, a, b) + }, + processButtonUp: function(a, b) { + this._padParent.onUpCallback && this._padParent.onUpCallback.call(this._padParent.callbackContext, a, b, this.index), this.onUpCallback && this.onUpCallback.call(this.callbackContext, a, b), this._buttons[a] && this._buttons[a].stop(null, b) + }, + processButtonFloat: function(a, b) { + this._padParent.onFloatCallback && this._padParent.onFloatCallback.call(this._padParent.callbackContext, a, b, this.index), this.onFloatCallback && this.onFloatCallback.call(this.callbackContext, a, b), this._buttons[a] && this._buttons[a].padFloat(b) + }, + axis: function(a) { + return !!this._axes[a] && this._axes[a] + }, + isDown: function(a) { + return !!this._buttons[a] && this._buttons[a].isDown + }, + isUp: function(a) { + return !!this._buttons[a] && this._buttons[a].isUp + }, + justReleased: function(a, b) { + if (this._buttons[a]) return this._buttons[a].justReleased(b) + }, + justPressed: function(a, b) { + if (this._buttons[a]) return this._buttons[a].justPressed(b) + }, + buttonValue: function(a) { + return this._buttons[a] ? this._buttons[a].value : null + }, + reset: function() { + for (var a = 0; a < this._axes.length; a++) this._axes[a] = 0 + } + }, c.SinglePad.prototype.constructor = c.SinglePad, c.Key = function(a, b) { + this.game = a, this._enabled = !0, this.event = null, this.isDown = !1, this.isUp = !0, this.altKey = !1, this.ctrlKey = !1, this.shiftKey = !1, this.timeDown = 0, this.duration = 0, this.timeUp = -2500, this.repeats = 0, this.keyCode = b, this.onDown = new c.Signal, this.onHoldCallback = null, this.onHoldContext = null, this.onUp = new c.Signal, this._justDown = !1, this._justUp = !1 + }, c.Key.prototype = { + update: function() { + this._enabled && this.isDown && (this.duration = this.game.time.time - this.timeDown, this.repeats++, this.onHoldCallback && this.onHoldCallback.call(this.onHoldContext, this)) + }, + processKeyDown: function(a) { + this._enabled && (this.event = a, this.isDown || (this.altKey = a.altKey, this.ctrlKey = a.ctrlKey, this.shiftKey = a.shiftKey, this.isDown = !0, this.isUp = !1, this.timeDown = this.game.time.time, this.duration = 0, this.repeats = 0, this._justDown = !0, this.onDown.dispatch(this))) + }, + processKeyUp: function(a) { + this._enabled && (this.event = a, this.isUp || (this.isDown = !1, this.isUp = !0, this.timeUp = this.game.time.time, this.duration = this.game.time.time - this.timeDown, this._justUp = !0, this.onUp.dispatch(this))) + }, + reset: function(a) { + void 0 === a && (a = !0), this.isDown = !1, this.isUp = !0, this.timeUp = this.game.time.time, this.duration = 0, this._enabled = !0, this._justDown = !1, this._justUp = !1, a && (this.onDown.removeAll(), this.onUp.removeAll(), this.onHoldCallback = null, this.onHoldContext = null) + }, + downDuration: function(a) { + return void 0 === a && (a = 50), this.isDown && this.duration < a + }, + upDuration: function(a) { + return void 0 === a && (a = 50), !this.isDown && this.game.time.time - this.timeUp < a + } + }, Object.defineProperty(c.Key.prototype, "justDown", { + get: function() { + var a = this._justDown; + return this._justDown = !1, a + } + }), Object.defineProperty(c.Key.prototype, "justUp", { + get: function() { + var a = this._justUp; + return this._justUp = !1, a + } + }), Object.defineProperty(c.Key.prototype, "enabled", { + get: function() { + return this._enabled + }, + set: function(a) { + a = !!a, a !== this._enabled && (a || this.reset(!1), this._enabled = a) + } + }), c.Key.prototype.constructor = c.Key, c.Keyboard = function(a) { + this.game = a, this.enabled = !0, this.event = null, this.pressEvent = null, this.callbackContext = this, this.onDownCallback = null, this.onPressCallback = null, this.onUpCallback = null, this._keys = [], this._capture = [], this._onKeyDown = null, this._onKeyPress = null, this._onKeyUp = null, this._i = 0, this._k = 0 + }, c.Keyboard.prototype = { + addCallbacks: function(a, b, c, d) { + this.callbackContext = a, void 0 !== b && null !== b && (this.onDownCallback = b), void 0 !== c && null !== c && (this.onUpCallback = c), void 0 !== d && null !== d && (this.onPressCallback = d) + }, + addKey: function(a) { + return this._keys[a] || (this._keys[a] = new c.Key(this.game, a), this.addKeyCapture(a)), this._keys[a] + }, + addKeys: function(a) { + var b = {}; + for (var c in a) b[c] = this.addKey(a[c]); + return b + }, + removeKey: function(a) { + this._keys[a] && (this._keys[a] = null, this.removeKeyCapture(a)) + }, + createCursorKeys: function() { + return this.addKeys({ + up: c.KeyCode.UP, + down: c.KeyCode.DOWN, + left: c.KeyCode.LEFT, + right: c.KeyCode.RIGHT + }) + }, + start: function() { + if (!this.game.device.cocoonJS && null === this._onKeyDown) { + var a = this; + this._onKeyDown = function(b) { + return a.processKeyDown(b) + }, this._onKeyUp = function(b) { + return a.processKeyUp(b) + }, this._onKeyPress = function(b) { + return a.processKeyPress(b) + }, window.addEventListener("keydown", this._onKeyDown, !1), window.addEventListener("keyup", this._onKeyUp, !1), window.addEventListener("keypress", this._onKeyPress, !1) + } + }, + stop: function() { + window.removeEventListener("keydown", this._onKeyDown), window.removeEventListener("keyup", this._onKeyUp), window.removeEventListener("keypress", this._onKeyPress), this._onKeyDown = null, this._onKeyUp = null, this._onKeyPress = null + }, + destroy: function() { + this.stop(), this.clearCaptures(), this._keys.length = 0, this._i = 0 + }, + addKeyCapture: function(a) { + if ("object" == typeof a) + for (var b in a) this._capture[a[b]] = !0; + else this._capture[a] = !0 + }, + removeKeyCapture: function(a) { + delete this._capture[a] + }, + clearCaptures: function() { + this._capture = {} + }, + update: function() { + for (this._i = this._keys.length; this._i--;) this._keys[this._i] && this._keys[this._i].update() + }, + processKeyDown: function(a) { + if (this.event = a, this.game.input.enabled && this.enabled) { + var b = a.keyCode; + this._capture[b] && a.preventDefault(), this._keys[b] || (this._keys[b] = new c.Key(this.game, b)), this._keys[b].processKeyDown(a), this._k = b, this.onDownCallback && this.onDownCallback.call(this.callbackContext, a) + } + }, + processKeyPress: function(a) { + this.pressEvent = a, this.game.input.enabled && this.enabled && this.onPressCallback && this.onPressCallback.call(this.callbackContext, String.fromCharCode(a.charCode), a) + }, + processKeyUp: function(a) { + if (this.event = a, this.game.input.enabled && this.enabled) { + var b = a.keyCode; + this._capture[b] && a.preventDefault(), this._keys[b] || (this._keys[b] = new c.Key(this.game, b)), this._keys[b].processKeyUp(a), this.onUpCallback && this.onUpCallback.call(this.callbackContext, a) + } + }, + reset: function(a) { + void 0 === a && (a = !0), this.event = null; + for (var b = this._keys.length; b--;) this._keys[b] && this._keys[b].reset(a) + }, + downDuration: function(a, b) { + return this._keys[a] ? this._keys[a].downDuration(b) : null + }, + upDuration: function(a, b) { + return this._keys[a] ? this._keys[a].upDuration(b) : null + }, + isDown: function(a) { + return this._keys[a] ? this._keys[a].isDown : null + } + }, Object.defineProperty(c.Keyboard.prototype, "lastChar", { + get: function() { + return 32 === this.event.charCode ? "" : String.fromCharCode(this.pressEvent.charCode) + } + }), Object.defineProperty(c.Keyboard.prototype, "lastKey", { + get: function() { + return this._keys[this._k] + } + }), c.Keyboard.prototype.constructor = c.Keyboard, c.KeyCode = { + A: "A".charCodeAt(0), + B: "B".charCodeAt(0), + C: "C".charCodeAt(0), + D: "D".charCodeAt(0), + E: "E".charCodeAt(0), + F: "F".charCodeAt(0), + G: "G".charCodeAt(0), + H: "H".charCodeAt(0), + I: "I".charCodeAt(0), + J: "J".charCodeAt(0), + K: "K".charCodeAt(0), + L: "L".charCodeAt(0), + M: "M".charCodeAt(0), + N: "N".charCodeAt(0), + O: "O".charCodeAt(0), + P: "P".charCodeAt(0), + Q: "Q".charCodeAt(0), + R: "R".charCodeAt(0), + S: "S".charCodeAt(0), + T: "T".charCodeAt(0), + U: "U".charCodeAt(0), + V: "V".charCodeAt(0), + W: "W".charCodeAt(0), + X: "X".charCodeAt(0), + Y: "Y".charCodeAt(0), + Z: "Z".charCodeAt(0), + ZERO: "0".charCodeAt(0), + ONE: "1".charCodeAt(0), + TWO: "2".charCodeAt(0), + THREE: "3".charCodeAt(0), + FOUR: "4".charCodeAt(0), + FIVE: "5".charCodeAt(0), + SIX: "6".charCodeAt(0), + SEVEN: "7".charCodeAt(0), + EIGHT: "8".charCodeAt(0), + NINE: "9".charCodeAt(0), + NUMPAD_0: 96, + NUMPAD_1: 97, + NUMPAD_2: 98, + NUMPAD_3: 99, + NUMPAD_4: 100, + NUMPAD_5: 101, + NUMPAD_6: 102, + NUMPAD_7: 103, + NUMPAD_8: 104, + NUMPAD_9: 105, + NUMPAD_MULTIPLY: 106, + NUMPAD_ADD: 107, + NUMPAD_ENTER: 108, + NUMPAD_SUBTRACT: 109, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + F1: 112, + F2: 113, + F3: 114, + F4: 115, + F5: 116, + F6: 117, + F7: 118, + F8: 119, + F9: 120, + F10: 121, + F11: 122, + F12: 123, + F13: 124, + F14: 125, + F15: 126, + COLON: 186, + EQUALS: 187, + COMMA: 188, + UNDERSCORE: 189, + PERIOD: 190, + QUESTION_MARK: 191, + TILDE: 192, + OPEN_BRACKET: 219, + BACKWARD_SLASH: 220, + CLOSED_BRACKET: 221, + QUOTES: 222, + BACKSPACE: 8, + TAB: 9, + CLEAR: 12, + ENTER: 13, + SHIFT: 16, + CONTROL: 17, + ALT: 18, + CAPS_LOCK: 20, + ESC: 27, + SPACEBAR: 32, + PAGE_UP: 33, + PAGE_DOWN: 34, + END: 35, + HOME: 36, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + PLUS: 43, + MINUS: 44, + INSERT: 45, + DELETE: 46, + HELP: 47, + NUM_LOCK: 144 + }; + for (var e in c.KeyCode) c.KeyCode.hasOwnProperty(e) && !e.match(/[a-z]/) && (c.Keyboard[e] = c.KeyCode[e]); + c.Component = function() {}, c.Component.Angle = function() {}, c.Component.Angle.prototype = { + angle: { + get: function() { + return c.Math.wrapAngle(c.Math.radToDeg(this.rotation)) + }, + set: function(a) { + this.rotation = c.Math.degToRad(c.Math.wrapAngle(a)) + } + } + }, c.Component.Animation = function() {}, c.Component.Animation.prototype = { + play: function(a, b, c, d) { + if (this.animations) return this.animations.play(a, b, c, d) + } + }, c.Component.AutoCull = function() {}, c.Component.AutoCull.prototype = { + autoCull: !1, + inCamera: { + get: function() { + return this.autoCull || this.checkWorldBounds || (this._bounds.copyFrom(this.getBounds()), this._bounds.x += this.game.camera.view.x, this._bounds.y += this.game.camera.view.y), this.game.world.camera.view.intersects(this._bounds) + } + } + }, c.Component.Bounds = function() {}, c.Component.Bounds.prototype = { + offsetX: { + get: function() { + return this.anchor.x * this.width + } + }, + offsetY: { + get: function() { + return this.anchor.y * this.height + } + }, + centerX: { + get: function() { + return this.x - this.offsetX + .5 * this.width + }, + set: function(a) { + this.x = a + this.offsetX - .5 * this.width + } + }, + centerY: { + get: function() { + return this.y - this.offsetY + .5 * this.height + }, + set: function(a) { + this.y = a + this.offsetY - .5 * this.height + } + }, + left: { + get: function() { + return this.x - this.offsetX + }, + set: function(a) { + this.x = a + this.offsetX + } + }, + right: { + get: function() { + return this.x + this.width - this.offsetX + }, + set: function(a) { + this.x = a - this.width + this.offsetX + } + }, + top: { + get: function() { + return this.y - this.offsetY + }, + set: function(a) { + this.y = a + this.offsetY + } + }, + bottom: { + get: function() { + return this.y + this.height - this.offsetY + }, + set: function(a) { + this.y = a - this.height + this.offsetY + } + }, + alignIn: function(a, b, d, e) { + switch (void 0 === d && (d = 0), void 0 === e && (e = 0), b) { + default: + case c.TOP_LEFT: + this.left = a.left - d, this.top = a.top - e; + break; + case c.TOP_CENTER: + this.centerX = a.centerX + d, this.top = a.top - e; + break; + case c.TOP_RIGHT: + this.right = a.right + d, this.top = a.top - e; + break; + case c.LEFT_CENTER: + this.left = a.left - d, this.centerY = a.centerY + e; + break; + case c.CENTER: + this.centerX = a.centerX + d, this.centerY = a.centerY + e; + break; + case c.RIGHT_CENTER: + this.right = a.right + d, this.centerY = a.centerY + e; + break; + case c.BOTTOM_LEFT: + this.left = a.left - d, this.bottom = a.bottom + e; + break; + case c.BOTTOM_CENTER: + this.centerX = a.centerX + d, this.bottom = a.bottom + e; + break; + case c.BOTTOM_RIGHT: + this.right = a.right + d, this.bottom = a.bottom + e + } + return this + }, + alignTo: function(a, b, d, e) { + switch (void 0 === d && (d = 0), void 0 === e && (e = 0), b) { + default: + case c.TOP_LEFT: + this.left = a.left - d, this.bottom = a.top - e; + break; + case c.TOP_CENTER: + this.centerX = a.centerX + d, this.bottom = a.top - e; + break; + case c.TOP_RIGHT: + this.right = a.right + d, this.bottom = a.top - e; + break; + case c.LEFT_TOP: + this.right = a.left - d, this.top = a.top - e; + break; + case c.LEFT_CENTER: + this.right = a.left - d, this.centerY = a.centerY + e; + break; + case c.LEFT_BOTTOM: + this.right = a.left - d, this.bottom = a.bottom + e; + break; + case c.RIGHT_TOP: + this.left = a.right + d, this.top = a.top - e; + break; + case c.RIGHT_CENTER: + this.left = a.right + d, this.centerY = a.centerY + e; + break; + case c.RIGHT_BOTTOM: + this.left = a.right + d, this.bottom = a.bottom + e; + break; + case c.BOTTOM_LEFT: + this.left = a.left - d, this.top = a.bottom + e; + break; + case c.BOTTOM_CENTER: + this.centerX = a.centerX + d, this.top = a.bottom + e; + break; + case c.BOTTOM_RIGHT: + this.right = a.right + d, this.top = a.bottom + e + } + return this + } + }, c.Group.prototype.alignIn = c.Component.Bounds.prototype.alignIn, c.Group.prototype.alignTo = c.Component.Bounds.prototype.alignTo, c.Component.BringToTop = function() {}, c.Component.BringToTop.prototype.bringToTop = function() { + return this.parent && this.parent.bringToTop(this), this + }, c.Component.BringToTop.prototype.sendToBack = function() { + return this.parent && this.parent.sendToBack(this), this + }, c.Component.BringToTop.prototype.moveUp = function() { + return this.parent && this.parent.moveUp(this), this + }, c.Component.BringToTop.prototype.moveDown = function() { + return this.parent && this.parent.moveDown(this), this + }, c.Component.Core = function() {}, c.Component.Core.install = function(a) { + c.Utils.mixinPrototype(this, c.Component.Core.prototype), this.components = {}; + for (var b = 0; b < a.length; b++) { + var d = a[b], + e = !1; + "Destroy" === d && (e = !0), c.Utils.mixinPrototype(this, c.Component[d].prototype, e), this.components[d] = !0 + } + }, c.Component.Core.init = function(a, b, d, e, f) { + this.game = a, this.key = e, this.data = {}, this.position.set(b, d), this.world = new c.Point(b, d), this.previousPosition = new c.Point(b, d), this.events = new c.Events(this), this._bounds = new c.Rectangle, this.components.PhysicsBody && (this.body = this.body), this.components.Animation && (this.animations = new c.AnimationManager(this)), this.components.LoadTexture && null !== e && this.loadTexture(e, f), this.components.FixedToCamera && (this.cameraOffset = new c.Point(b, d)) + }, c.Component.Core.preUpdate = function() { + if (this.pendingDestroy) return void this.destroy(); + if (this.previousPosition.set(this.world.x, this.world.y), this.previousRotation = this.rotation, !this.exists || !this.parent.exists) return this.renderOrderID = -1, !1; + this.world.setTo(this.game.camera.x + this.worldTransform.tx, this.game.camera.y + this.worldTransform.ty), this.visible && (this.renderOrderID = this.game.stage.currentRenderOrderID++), this.animations && this.animations.update(), this.body && this.body.preUpdate(); + for (var a = 0; a < this.children.length; a++) this.children[a].preUpdate(); + return !0 + }, c.Component.Core.prototype = { + game: null, + name: "", + data: {}, + components: {}, + z: 0, + events: void 0, + animations: void 0, + key: "", + world: null, + debug: !1, + previousPosition: null, + previousRotation: 0, + renderOrderID: 0, + fresh: !0, + pendingDestroy: !1, + _bounds: null, + _exists: !0, + exists: { + get: function() { + return this._exists + }, + set: function(a) { + a ? (this._exists = !0, this.body && this.body.type === c.Physics.P2JS && this.body.addToWorld(), this.visible = !0) : (this._exists = !1, this.body && this.body.type === c.Physics.P2JS && this.body.removeFromWorld(), this.visible = !1) + } + }, + update: function() {}, + postUpdate: function() { + this.customRender && this.key.render(), this.components.PhysicsBody && c.Component.PhysicsBody.postUpdate.call(this), this.components.FixedToCamera && c.Component.FixedToCamera.postUpdate.call(this); + for (var a = 0; a < this.children.length; a++) this.children[a].postUpdate() + } + }, c.Component.Crop = function() {}, c.Component.Crop.prototype = { + cropRect: null, + _crop: null, + crop: function(a, b) { + void 0 === b && (b = !1), a ? (b && null !== this.cropRect ? this.cropRect.setTo(a.x, a.y, a.width, a.height) : b && null === this.cropRect ? this.cropRect = new c.Rectangle(a.x, a.y, a.width, a.height) : this.cropRect = a, this.updateCrop()) : (this._crop = null, this.cropRect = null, this.resetFrame()) + }, + updateCrop: function() { + if (this.cropRect) { + var a = this.texture.crop.x, + b = this.texture.crop.y, + d = this.texture.crop.width, + e = this.texture.crop.height; + this._crop = c.Rectangle.clone(this.cropRect, this._crop), this._crop.x += this._frame.x, this._crop.y += this._frame.y; + var f = Math.max(this._frame.x, this._crop.x), + g = Math.max(this._frame.y, this._crop.y), + h = Math.min(this._frame.right, this._crop.right) - f, + i = Math.min(this._frame.bottom, this._crop.bottom) - g; + this.texture.crop.x = f, this.texture.crop.y = g, this.texture.crop.width = h, this.texture.crop.height = i, this.texture.frame.width = Math.min(h, this.cropRect.width), this.texture.frame.height = Math.min(i, this.cropRect.height), this.texture.width = this.texture.frame.width, this.texture.height = this.texture.frame.height, this.texture._updateUvs(), 16777215 === this.tint || a === f && b === g && d === h && e === i || (this.texture.requiresReTint = !0) + } + } + }, c.Component.Delta = function() {}, c.Component.Delta.prototype = { + deltaX: { + get: function() { + return this.world.x - this.previousPosition.x + } + }, + deltaY: { + get: function() { + return this.world.y - this.previousPosition.y + } + }, + deltaZ: { + get: function() { + return this.rotation - this.previousRotation + } + } + }, c.Component.Destroy = function() {}, c.Component.Destroy.prototype = { + destroyPhase: !1, + destroy: function(a, b) { + if (null !== this.game && !this.destroyPhase) { + void 0 === a && (a = !0), void 0 === b && (b = !1), this.destroyPhase = !0, this.events && this.events.onDestroy$dispatch(this), this.parent && (this.parent instanceof c.Group ? this.parent.remove(this) : this.parent.removeChild(this)), this.input && this.input.destroy(), this.animations && this.animations.destroy(), this.body && this.body.destroy(), this.events && this.events.destroy(), this.game.tweens.removeFrom(this); + var d = this.children.length; + if (a) + for (; d--;) this.children[d].destroy(a); + else + for (; d--;) this.removeChild(this.children[d]); + this._crop && (this._crop = null, this.cropRect = null), this._frame && (this._frame = null), c.Video && this.key instanceof c.Video && this.key.onChangeSource.remove(this.resizeFrame, this), c.BitmapText && this._glyphs && (this._glyphs = []), this.alive = !1, this.exists = !1, this.visible = !1, this.filters = null, this.mask = null, this.game = null, this.data = {}, this.renderable = !1, this.transformCallback && (this.transformCallback = null, this.transformCallbackContext = null), this.hitArea = null, this.parent = null, this.stage = null, this.worldTransform = null, this.filterArea = null, this._bounds = null, this._currentBounds = null, this._mask = null, this._destroyCachedSprite(), b && this.texture.destroy(!0), this.destroyPhase = !1, this.pendingDestroy = !1 + } + } + }, c.Events = function(a) { + this.parent = a + }, c.Events.prototype = { + destroy: function() { + this._parent = null, this._onDestroy && this._onDestroy.dispose(), this._onAddedToGroup && this._onAddedToGroup.dispose(), this._onRemovedFromGroup && this._onRemovedFromGroup.dispose(), this._onRemovedFromWorld && this._onRemovedFromWorld.dispose(), this._onKilled && this._onKilled.dispose(), this._onRevived && this._onRevived.dispose(), this._onEnterBounds && this._onEnterBounds.dispose(), this._onOutOfBounds && this._onOutOfBounds.dispose(), this._onInputOver && this._onInputOver.dispose(), this._onInputOut && this._onInputOut.dispose(), this._onInputDown && this._onInputDown.dispose(), this._onInputUp && this._onInputUp.dispose(), this._onDragStart && this._onDragStart.dispose(), this._onDragUpdate && this._onDragUpdate.dispose(), this._onDragStop && this._onDragStop.dispose(), this._onAnimationStart && this._onAnimationStart.dispose(), this._onAnimationComplete && this._onAnimationComplete.dispose(), this._onAnimationLoop && this._onAnimationLoop.dispose() + }, + onAddedToGroup: null, + onRemovedFromGroup: null, + onRemovedFromWorld: null, + onDestroy: null, + onKilled: null, + onRevived: null, + onOutOfBounds: null, + onEnterBounds: null, + onInputOver: null, + onInputOut: null, + onInputDown: null, + onInputUp: null, + onDragStart: null, + onDragUpdate: null, + onDragStop: null, + onAnimationStart: null, + onAnimationComplete: null, + onAnimationLoop: null + }, c.Events.prototype.constructor = c.Events; + for (var f in c.Events.prototype) c.Events.prototype.hasOwnProperty(f) && 0 === f.indexOf("on") && null === c.Events.prototype[f] && ! function(a, b) { + "use strict"; + Object.defineProperty(c.Events.prototype, a, { + get: function() { + return this[b] || (this[b] = new c.Signal) + } + }), c.Events.prototype[a + "$dispatch"] = function() { + return this[b] ? this[b].dispatch.apply(this[b], arguments) : null + } + }(f, "_" + f); + c.Component.FixedToCamera = function() {}, c.Component.FixedToCamera.postUpdate = function() { + this.fixedToCamera && (this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x, this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y) + }, c.Component.FixedToCamera.prototype = { + _fixedToCamera: !1, + fixedToCamera: { + get: function() { + return this._fixedToCamera + }, + set: function(a) { + a ? (this._fixedToCamera = !0, this.cameraOffset.set(this.x, this.y)) : this._fixedToCamera = !1 + } + }, + cameraOffset: new c.Point + }, c.Component.Health = function() {}, c.Component.Health.prototype = { + health: 1, + maxHealth: 100, + damage: function(a) { + return this.alive && (this.health -= a, this.health <= 0 && this.kill()), this + }, + setHealth: function(a) { + return this.health = a, this.health > this.maxHealth && (this.health = this.maxHealth), this + }, + heal: function(a) { + return this.alive && (this.health += a, this.health > this.maxHealth && (this.health = this.maxHealth)), this + } + }, c.Component.InCamera = function() {}, c.Component.InCamera.prototype = { + inCamera: { + get: function() { + return this.game.world.camera.view.intersects(this._bounds) + } + } + }, c.Component.InputEnabled = function() {}, c.Component.InputEnabled.prototype = { + input: null, + inputEnabled: { + get: function() { + return this.input && this.input.enabled + }, + set: function(a) { + a ? null === this.input ? (this.input = new c.InputHandler(this), this.input.start()) : this.input && !this.input.enabled && this.input.start() : this.input && this.input.enabled && this.input.stop() + } + } + }, c.Component.InWorld = function() {}, c.Component.InWorld.preUpdate = function() { + if (this.autoCull || this.checkWorldBounds) { + if (this._bounds.copyFrom(this.getBounds()), this._bounds.x += this.game.camera.view.x, this._bounds.y += this.game.camera.view.y, this.autoCull) + if (this.game.world.camera.view.intersects(this._bounds)) this.renderable = !0, this.game.world.camera.totalInView++; + else if (this.renderable = !1, this.outOfCameraBoundsKill) return this.kill(), !1; + if (this.checkWorldBounds) + if (this._outOfBoundsFired && this.game.world.bounds.intersects(this._bounds)) this._outOfBoundsFired = !1, this.events.onEnterBounds$dispatch(this); + else if (!this._outOfBoundsFired && !this.game.world.bounds.intersects(this._bounds) && (this._outOfBoundsFired = !0, this.events.onOutOfBounds$dispatch(this), this.outOfBoundsKill)) return this.kill(), !1 + } + return !0 + }, c.Component.InWorld.prototype = { + checkWorldBounds: !1, + outOfBoundsKill: !1, + outOfCameraBoundsKill: !1, + _outOfBoundsFired: !1, + inWorld: { + get: function() { + return this.game.world.bounds.intersects(this.getBounds()) + } + } + }, c.Component.LifeSpan = function() {}, c.Component.LifeSpan.preUpdate = function() { + return !(this.lifespan > 0 && (this.lifespan -= this.game.time.physicsElapsedMS, this.lifespan <= 0)) || (this.kill(), !1) + }, c.Component.LifeSpan.prototype = { + alive: !0, + lifespan: 0, + revive: function(a) { + return void 0 === a && (a = 100), this.alive = !0, this.exists = !0, this.visible = !0, "function" == typeof this.setHealth && this.setHealth(a), this.events && this.events.onRevived$dispatch(this), this + }, + kill: function() { + return this.alive = !1, this.exists = !1, this.visible = !1, this.events && this.events.onKilled$dispatch(this), this + } + }, c.Component.LoadTexture = function() {}, c.Component.LoadTexture.prototype = { + customRender: !1, + _frame: null, + loadTexture: function(a, b, d) { + a === c.PENDING_ATLAS ? (a = b, b = 0) : b = b || 0, (d || void 0 === d) && this.animations && this.animations.stop(), this.key = a, this.customRender = !1; + var e = this.game.cache, + f = !0, + g = !this.texture.baseTexture.scaleMode; + if (c.RenderTexture && a instanceof c.RenderTexture) this.key = a.key, this.setTexture(a); + else if (c.BitmapData && a instanceof c.BitmapData) this.customRender = !0, this.setTexture(a.texture), f = e.hasFrameData(a.key, c.Cache.BITMAPDATA) ? !this.animations.loadFrameData(e.getFrameData(a.key, c.Cache.BITMAPDATA), b) : !this.animations.loadFrameData(a.frameData, 0); + else if (c.Video && a instanceof c.Video) { + this.customRender = !0; + var h = a.texture.valid; + this.setTexture(a.texture), this.setFrame(a.texture.frame.clone()), a.onChangeSource.add(this.resizeFrame, this), this.texture.valid = h + } else if (c.Tilemap && a instanceof c.TilemapLayer) this.setTexture(PIXI.Texture.fromCanvas(a.canvas)); + else if (a instanceof PIXI.Texture) this.setTexture(a); + else { + var i = e.getImage(a, !0); + this.key = i.key, this.setTexture(new PIXI.Texture(i.base)), "__default" === a ? this.texture.baseTexture.skipRender = !0 : this.texture.baseTexture.skipRender = !1, f = !this.animations.loadFrameData(i.frameData, b) + } + f && (this._frame = c.Rectangle.clone(this.texture.frame)), g || (this.texture.baseTexture.scaleMode = 1) + }, + setFrame: function(a) { + this._frame = a, this.texture.frame.x = a.x, this.texture.frame.y = a.y, this.texture.frame.width = a.width, this.texture.frame.height = a.height, this.texture.crop.x = a.x, this.texture.crop.y = a.y, this.texture.crop.width = a.width, this.texture.crop.height = a.height, a.trimmed ? (this.texture.trim ? (this.texture.trim.x = a.spriteSourceSizeX, this.texture.trim.y = a.spriteSourceSizeY, this.texture.trim.width = a.sourceSizeW, this.texture.trim.height = a.sourceSizeH) : this.texture.trim = { + x: a.spriteSourceSizeX, + y: a.spriteSourceSizeY, + width: a.sourceSizeW, + height: a.sourceSizeH + }, this.texture.width = a.sourceSizeW, this.texture.height = a.sourceSizeH, this.texture.frame.width = a.sourceSizeW, this.texture.frame.height = a.sourceSizeH) : !a.trimmed && this.texture.trim && (this.texture.trim = null), this.cropRect && this.updateCrop(), this.texture.requiresReTint = !0, this.texture._updateUvs(), this.tilingTexture && (this.refreshTexture = !0) + }, + resizeFrame: function(a, b, c) { + this.texture.frame.resize(b, c), this.texture.setFrame(this.texture.frame) + }, + resetFrame: function() { + this._frame && this.setFrame(this._frame) + }, + frame: { + get: function() { + return this.animations.frame + }, + set: function(a) { + this.animations.frame = a + } + }, + frameName: { + get: function() { + return this.animations.frameName + }, + set: function(a) { + this.animations.frameName = a + } + } + }, c.Component.Overlap = function() {}, c.Component.Overlap.prototype = { + overlap: function(a) { + return c.Rectangle.intersects(this.getBounds(), a.getBounds()) + } + }, c.Component.PhysicsBody = function() {}, c.Component.PhysicsBody.preUpdate = function() { + return this.fresh && this.exists ? (this.world.setTo(this.parent.position.x + this.position.x, this.parent.position.y + this.position.y), this.worldTransform.tx = this.world.x, this.worldTransform.ty = this.world.y, this.previousPosition.set(this.world.x, this.world.y), this.previousRotation = this.rotation, this.body && this.body.preUpdate(), this.fresh = !1, !1) : (this.previousPosition.set(this.world.x, this.world.y), this.previousRotation = this.rotation, !(!this._exists || !this.parent.exists) || (this.renderOrderID = -1, !1)) + }, c.Component.PhysicsBody.postUpdate = function() { + this.exists && this.body && this.body.postUpdate() + }, c.Component.PhysicsBody.prototype = { + body: null, + x: { + get: function() { + return this.position.x + }, + set: function(a) { + this.position.x = a, this.body && !this.body.dirty && (this.body._reset = !0) + } + }, + y: { + get: function() { + return this.position.y + }, + set: function(a) { + this.position.y = a, this.body && !this.body.dirty && (this.body._reset = !0) + } + } + }, c.Component.Reset = function() {}, c.Component.Reset.prototype.reset = function(a, b, c) { + return void 0 === c && (c = 1), this.world.set(a, b), this.position.set(a, b), this.fresh = !0, this.exists = !0, this.visible = !0, this.renderable = !0, this.components.InWorld && (this._outOfBoundsFired = !1), this.components.LifeSpan && (this.alive = !0, this.health = c), this.components.PhysicsBody && this.body && this.body.reset(a, b, !1, !1), this + }, c.Component.ScaleMinMax = function() {}, c.Component.ScaleMinMax.prototype = { + transformCallback: null, + transformCallbackContext: this, + scaleMin: null, + scaleMax: null, + checkTransform: function(a) { + this.scaleMin && (a.a < this.scaleMin.x && (a.a = this.scaleMin.x), a.d < this.scaleMin.y && (a.d = this.scaleMin.y)), this.scaleMax && (a.a > this.scaleMax.x && (a.a = this.scaleMax.x), a.d > this.scaleMax.y && (a.d = this.scaleMax.y)) + }, + setScaleMinMax: function(a, b, d, e) { + void 0 === b ? b = d = e = a : void 0 === d && (d = e = b, b = a), null === a ? this.scaleMin = null : this.scaleMin ? this.scaleMin.set(a, b) : this.scaleMin = new c.Point(a, b), null === d ? this.scaleMax = null : this.scaleMax ? this.scaleMax.set(d, e) : this.scaleMax = new c.Point(d, e), null === this.scaleMin ? this.transformCallback = null : (this.transformCallback = this.checkTransform, this.transformCallbackContext = this) + } + }, c.Component.Smoothed = function() {}, c.Component.Smoothed.prototype = { + smoothed: { + get: function() { + return !this.texture.baseTexture.scaleMode + }, + set: function(a) { + a ? this.texture && (this.texture.baseTexture.scaleMode = 0) : this.texture && (this.texture.baseTexture.scaleMode = 1) + } + } + }, c.GameObjectFactory = function(a) { + this.game = a, this.world = this.game.world + }, c.GameObjectFactory.prototype = { + existing: function(a) { + return this.world.add(a) + }, + weapon: function(a, b, d, e) { + var f = this.game.plugins.add(c.Weapon); + return f.createBullets(a, b, d, e), f + }, + image: function(a, b, d, e, f) { + return void 0 === f && (f = this.world), f.add(new c.Image(this.game, a, b, d, e)) + }, + sprite: function(a, b, c, d, e) { + return void 0 === e && (e = this.world), e.create(a, b, c, d) + }, + creature: function(a, b, d, e, f) { + void 0 === f && (f = this.world); + var g = new c.Creature(this.game, a, b, d, e); + return f.add(g), g + }, + tween: function(a) { + return this.game.tweens.create(a) + }, + group: function(a, b, d, e, f) { + return new c.Group(this.game, a, b, d, e, f) + }, + physicsGroup: function(a, b, d, e) { + return new c.Group(this.game, b, d, e, (!0), a) + }, + spriteBatch: function(a, b, d) { + return void 0 === a && (a = null), void 0 === b && (b = "group"), void 0 === d && (d = !1), new c.SpriteBatch(this.game, a, b, d) + }, + audio: function(a, b, c, d) { + return this.game.sound.add(a, b, c, d) + }, + sound: function(a, b, c, d) { + return this.game.sound.add(a, b, c, d) + }, + audioSprite: function(a) { + return this.game.sound.addSprite(a) + }, + tileSprite: function(a, b, d, e, f, g, h) { + return void 0 === h && (h = this.world), h.add(new c.TileSprite(this.game, a, b, d, e, f, g)) + }, + rope: function(a, b, d, e, f, g) { + return void 0 === g && (g = this.world), g.add(new c.Rope(this.game, a, b, d, e, f)) + }, + text: function(a, b, d, e, f) { + return void 0 === f && (f = this.world), f.add(new c.Text(this.game, a, b, d, e)) + }, + button: function(a, b, d, e, f, g, h, i, j, k) { + return void 0 === k && (k = this.world), k.add(new c.Button(this.game, a, b, d, e, f, g, h, i, j)) + }, + graphics: function(a, b, d) { + return void 0 === d && (d = this.world), d.add(new c.Graphics(this.game, a, b)) + }, + emitter: function(a, b, d) { + return this.game.particles.add(new c.Particles.Arcade.Emitter(this.game, a, b, d)) + }, + retroFont: function(a, b, d, e, f, g, h, i, j) { + return new c.RetroFont(this.game, a, b, d, e, f, g, h, i, j) + }, + bitmapText: function(a, b, d, e, f, g) { + return void 0 === g && (g = this.world), g.add(new c.BitmapText(this.game, a, b, d, e, f)) + }, + tilemap: function(a, b, d, e, f) { + return new c.Tilemap(this.game, a, b, d, e, f) + }, + renderTexture: function(a, b, d, e) { + void 0 !== d && "" !== d || (d = this.game.rnd.uuid()), void 0 === e && (e = !1); + var f = new c.RenderTexture(this.game, a, b, d); + return e && this.game.cache.addRenderTexture(d, f), f + }, + video: function(a, b) { + return new c.Video(this.game, a, b) + }, + bitmapData: function(a, b, d, e) { + void 0 === e && (e = !1), void 0 !== d && "" !== d || (d = this.game.rnd.uuid()); + var f = new c.BitmapData(this.game, d, a, b); + return e && this.game.cache.addBitmapData(d, f), f + }, + filter: function(a) { + var b = Array.prototype.slice.call(arguments, 1), + a = new c.Filter[a](this.game); + return a.init.apply(a, b), a + }, + plugin: function(a) { + return this.game.plugins.add(a) + } + }, c.GameObjectFactory.prototype.constructor = c.GameObjectFactory, c.GameObjectCreator = function(a) { + this.game = a, this.world = this.game.world + }, c.GameObjectCreator.prototype = { + image: function(a, b, d, e) { + return new c.Image(this.game, a, b, d, e) + }, + sprite: function(a, b, d, e) { + return new c.Sprite(this.game, a, b, d, e) + }, + tween: function(a) { + return new c.Tween(a, this.game, this.game.tweens) + }, + group: function(a, b, d, e, f) { + return new c.Group(this.game, a, b, d, e, f) + }, + spriteBatch: function(a, b, d) { + return void 0 === b && (b = "group"), void 0 === d && (d = !1), new c.SpriteBatch(this.game, a, b, d) + }, + audio: function(a, b, c, d) { + return this.game.sound.add(a, b, c, d) + }, + audioSprite: function(a) { + return this.game.sound.addSprite(a) + }, + sound: function(a, b, c, d) { + return this.game.sound.add(a, b, c, d) + }, + tileSprite: function(a, b, d, e, f, g) { + return new c.TileSprite(this.game, a, b, d, e, f, g) + }, + rope: function(a, b, d, e, f) { + return new c.Rope(this.game, a, b, d, e, f) + }, + text: function(a, b, d, e) { + return new c.Text(this.game, a, b, d, e) + }, + button: function(a, b, d, e, f, g, h, i, j) { + return new c.Button(this.game, a, b, d, e, f, g, h, i, j) + }, + graphics: function(a, b) { + return new c.Graphics(this.game, a, b) + }, + emitter: function(a, b, d) { + return new c.Particles.Arcade.Emitter(this.game, a, b, d) + }, + retroFont: function(a, b, d, e, f, g, h, i, j) { + return new c.RetroFont(this.game, a, b, d, e, f, g, h, i, j) + }, + bitmapText: function(a, b, d, e, f, g) { + return new c.BitmapText(this.game, a, b, d, e, f, g) + }, + tilemap: function(a, b, d, e, f) { + return new c.Tilemap(this.game, a, b, d, e, f) + }, + renderTexture: function(a, b, d, e) { + void 0 !== d && "" !== d || (d = this.game.rnd.uuid()), void 0 === e && (e = !1); + var f = new c.RenderTexture(this.game, a, b, d); + return e && this.game.cache.addRenderTexture(d, f), f + }, + bitmapData: function(a, b, d, e) { + void 0 === e && (e = !1), void 0 !== d && "" !== d || (d = this.game.rnd.uuid()); + var f = new c.BitmapData(this.game, d, a, b); + return e && this.game.cache.addBitmapData(d, f), f + }, + filter: function(a) { + var b = Array.prototype.slice.call(arguments, 1), + a = new c.Filter[a](this.game); + return a.init.apply(a, b), a + } + }, c.GameObjectCreator.prototype.constructor = c.GameObjectCreator, c.Sprite = function(a, b, d, e, f) { + b = b || 0, d = d || 0, e = e || null, f = f || null, this.type = c.SPRITE, this.physicsType = c.SPRITE, PIXI.Sprite.call(this, c.Cache.DEFAULT), c.Component.Core.init.call(this, a, b, d, e, f) + }, c.Sprite.prototype = Object.create(PIXI.Sprite.prototype), c.Sprite.prototype.constructor = c.Sprite, c.Component.Core.install.call(c.Sprite.prototype, ["Angle", "Animation", "AutoCull", "Bounds", "BringToTop", "Crop", "Delta", "Destroy", "FixedToCamera", "Health", "InCamera", "InputEnabled", "InWorld", "LifeSpan", "LoadTexture", "Overlap", "PhysicsBody", "Reset", "ScaleMinMax", "Smoothed"]), c.Sprite.prototype.preUpdatePhysics = c.Component.PhysicsBody.preUpdate, c.Sprite.prototype.preUpdateLifeSpan = c.Component.LifeSpan.preUpdate, c.Sprite.prototype.preUpdateInWorld = c.Component.InWorld.preUpdate, c.Sprite.prototype.preUpdateCore = c.Component.Core.preUpdate, c.Sprite.prototype.preUpdate = function() { + return !!(this.preUpdatePhysics() && this.preUpdateLifeSpan() && this.preUpdateInWorld()) && this.preUpdateCore() + }, c.Image = function(a, b, d, e, f) { + b = b || 0, d = d || 0, e = e || null, f = f || null, this.type = c.IMAGE, PIXI.Sprite.call(this, c.Cache.DEFAULT), c.Component.Core.init.call(this, a, b, d, e, f) + }, c.Image.prototype = Object.create(PIXI.Sprite.prototype), c.Image.prototype.constructor = c.Image, c.Component.Core.install.call(c.Image.prototype, ["Angle", "Animation", "AutoCull", "Bounds", "BringToTop", "Crop", "Destroy", "FixedToCamera", "InputEnabled", "LifeSpan", "LoadTexture", "Overlap", "Reset", "ScaleMinMax", "Smoothed"]), c.Image.prototype.preUpdateInWorld = c.Component.InWorld.preUpdate, c.Image.prototype.preUpdateCore = c.Component.Core.preUpdate, c.Image.prototype.preUpdate = function() { + return !!this.preUpdateInWorld() && this.preUpdateCore() + }, c.Button = function(a, b, d, e, f, g, h, i, j, k) { + b = b || 0, d = d || 0, e = e || null, f = f || null, g = g || this, c.Image.call(this, a, b, d, e, i), this.type = c.BUTTON, this.physicsType = c.SPRITE, this._onOverFrame = null, this._onOutFrame = null, this._onDownFrame = null, this._onUpFrame = null, this.onOverSound = null, this.onOutSound = null, this.onDownSound = null, this.onUpSound = null, this.onOverSoundMarker = "", this.onOutSoundMarker = "", this.onDownSoundMarker = "", this.onUpSoundMarker = "", this.onInputOver = new c.Signal, this.onInputOut = new c.Signal, this.onInputDown = new c.Signal, this.onInputUp = new c.Signal, this.onOverMouseOnly = !0, this.justReleasedPreventsOver = c.PointerMode.TOUCH, this.freezeFrames = !1, this.forceOut = !1, this.inputEnabled = !0, this.input.start(0, !0), this.input.useHandCursor = !0, this.setFrames(h, i, j, k), null !== f && this.onInputUp.add(f, g), this.events.onInputOver.add(this.onInputOverHandler, this), this.events.onInputOut.add(this.onInputOutHandler, this), this.events.onInputDown.add(this.onInputDownHandler, this), this.events.onInputUp.add(this.onInputUpHandler, this), this.events.onRemovedFromWorld.add(this.removedFromWorld, this) + }, c.Button.prototype = Object.create(c.Image.prototype), c.Button.prototype.constructor = c.Button; + var g = "Over", + h = "Out", + i = "Down", + j = "Up"; + c.Button.prototype.clearFrames = function() { + this.setFrames(null, null, null, null) + }, c.Button.prototype.removedFromWorld = function() { + this.inputEnabled = !1 + }, c.Button.prototype.setStateFrame = function(a, b, c) { + var d = "_on" + a + "Frame"; + null !== b ? (this[d] = b, c && this.changeStateFrame(a)) : this[d] = null + }, c.Button.prototype.changeStateFrame = function(a) { + if (this.freezeFrames) return !1; + var b = "_on" + a + "Frame", + c = this[b]; + return "string" == typeof c ? (this.frameName = c, !0) : "number" == typeof c && (this.frame = c, !0) + }, c.Button.prototype.setFrames = function(a, b, c, d) { + this.setStateFrame(g, a, this.input.pointerOver()), this.setStateFrame(h, b, !this.input.pointerOver()), this.setStateFrame(i, c, this.input.pointerDown()), this.setStateFrame(j, d, this.input.pointerUp()) + }, c.Button.prototype.setStateSound = function(a, b, d) { + var e = "on" + a + "Sound", + f = "on" + a + "SoundMarker"; + b instanceof c.Sound || b instanceof c.AudioSprite ? (this[e] = b, this[f] = "string" == typeof d ? d : "") : (this[e] = null, this[f] = "") + }, c.Button.prototype.playStateSound = function(a) { + var b = "on" + a + "Sound", + c = this[b]; + if (c) { + var d = "on" + a + "SoundMarker", + e = this[d]; + return c.play(e), !0 + } + return !1 + }, c.Button.prototype.setSounds = function(a, b, c, d, e, f, k, l) { + this.setStateSound(g, a, b), this.setStateSound(h, e, f), this.setStateSound(i, c, d), this.setStateSound(j, k, l) + }, c.Button.prototype.setOverSound = function(a, b) { + this.setStateSound(g, a, b) + }, c.Button.prototype.setOutSound = function(a, b) { + this.setStateSound(h, a, b) + }, c.Button.prototype.setDownSound = function(a, b) { + this.setStateSound(i, a, b) + }, c.Button.prototype.setUpSound = function(a, b) { + this.setStateSound(j, a, b) + }, c.Button.prototype.onInputOverHandler = function(a, b) { + b.justReleased() && (this.justReleasedPreventsOver & b.pointerMode) === b.pointerMode || (this.changeStateFrame(g), this.onOverMouseOnly && !b.isMouse || (this.playStateSound(g), this.onInputOver && this.onInputOver.dispatch(this, b))) + }, c.Button.prototype.onInputOutHandler = function(a, b) { + this.changeStateFrame(h), this.playStateSound(h), this.onInputOut && this.onInputOut.dispatch(this, b) + }, c.Button.prototype.onInputDownHandler = function(a, b) { + this.changeStateFrame(i), this.playStateSound(i), this.onInputDown && this.onInputDown.dispatch(this, b) + }, c.Button.prototype.onInputUpHandler = function(a, b, c) { + if (this.playStateSound(j), this.onInputUp && this.onInputUp.dispatch(this, b, c), !this.freezeFrames) + if (this.forceOut === !0 || (this.forceOut & b.pointerMode) === b.pointerMode) this.changeStateFrame(h); + else { + var d = this.changeStateFrame(j); + d || (c ? this.changeStateFrame(g) : this.changeStateFrame(h)) + } + }, c.SpriteBatch = function(a, b, d, e) { + void 0 !== b && null !== b || (b = a.world), PIXI.SpriteBatch.call(this), c.Group.call(this, a, b, d, e), this.type = c.SPRITEBATCH + }, c.SpriteBatch.prototype = c.Utils.extend(!0, c.SpriteBatch.prototype, PIXI.SpriteBatch.prototype, c.Group.prototype), c.SpriteBatch.prototype.constructor = c.SpriteBatch, c.BitmapData = function(a, b, d, e, f) { + void 0 !== d && 0 !== d || (d = 256), void 0 !== e && 0 !== e || (e = 256), void 0 === f && (f = !1), this.game = a, this.key = b, this.width = d, this.height = e, this.canvas = c.Canvas.create(this, d, e, null, f), this.context = this.canvas.getContext("2d", { + alpha: !0 + }), this.ctx = this.context, this.smoothProperty = a.renderType === c.CANVAS ? a.renderer.renderSession.smoothProperty : c.Canvas.getSmoothingPrefix(this.context), this.imageData = this.context.getImageData(0, 0, d, e), this.data = null, this.imageData && (this.data = this.imageData.data), this.pixels = null, this.data && (this.imageData.data.buffer ? (this.buffer = this.imageData.data.buffer, this.pixels = new Uint32Array(this.buffer)) : window.ArrayBuffer ? (this.buffer = new ArrayBuffer(this.imageData.data.length), this.pixels = new Uint32Array(this.buffer)) : this.pixels = this.imageData.data), this.baseTexture = new PIXI.BaseTexture(this.canvas), this.texture = new PIXI.Texture(this.baseTexture), this.frameData = new c.FrameData, this.textureFrame = this.frameData.addFrame(new c.Frame(0, 0, 0, d, e, "bitmapData")), this.texture.frame = this.textureFrame, this.type = c.BITMAPDATA, this.disableTextureUpload = !1, this.dirty = !1, this.cls = this.clear, this._image = null, this._pos = new c.Point, this._size = new c.Point, this._scale = new c.Point, this._rotate = 0, this._alpha = { + prev: 1, + current: 1 + }, this._anchor = new c.Point, this._tempR = 0, this._tempG = 0, this._tempB = 0, this._circle = new c.Circle, this._swapCanvas = void 0 + }, c.BitmapData.prototype = { + move: function(a, b, c) { + return 0 !== a && this.moveH(a, c), 0 !== b && this.moveV(b, c), this + }, + moveH: function(a, b) { + void 0 === b && (b = !0), void 0 === this._swapCanvas && (this._swapCanvas = PIXI.CanvasPool.create(this, this.width, this.height)); + var c = this._swapCanvas, + d = c.getContext("2d"), + e = this.height, + f = this.canvas; + if (d.clearRect(0, 0, this.width, this.height), a < 0) { + a = Math.abs(a); + var g = this.width - a; + b && d.drawImage(f, 0, 0, a, e, g, 0, a, e), d.drawImage(f, a, 0, g, e, 0, 0, g, e) + } else { + var g = this.width - a; + b && d.drawImage(f, g, 0, a, e, 0, 0, a, e), d.drawImage(f, 0, 0, g, e, a, 0, g, e) + } + return this.clear(), this.copy(this._swapCanvas) + }, + moveV: function(a, b) { + void 0 === b && (b = !0), void 0 === this._swapCanvas && (this._swapCanvas = PIXI.CanvasPool.create(this, this.width, this.height)); + var c = this._swapCanvas, + d = c.getContext("2d"), + e = this.width, + f = this.canvas; + if (d.clearRect(0, 0, this.width, this.height), a < 0) { + a = Math.abs(a); + var g = this.height - a; + b && d.drawImage(f, 0, 0, e, a, 0, g, e, a), d.drawImage(f, 0, a, e, g, 0, 0, e, g) + } else { + var g = this.height - a; + b && d.drawImage(f, 0, g, e, a, 0, 0, e, a), d.drawImage(f, 0, 0, e, g, 0, a, e, g) + } + return this.clear(), this.copy(this._swapCanvas) + }, + add: function(a) { + if (Array.isArray(a)) + for (var b = 0; b < a.length; b++) a[b].loadTexture && a[b].loadTexture(this); + else a.loadTexture(this); + return this + }, + load: function(a) { + if ("string" == typeof a && (a = this.game.cache.getImage(a)), a) return this.resize(a.width, a.height), this.cls(), this.draw(a), this.update(), this + }, + clear: function(a, b, c, d) { + return void 0 === a && (a = 0), void 0 === b && (b = 0), void 0 === c && (c = this.width), void 0 === d && (d = this.height), this.context.clearRect(a, b, c, d), this.dirty = !0, this + }, + fill: function(a, b, c, d) { + return void 0 === d && (d = 1), this.context.fillStyle = "rgba(" + a + "," + b + "," + c + "," + d + ")", this.context.fillRect(0, 0, this.width, this.height), this.dirty = !0, this + }, + generateTexture: function(a) { + var b = new Image; + b.src = this.canvas.toDataURL("image/png"); + var c = this.game.cache.addImage(a, "", b); + return new PIXI.Texture(c.base) + }, + resize: function(a, b) { + return a === this.width && b === this.height || (this.width = a, this.height = b, this.canvas.width = a, this.canvas.height = b, void 0 !== this._swapCanvas && (this._swapCanvas.width = a, this._swapCanvas.height = b), this.baseTexture.width = a, this.baseTexture.height = b, this.textureFrame.width = a, this.textureFrame.height = b, this.texture.width = a, this.texture.height = b, this.texture.crop.width = a, this.texture.crop.height = b, this.update(), this.dirty = !0), this + }, + update: function(a, b, c, d) { + return void 0 === a && (a = 0), void 0 === b && (b = 0), void 0 === c && (c = Math.max(1, this.width)), void 0 === d && (d = Math.max(1, this.height)), this.imageData = this.context.getImageData(a, b, c, d), this.data = this.imageData.data, this.imageData.data.buffer ? (this.buffer = this.imageData.data.buffer, this.pixels = new Uint32Array(this.buffer)) : window.ArrayBuffer ? (this.buffer = new ArrayBuffer(this.imageData.data.length), this.pixels = new Uint32Array(this.buffer)) : this.pixels = this.imageData.data, this + }, + processPixelRGB: function(a, b, d, e, f, g) { + void 0 === d && (d = 0), void 0 === e && (e = 0), void 0 === f && (f = this.width), void 0 === g && (g = this.height); + for (var h = d + f, i = e + g, j = c.Color.createColor(), k = { + r: 0, + g: 0, + b: 0, + a: 0 + }, l = !1, m = e; m < i; m++) + for (var n = d; n < h; n++) c.Color.unpackPixel(this.getPixel32(n, m), j), k = a.call(b, j, n, m), k !== !1 && null !== k && void 0 !== k && (this.setPixel32(n, m, k.r, k.g, k.b, k.a, !1), l = !0); + return l && (this.context.putImageData(this.imageData, 0, 0), this.dirty = !0), this + }, + processPixel: function(a, b, c, d, e, f) { + void 0 === c && (c = 0), void 0 === d && (d = 0), void 0 === e && (e = this.width), void 0 === f && (f = this.height); + for (var g = c + e, h = d + f, i = 0, j = 0, k = !1, l = d; l < h; l++) + for (var m = c; m < g; m++) i = this.getPixel32(m, l), j = a.call(b, i, m, l), j !== i && (this.pixels[l * this.width + m] = j, k = !0); + return k && (this.context.putImageData(this.imageData, 0, 0), this.dirty = !0), this + }, + replaceRGB: function(a, b, d, e, f, g, h, i, j) { + var k = 0, + l = 0, + m = this.width, + n = this.height, + o = c.Color.packPixel(a, b, d, e); + void 0 !== j && j instanceof c.Rectangle && (k = j.x, l = j.y, m = j.width, n = j.height); + for (var p = 0; p < n; p++) + for (var q = 0; q < m; q++) this.getPixel32(k + q, l + p) === o && this.setPixel32(k + q, l + p, f, g, h, i, !1); + return this.context.putImageData(this.imageData, 0, 0), this.dirty = !0, this + }, + setHSL: function(a, b, d, e) { + var f = a || 0 === a, + g = b || 0 === b, + h = d || 0 === d; + if (f || g || h) { + void 0 === e && (e = new c.Rectangle(0, 0, this.width, this.height)); + for (var i = c.Color.createColor(), j = e.y; j < e.bottom; j++) + for (var k = e.x; k < e.right; k++) c.Color.unpackPixel(this.getPixel32(k, j), i, !0), f && (i.h = a), g && (i.s = b), h && (i.l = d), c.Color.HSLtoRGB(i.h, i.s, i.l, i), this.setPixel32(k, j, i.r, i.g, i.b, i.a, !1); + return this.context.putImageData(this.imageData, 0, 0), this.dirty = !0, this + } + }, + shiftHSL: function(a, b, d, e) { + if (void 0 !== a && null !== a || (a = !1), void 0 !== b && null !== b || (b = !1), void 0 !== d && null !== d || (d = !1), a || b || d) { + void 0 === e && (e = new c.Rectangle(0, 0, this.width, this.height)); + for (var f = c.Color.createColor(), g = e.y; g < e.bottom; g++) + for (var h = e.x; h < e.right; h++) c.Color.unpackPixel(this.getPixel32(h, g), f, !0), a && (f.h = this.game.math.wrap(f.h + a, 0, 1)), b && (f.s = this.game.math.clamp(f.s + b, 0, 1)), d && (f.l = this.game.math.clamp(f.l + d, 0, 1)), c.Color.HSLtoRGB(f.h, f.s, f.l, f), this.setPixel32(h, g, f.r, f.g, f.b, f.a, !1); + return this.context.putImageData(this.imageData, 0, 0), this.dirty = !0, this + } + }, + setPixel32: function(a, b, d, e, f, g, h) { + return void 0 === h && (h = !0), a >= 0 && a <= this.width && b >= 0 && b <= this.height && (c.Device.LITTLE_ENDIAN ? this.pixels[b * this.width + a] = g << 24 | f << 16 | e << 8 | d : this.pixels[b * this.width + a] = d << 24 | e << 16 | f << 8 | g, h && (this.context.putImageData(this.imageData, 0, 0), this.dirty = !0)), this + }, + setPixel: function(a, b, c, d, e, f) { + return this.setPixel32(a, b, c, d, e, 255, f) + }, + getPixel: function(a, b, d) { + d || (d = c.Color.createColor()); + var e = ~~(a + b * this.width); + return e *= 4, d.r = this.data[e], d.g = this.data[++e], d.b = this.data[++e], d.a = this.data[++e], d + }, + getPixel32: function(a, b) { + if (a >= 0 && a <= this.width && b >= 0 && b <= this.height) return this.pixels[b * this.width + a] + }, + getPixelRGB: function(a, b, d, e, f) { + return c.Color.unpackPixel(this.getPixel32(a, b), d, e, f) + }, + getPixels: function(a) { + return this.context.getImageData(a.x, a.y, a.width, a.height) + }, + getFirstPixel: function(a) { + void 0 === a && (a = 0); + var b = c.Color.createColor(), + d = 0, + e = 0, + f = 1, + g = !1; + 1 === a ? (f = -1, e = this.height) : 3 === a && (f = -1, d = this.width); + do c.Color.unpackPixel(this.getPixel32(d, e), b), 0 === a || 1 === a ? (d++, d === this.width && (d = 0, e += f, (e >= this.height || e <= 0) && (g = !0))) : 2 !== a && 3 !== a || (e++, e === this.height && (e = 0, d += f, (d >= this.width || d <= 0) && (g = !0))); while (0 === b.a && !g); + return b.x = d, b.y = e, b + }, + getBounds: function(a) { + return void 0 === a && (a = new c.Rectangle), a.x = this.getFirstPixel(2).x, a.x === this.width ? a.setTo(0, 0, 0, 0) : (a.y = this.getFirstPixel(0).y, a.width = this.getFirstPixel(3).x - a.x + 1, a.height = this.getFirstPixel(1).y - a.y + 1, a) + }, + addToWorld: function(a, b, c, d, e, f) { + e = e || 1, f = f || 1; + var g = this.game.add.image(a, b, this); + return g.anchor.set(c, d), g.scale.set(e, f), g + }, + copy: function(a, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) { + if (void 0 !== a && null !== a || (a = this), (a instanceof c.RenderTexture || a instanceof PIXI.RenderTexture) && (a = a.getCanvas()), this._image = a, a instanceof c.Sprite || a instanceof c.Image || a instanceof c.Text || a instanceof PIXI.Sprite) this._pos.set(a.texture.crop.x, a.texture.crop.y), this._size.set(a.texture.crop.width, a.texture.crop.height), this._scale.set(a.scale.x, a.scale.y), this._anchor.set(a.anchor.x, a.anchor.y), this._rotate = a.rotation, this._alpha.current = a.alpha, a.texture instanceof c.RenderTexture || a.texture instanceof PIXI.RenderTexture ? this._image = a.texture.getCanvas() : this._image = a.texture.baseTexture.source, void 0 !== g && null !== g || (g = a.x), void 0 !== h && null !== h || (h = a.y), a.texture.trim && (g += a.texture.trim.x - a.anchor.x * a.texture.trim.width, h += a.texture.trim.y - a.anchor.y * a.texture.trim.height), 16777215 !== a.tint && (a.cachedTint !== a.tint && (a.cachedTint = a.tint, a.tintedTexture = PIXI.CanvasTinter.getTintedTexture(a, a.tint)), this._image = a.tintedTexture, this._pos.set(0)); + else { + if (this._pos.set(0), this._scale.set(1), this._anchor.set(0), this._rotate = 0, this._alpha.current = 1, a instanceof c.BitmapData) this._image = a.canvas; + else if ("string" == typeof a) { + if (a = this.game.cache.getImage(a), null === a) return; + this._image = a + } + this._size.set(this._image.width, this._image.height) + } + if (void 0 !== b && null !== b || (b = 0), void 0 !== d && null !== d || (d = 0), e && (this._size.x = e), f && (this._size.y = f), void 0 !== g && null !== g || (g = b), void 0 !== h && null !== h || (h = d), void 0 !== i && null !== i || (i = this._size.x), void 0 !== j && null !== j || (j = this._size.y), "number" == typeof k && (this._rotate = k), "number" == typeof l && (this._anchor.x = l), "number" == typeof m && (this._anchor.y = m), "number" == typeof n && (this._scale.x = n), "number" == typeof o && (this._scale.y = o), "number" == typeof p && (this._alpha.current = p), void 0 === q && (q = null), void 0 === r && (r = !1), !(this._alpha.current <= 0 || 0 === this._scale.x || 0 === this._scale.y || 0 === this._size.x || 0 === this._size.y)) { + var s = this.context; + return this._alpha.prev = s.globalAlpha, s.save(), s.globalAlpha = this._alpha.current, q && (this.op = q), r && (g |= 0, h |= 0), s.translate(g, h), s.scale(this._scale.x, this._scale.y), s.rotate(this._rotate), s.drawImage(this._image, this._pos.x + b, this._pos.y + d, this._size.x, this._size.y, -i * this._anchor.x, -j * this._anchor.y, i, j), s.restore(), s.globalAlpha = this._alpha.prev, this.dirty = !0, this + } + }, + copyTransform: function(a, b, d) { + if (void 0 === b && (b = null), void 0 === d && (d = !1), !a.hasOwnProperty("worldTransform") || !a.worldVisible || 0 === a.worldAlpha) return this; + var e = a.worldTransform; + if (this._pos.set(a.texture.crop.x, a.texture.crop.y), this._size.set(a.texture.crop.width, a.texture.crop.height), 0 === e.a || 0 === e.d || 0 === this._size.x || 0 === this._size.y) return this; + a.texture instanceof c.RenderTexture || a.texture instanceof PIXI.RenderTexture ? this._image = a.texture.getCanvas() : this._image = a.texture.baseTexture.source; + var f = e.tx, + g = e.ty; + a.texture.trim && (f += a.texture.trim.x - a.anchor.x * a.texture.trim.width, g += a.texture.trim.y - a.anchor.y * a.texture.trim.height), 16777215 !== a.tint && (a.cachedTint !== a.tint && (a.cachedTint = a.tint, a.tintedTexture = PIXI.CanvasTinter.getTintedTexture(a, a.tint)), this._image = a.tintedTexture, this._pos.set(0)), d && (f |= 0, g |= 0); + var h = this.context; + return this._alpha.prev = h.globalAlpha, h.save(), h.globalAlpha = this._alpha.current, b && (this.op = b), h[this.smoothProperty] = a.texture.baseTexture.scaleMode === PIXI.scaleModes.LINEAR, h.setTransform(e.a, e.b, e.c, e.d, f, g), h.drawImage(this._image, this._pos.x, this._pos.y, this._size.x, this._size.y, -this._size.x * a.anchor.x, -this._size.y * a.anchor.y, this._size.x, this._size.y), h.restore(), h.globalAlpha = this._alpha.prev, this.dirty = !0, this + }, + copyRect: function(a, b, c, d, e, f, g) { + return this.copy(a, b.x, b.y, b.width, b.height, c, d, b.width, b.height, 0, 0, 0, 1, 1, e, f, g) + }, + draw: function(a, b, c, d, e, f, g) { + return this.copy(a, null, null, null, null, b, c, d, e, null, null, null, null, null, null, f, g) + }, + drawGroup: function(a, b, c) { + return a.total > 0 && a.forEachExists(this.drawGroupProxy, this, b, c), this + }, + drawGroupProxy: function(a, b, d) { + if (a.hasOwnProperty("texture") && this.copyTransform(a, b, d), a.type === c.GROUP && a.exists) this.drawGroup(a, b, d); + else if (a.hasOwnProperty("children") && a.children.length > 0) + for (var e = 0; e < a.children.length; e++) a.children[e].exists && this.copyTransform(a.children[e], b, d) + }, + drawFull: function(a, b, d) { + if (a.worldVisible === !1 || 0 === a.worldAlpha || a.hasOwnProperty("exists") && a.exists === !1) return this; + if (a.type !== c.GROUP && a.type !== c.EMITTER && a.type !== c.BITMAPTEXT) + if (a.type === c.GRAPHICS) { + var e = a.getBounds(); + this.ctx.save(), this.ctx.translate(e.x, e.y), PIXI.CanvasGraphics.renderGraphics(a, this.ctx), this.ctx.restore() + } else this.copy(a, null, null, null, null, a.worldPosition.x, a.worldPosition.y, null, null, a.worldRotation, null, null, a.worldScale.x, a.worldScale.y, a.worldAlpha, b, d); + if (a.children) + for (var f = 0; f < a.children.length; f++) this.drawFull(a.children[f], b, d); + return this + }, + shadow: function(a, b, c, d) { + var e = this.context; + return void 0 === a || null === a ? e.shadowColor = "rgba(0,0,0,0)" : (e.shadowColor = a, e.shadowBlur = b || 5, e.shadowOffsetX = c || 10, e.shadowOffsetY = d || 10), this + }, + alphaMask: function(a, b, c, d) { + return void 0 === d || null === d ? this.draw(b).blendSourceAtop() : this.draw(b, d.x, d.y, d.width, d.height).blendSourceAtop(), void 0 === c || null === c ? this.draw(a).blendReset() : this.draw(a, c.x, c.y, c.width, c.height).blendReset(), this + }, + extract: function(a, b, c, d, e, f, g, h, i) { + return void 0 === e && (e = 255), void 0 === f && (f = !1), void 0 === g && (g = b), void 0 === h && (h = c), void 0 === i && (i = d), f && a.resize(this.width, this.height), this.processPixelRGB(function(f, j, k) { + return f.r === b && f.g === c && f.b === d && a.setPixel32(j, k, g, h, i, e, !1), !1 + }, this), a.context.putImageData(a.imageData, 0, 0), a.dirty = !0, a + }, + rect: function(a, b, c, d, e) { + return "undefined" != typeof e && (this.context.fillStyle = e), this.context.fillRect(a, b, c, d), this + }, + text: function(a, b, c, d, e, f) { + void 0 === b && (b = 0), void 0 === c && (c = 0), void 0 === d && (d = "14px Courier"), void 0 === e && (e = "rgb(255,255,255)"), void 0 === f && (f = !0); + var g = this.context, + h = g.font; + return g.font = d, f && (g.fillStyle = "rgb(0,0,0)", g.fillText(a, b + 1, c + 1)), g.fillStyle = e, g.fillText(a, b, c), g.font = h, this + }, + circle: function(a, b, c, d) { + var e = this.context; + return void 0 !== d && (e.fillStyle = d), e.beginPath(), e.arc(a, b, c, 0, 2 * Math.PI, !1), e.closePath(), e.fill(), this + }, + line: function(a, b, c, d, e, f) { + void 0 === e && (e = "#fff"), void 0 === f && (f = 1); + var g = this.context; + return g.beginPath(), g.moveTo(a, b), g.lineTo(c, d), g.lineWidth = f, g.strokeStyle = e, g.stroke(), g.closePath(), this + }, + textureLine: function(a, b, d) { + if (void 0 === d && (d = "repeat-x"), "string" != typeof b || (b = this.game.cache.getImage(b))) { + var e = a.length; + "no-repeat" === d && e > b.width && (e = b.width); + var f = this.context; + return f.fillStyle = f.createPattern(b, d), this._circle = new c.Circle(a.start.x, a.start.y, b.height), this._circle.circumferencePoint(a.angle - 1.5707963267948966, !1, this._pos), f.save(), f.translate(this._pos.x, this._pos.y), f.rotate(a.angle), f.fillRect(0, 0, e, b.height), f.restore(), this.dirty = !0, this + } + }, + render: function() { + return !this.disableTextureUpload && this.dirty && (this.baseTexture.dirty(), this.dirty = !1), this + }, + destroy: function() { + this.frameData.destroy(), this.texture.destroy(!0), PIXI.CanvasPool.remove(this) + }, + blendReset: function() { + return this.op = "source-over", this + }, + blendSourceOver: function() { + return this.op = "source-over", this + }, + blendSourceIn: function() { + return this.op = "source-in", this + }, + blendSourceOut: function() { + return this.op = "source-out", this + }, + blendSourceAtop: function() { + return this.op = "source-atop", this + }, + blendDestinationOver: function() { + return this.op = "destination-over", this + }, + blendDestinationIn: function() { + return this.op = "destination-in", this + }, + blendDestinationOut: function() { + return this.op = "destination-out", this + }, + blendDestinationAtop: function() { + return this.op = "destination-atop", this + }, + blendXor: function() { + return this.op = "xor", this + }, + blendAdd: function() { + return this.op = "lighter", this + }, + blendMultiply: function() { + return this.op = "multiply", this + }, + blendScreen: function() { + return this.op = "screen", this + }, + blendOverlay: function() { + return this.op = "overlay", this + }, + blendDarken: function() { + return this.op = "darken", this + }, + blendLighten: function() { + return this.op = "lighten", this + }, + blendColorDodge: function() { + return this.op = "color-dodge", this + }, + blendColorBurn: function() { + return this.op = "color-burn", this + }, + blendHardLight: function() { + return this.op = "hard-light", this + }, + blendSoftLight: function() { + return this.op = "soft-light", this + }, + blendDifference: function() { + return this.op = "difference", this + }, + blendExclusion: function() { + return this.op = "exclusion", this + }, + blendHue: function() { + return this.op = "hue", this + }, + blendSaturation: function() { + return this.op = "saturation", this + }, + blendColor: function() { + return this.op = "color", this + }, + blendLuminosity: function() { + return this.op = "luminosity", this + } + }, Object.defineProperty(c.BitmapData.prototype, "smoothed", { + get: function() { + c.Canvas.getSmoothingEnabled(this.context) + }, + set: function(a) { + c.Canvas.setSmoothingEnabled(this.context, a) + } + }), Object.defineProperty(c.BitmapData.prototype, "op", { + get: function() { + return this.context.globalCompositeOperation + }, + set: function(a) { + this.context.globalCompositeOperation = a + } + }), c.BitmapData.getTransform = function(a, b, c, d, e, f) { + return "number" != typeof a && (a = 0), "number" != typeof b && (b = 0), "number" != typeof c && (c = 1), "number" != typeof d && (d = 1), "number" != typeof e && (e = 0), "number" != typeof f && (f = 0), { + sx: c, + sy: d, + scaleX: c, + scaleY: d, + skewX: e, + skewY: f, + translateX: a, + translateY: b, + tx: a, + ty: b + } + }, c.BitmapData.prototype.constructor = c.BitmapData, PIXI.Graphics = function() { + PIXI.DisplayObjectContainer.call(this), this.renderable = !0, this.fillAlpha = 1, this.lineWidth = 0, this.lineColor = 0, this.graphicsData = [], this.tint = 16777215, this.blendMode = PIXI.blendModes.NORMAL, this.currentPath = null, this._webGL = [], this.isMask = !1, this.boundsPadding = 0, this._localBounds = new PIXI.Rectangle(0, 0, 1, 1), this.dirty = !0, this._boundsDirty = !1, this.webGLDirty = !1, this.cachedSpriteDirty = !1 + }, PIXI.Graphics.prototype = Object.create(PIXI.DisplayObjectContainer.prototype), PIXI.Graphics.prototype.constructor = PIXI.Graphics, PIXI.Graphics.prototype.lineStyle = function(a, b, c) { + return this.lineWidth = a || 0, this.lineColor = b || 0, this.lineAlpha = void 0 === c ? 1 : c, this.currentPath && (this.currentPath.shape.points.length ? this.drawShape(new PIXI.Polygon(this.currentPath.shape.points.slice(-2))) : (this.currentPath.lineWidth = this.lineWidth, this.currentPath.lineColor = this.lineColor, this.currentPath.lineAlpha = this.lineAlpha)), this + }, PIXI.Graphics.prototype.moveTo = function(a, b) { + return this.drawShape(new PIXI.Polygon([a, b])), this + }, PIXI.Graphics.prototype.lineTo = function(a, b) { + return this.currentPath || this.moveTo(0, 0), this.currentPath.shape.points.push(a, b), this.dirty = !0, this._boundsDirty = !0, this + }, PIXI.Graphics.prototype.quadraticCurveTo = function(a, b, c, d) { + this.currentPath ? 0 === this.currentPath.shape.points.length && (this.currentPath.shape.points = [0, 0]) : this.moveTo(0, 0); + var e, f, g = 20, + h = this.currentPath.shape.points; + 0 === h.length && this.moveTo(0, 0); + for (var i = h[h.length - 2], j = h[h.length - 1], k = 0, l = 1; l <= g; ++l) k = l / g, e = i + (a - i) * k, f = j + (b - j) * k, h.push(e + (a + (c - a) * k - e) * k, f + (b + (d - b) * k - f) * k); + return this.dirty = !0, this._boundsDirty = !0, this + }, PIXI.Graphics.prototype.bezierCurveTo = function(a, b, c, d, e, f) { + this.currentPath ? 0 === this.currentPath.shape.points.length && (this.currentPath.shape.points = [0, 0]) : this.moveTo(0, 0); + for (var g, h, i, j, k, l = 20, m = this.currentPath.shape.points, n = m[m.length - 2], o = m[m.length - 1], p = 0, q = 1; q <= l; ++q) p = q / l, g = 1 - p, h = g * g, i = h * g, j = p * p, k = j * p, m.push(i * n + 3 * h * p * a + 3 * g * j * c + k * e, i * o + 3 * h * p * b + 3 * g * j * d + k * f); + return this.dirty = !0, this._boundsDirty = !0, this + }, PIXI.Graphics.prototype.arcTo = function(a, b, c, d, e) { + this.currentPath ? 0 === this.currentPath.shape.points.length && this.currentPath.shape.points.push(a, b) : this.moveTo(a, b); + var f = this.currentPath.shape.points, + g = f[f.length - 2], + h = f[f.length - 1], + i = h - b, + j = g - a, + k = d - b, + l = c - a, + m = Math.abs(i * l - j * k); + if (m < 1e-8 || 0 === e) f[f.length - 2] === a && f[f.length - 1] === b || f.push(a, b); + else { + var n = i * i + j * j, + o = k * k + l * l, + p = i * k + j * l, + q = e * Math.sqrt(n) / m, + r = e * Math.sqrt(o) / m, + s = q * p / n, + t = r * p / o, + u = q * l + r * j, + v = q * k + r * i, + w = j * (r + s), + x = i * (r + s), + y = l * (q + t), + z = k * (q + t), + A = Math.atan2(x - v, w - u), + B = Math.atan2(z - v, y - u); + this.arc(u + a, v + b, e, A, B, j * k > l * i) + } + return this.dirty = !0, this._boundsDirty = !0, this + }, PIXI.Graphics.prototype.arc = function(a, b, c, d, e, f, g) { + if (d === e) return this; + void 0 === f && (f = !1), void 0 === g && (g = 40), !f && e <= d ? e += 2 * Math.PI : f && d <= e && (d += 2 * Math.PI); + var h = f ? (d - e) * -1 : e - d, + i = Math.ceil(Math.abs(h) / (2 * Math.PI)) * g; + if (0 === h) return this; + var j = a + Math.cos(d) * c, + k = b + Math.sin(d) * c; + f && this.filling ? this.moveTo(a, b) : this.moveTo(j, k); + for (var l = this.currentPath.shape.points, m = h / (2 * i), n = 2 * m, o = Math.cos(m), p = Math.sin(m), q = i - 1, r = q % 1 / q, s = 0; s <= q; s++) { + var t = s + r * s, + u = m + d + n * t, + v = Math.cos(u), + w = -Math.sin(u); + l.push((o * v + p * w) * c + a, (o * -w + p * v) * c + b) + } + return this.dirty = !0, this._boundsDirty = !0, this + }, PIXI.Graphics.prototype.beginFill = function(a, b) { + return this.filling = !0, this.fillColor = a || 0, this.fillAlpha = void 0 === b ? 1 : b, this.currentPath && this.currentPath.shape.points.length <= 2 && (this.currentPath.fill = this.filling, this.currentPath.fillColor = this.fillColor, this.currentPath.fillAlpha = this.fillAlpha), this + }, PIXI.Graphics.prototype.endFill = function() { + return this.filling = !1, this.fillColor = null, this.fillAlpha = 1, this + }, PIXI.Graphics.prototype.drawRect = function(a, b, c, d) { + return this.drawShape(new PIXI.Rectangle(a, b, c, d)), this + }, PIXI.Graphics.prototype.drawRoundedRect = function(a, b, c, d, e) { + return this.drawShape(new PIXI.RoundedRectangle(a, b, c, d, e)), this + }, PIXI.Graphics.prototype.drawCircle = function(a, b, c) { + return this.drawShape(new PIXI.Circle(a, b, c)), this + }, PIXI.Graphics.prototype.drawEllipse = function(a, b, c, d) { + return this.drawShape(new PIXI.Ellipse(a, b, c, d)), this + }, PIXI.Graphics.prototype.drawPolygon = function(a) { + (a instanceof c.Polygon || a instanceof PIXI.Polygon) && (a = a.points); + var b = a; + if (!Array.isArray(b)) { + b = new Array(arguments.length); + for (var d = 0; d < b.length; ++d) b[d] = arguments[d] + } + return this.drawShape(new c.Polygon(b)), this + }, PIXI.Graphics.prototype.clear = function() { + return this.lineWidth = 0, this.filling = !1, this.dirty = !0, this._boundsDirty = !0, this.clearDirty = !0, this.graphicsData = [], this.updateLocalBounds(), this + }, PIXI.Graphics.prototype.generateTexture = function(a, b, c) { + void 0 === a && (a = 1), void 0 === b && (b = PIXI.scaleModes.DEFAULT), void 0 === c && (c = 0); + var d = this.getBounds(); + d.width += c, d.height += c; + var e = new PIXI.CanvasBuffer(d.width * a, d.height * a), + f = PIXI.Texture.fromCanvas(e.canvas, b); + return f.baseTexture.resolution = a, e.context.scale(a, a), e.context.translate(-d.x, -d.y), PIXI.CanvasGraphics.renderGraphics(this, e.context), f + }, PIXI.Graphics.prototype._renderWebGL = function(a) { + if (this.visible !== !1 && 0 !== this.alpha && this.isMask !== !0) { + if (this._cacheAsBitmap) return (this.dirty || this.cachedSpriteDirty) && (this._generateCachedSprite(), this.updateCachedSpriteTexture(), this.cachedSpriteDirty = !1, this.dirty = !1), this._cachedSprite.worldAlpha = this.worldAlpha, void PIXI.Sprite.prototype._renderWebGL.call(this._cachedSprite, a); + if (a.spriteBatch.stop(), a.blendModeManager.setBlendMode(this.blendMode), this._mask && a.maskManager.pushMask(this._mask, a), this._filters && a.filterManager.pushFilter(this._filterBlock), this.blendMode !== a.spriteBatch.currentBlendMode) { + a.spriteBatch.currentBlendMode = this.blendMode; + var b = PIXI.blendModesWebGL[a.spriteBatch.currentBlendMode]; + a.spriteBatch.gl.blendFunc(b[0], b[1]) + } + if (this.webGLDirty && (this.dirty = !0, this.webGLDirty = !1), PIXI.WebGLGraphics.renderGraphics(this, a), this.children.length) { + a.spriteBatch.start(); + for (var c = 0; c < this.children.length; c++) this.children[c]._renderWebGL(a); + a.spriteBatch.stop() + } + this._filters && a.filterManager.popFilter(), this._mask && a.maskManager.popMask(this.mask, a), a.drawCount++, + a.spriteBatch.start() + } + }, PIXI.Graphics.prototype._renderCanvas = function(a) { + if (this.visible !== !1 && 0 !== this.alpha && this.isMask !== !0) { + if (this._prevTint !== this.tint && (this.dirty = !0, this._prevTint = this.tint), this._cacheAsBitmap) return (this.dirty || this.cachedSpriteDirty) && (this._generateCachedSprite(), this.updateCachedSpriteTexture(), this.cachedSpriteDirty = !1, this.dirty = !1), this._cachedSprite.alpha = this.alpha, void PIXI.Sprite.prototype._renderCanvas.call(this._cachedSprite, a); + var b = a.context, + c = this.worldTransform; + this.blendMode !== a.currentBlendMode && (a.currentBlendMode = this.blendMode, b.globalCompositeOperation = PIXI.blendModesCanvas[a.currentBlendMode]), this._mask && a.maskManager.pushMask(this._mask, a); + var d = a.resolution, + e = c.tx * a.resolution + a.shakeX, + f = c.ty * a.resolution + a.shakeY; + b.setTransform(c.a * d, c.b * d, c.c * d, c.d * d, e, f), PIXI.CanvasGraphics.renderGraphics(this, b); + for (var g = 0; g < this.children.length; g++) this.children[g]._renderCanvas(a); + this._mask && a.maskManager.popMask(a) + } + }, PIXI.Graphics.prototype.getBounds = function(a) { + if (!this._currentBounds) { + if (!this.renderable) return PIXI.EmptyRectangle; + this.dirty && (this.updateLocalBounds(), this.webGLDirty = !0, this.cachedSpriteDirty = !0, this.dirty = !1); + var b = this._localBounds, + c = b.x, + d = b.width + b.x, + e = b.y, + f = b.height + b.y, + g = a || this.worldTransform, + h = g.a, + i = g.b, + j = g.c, + k = g.d, + l = g.tx, + m = g.ty, + n = h * d + j * f + l, + o = k * f + i * d + m, + p = h * c + j * f + l, + q = k * f + i * c + m, + r = h * c + j * e + l, + s = k * e + i * c + m, + t = h * d + j * e + l, + u = k * e + i * d + m, + v = n, + w = o, + x = n, + y = o; + x = p < x ? p : x, x = r < x ? r : x, x = t < x ? t : x, y = q < y ? q : y, y = s < y ? s : y, y = u < y ? u : y, v = p > v ? p : v, v = r > v ? r : v, v = t > v ? t : v, w = q > w ? q : w, w = s > w ? s : w, w = u > w ? u : w, this._bounds.x = x, this._bounds.width = v - x, this._bounds.y = y, this._bounds.height = w - y, this._currentBounds = this._bounds + } + return this._currentBounds + }, PIXI.Graphics.prototype.getLocalBounds = function() { + var a = this.worldTransform; + this.worldTransform = PIXI.identityMatrix; + for (var b = 0; b < this.children.length; b++) this.children[b].updateTransform(); + var c = this.getBounds(); + for (this.worldTransform = a, b = 0; b < this.children.length; b++) this.children[b].updateTransform(); + return c + }, PIXI.Graphics.prototype.containsPoint = function(a) { + this.worldTransform.applyInverse(a, tempPoint); + for (var b = this.graphicsData, c = 0; c < b.length; c++) { + var d = b[c]; + if (d.fill && d.shape && d.shape.contains(tempPoint.x, tempPoint.y)) return !0 + } + return !1 + }, PIXI.Graphics.prototype.updateLocalBounds = function() { + var a = 1 / 0, + b = -(1 / 0), + d = 1 / 0, + e = -(1 / 0); + if (this.graphicsData.length) + for (var f, g, h, i, j, k, l = 0; l < this.graphicsData.length; l++) { + var m = this.graphicsData[l], + n = m.type, + o = m.lineWidth; + if (f = m.shape, n === PIXI.Graphics.RECT || n === PIXI.Graphics.RREC) h = f.x - o / 2, i = f.y - o / 2, j = f.width + o, k = f.height + o, a = h < a ? h : a, b = h + j > b ? h + j : b, d = i < d ? i : d, e = i + k > e ? i + k : e; + else if (n === PIXI.Graphics.CIRC) h = f.x, i = f.y, j = f.radius + o / 2, k = f.radius + o / 2, a = h - j < a ? h - j : a, b = h + j > b ? h + j : b, d = i - k < d ? i - k : d, e = i + k > e ? i + k : e; + else if (n === PIXI.Graphics.ELIP) h = f.x, i = f.y, j = f.width + o / 2, k = f.height + o / 2, a = h - j < a ? h - j : a, b = h + j > b ? h + j : b, d = i - k < d ? i - k : d, e = i + k > e ? i + k : e; + else { + g = f.points; + for (var p = 0; p < g.length; p++) g[p] instanceof c.Point ? (h = g[p].x, i = g[p].y) : (h = g[p], i = g[p + 1], p < g.length - 1 && p++), a = h - o < a ? h - o : a, b = h + o > b ? h + o : b, d = i - o < d ? i - o : d, e = i + o > e ? i + o : e + } + } else a = 0, b = 0, d = 0, e = 0; + var q = this.boundsPadding; + this._localBounds.x = a - q, this._localBounds.width = b - a + 2 * q, this._localBounds.y = d - q, this._localBounds.height = e - d + 2 * q + }, PIXI.Graphics.prototype._generateCachedSprite = function() { + var a = this.getLocalBounds(); + if (this._cachedSprite) this._cachedSprite.buffer.resize(a.width, a.height); + else { + var b = new PIXI.CanvasBuffer(a.width, a.height), + c = PIXI.Texture.fromCanvas(b.canvas); + this._cachedSprite = new PIXI.Sprite(c), this._cachedSprite.buffer = b, this._cachedSprite.worldTransform = this.worldTransform + } + this._cachedSprite.anchor.x = -(a.x / a.width), this._cachedSprite.anchor.y = -(a.y / a.height), this._cachedSprite.buffer.context.translate(-a.x, -a.y), this.worldAlpha = 1, PIXI.CanvasGraphics.renderGraphics(this, this._cachedSprite.buffer.context), this._cachedSprite.alpha = this.alpha + }, PIXI.Graphics.prototype.updateCachedSpriteTexture = function() { + var a = this._cachedSprite, + b = a.texture, + c = a.buffer.canvas; + b.baseTexture.width = c.width, b.baseTexture.height = c.height, b.crop.width = b.frame.width = c.width, b.crop.height = b.frame.height = c.height, a._width = c.width, a._height = c.height, b.baseTexture.dirty() + }, PIXI.Graphics.prototype.destroyCachedSprite = function() { + this._cachedSprite.texture.destroy(!0), this._cachedSprite = null + }, PIXI.Graphics.prototype.drawShape = function(a) { + this.currentPath && this.currentPath.shape.points.length <= 2 && this.graphicsData.pop(), this.currentPath = null, a instanceof c.Polygon && (a = a.clone(), a.flatten()); + var b = new PIXI.GraphicsData(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.filling, a); + return this.graphicsData.push(b), b.type === PIXI.Graphics.POLY && (b.shape.closed = this.filling, this.currentPath = b), this.dirty = !0, this._boundsDirty = !0, b + }, Object.defineProperty(PIXI.Graphics.prototype, "cacheAsBitmap", { + get: function() { + return this._cacheAsBitmap + }, + set: function(a) { + this._cacheAsBitmap = a, this._cacheAsBitmap ? this._generateCachedSprite() : this.destroyCachedSprite(), this.dirty = !0, this.webGLDirty = !0 + } + }), PIXI.GraphicsData = function(a, b, c, d, e, f, g) { + this.lineWidth = a, this.lineColor = b, this.lineAlpha = c, this._lineTint = b, this.fillColor = d, this.fillAlpha = e, this._fillTint = d, this.fill = f, this.shape = g, this.type = g.type + }, PIXI.GraphicsData.prototype.constructor = PIXI.GraphicsData, PIXI.GraphicsData.prototype.clone = function() { + return new GraphicsData(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.fill, this.shape) + }, PIXI.EarCut = {}, PIXI.EarCut.Triangulate = function(a, b, c) { + c = c || 2; + var d = b && b.length, + e = d ? b[0] * c : a.length, + f = PIXI.EarCut.linkedList(a, 0, e, c, !0), + g = []; + if (!f) return g; + var h, i, j, k, l, m, n; + if (d && (f = PIXI.EarCut.eliminateHoles(a, b, f, c)), a.length > 80 * c) { + h = j = a[0], i = k = a[1]; + for (var o = c; o < e; o += c) l = a[o], m = a[o + 1], l < h && (h = l), m < i && (i = m), l > j && (j = l), m > k && (k = m); + n = Math.max(j - h, k - i) + } + return PIXI.EarCut.earcutLinked(f, g, c, h, i, n), g + }, PIXI.EarCut.linkedList = function(a, b, c, d, e) { + var f, g, h, i = 0; + for (f = b, g = c - d; f < c; f += d) i += (a[g] - a[f]) * (a[f + 1] + a[g + 1]), g = f; + if (e === i > 0) + for (f = b; f < c; f += d) h = PIXI.EarCut.insertNode(f, a[f], a[f + 1], h); + else + for (f = c - d; f >= b; f -= d) h = PIXI.EarCut.insertNode(f, a[f], a[f + 1], h); + return h + }, PIXI.EarCut.filterPoints = function(a, b) { + if (!a) return a; + b || (b = a); + var c, d = a; + do + if (c = !1, d.steiner || !PIXI.EarCut.equals(d, d.next) && 0 !== PIXI.EarCut.area(d.prev, d, d.next)) d = d.next; + else { + if (PIXI.EarCut.removeNode(d), d = b = d.prev, d === d.next) return null; + c = !0 + } while (c || d !== b); + return b + }, PIXI.EarCut.earcutLinked = function(a, b, c, d, e, f, g) { + if (a) { + !g && f && PIXI.EarCut.indexCurve(a, d, e, f); + for (var h, i, j = a; a.prev !== a.next;) + if (h = a.prev, i = a.next, f ? PIXI.EarCut.isEarHashed(a, d, e, f) : PIXI.EarCut.isEar(a)) b.push(h.i / c), b.push(a.i / c), b.push(i.i / c), PIXI.EarCut.removeNode(a), a = i.next, j = i.next; + else if (a = i, a === j) { + g ? 1 === g ? (a = PIXI.EarCut.cureLocalIntersections(a, b, c), PIXI.EarCut.earcutLinked(a, b, c, d, e, f, 2)) : 2 === g && PIXI.EarCut.splitEarcut(a, b, c, d, e, f) : PIXI.EarCut.earcutLinked(PIXI.EarCut.filterPoints(a), b, c, d, e, f, 1); + break + } + } + }, PIXI.EarCut.isEar = function(a) { + var b = a.prev, + c = a, + d = a.next; + if (PIXI.EarCut.area(b, c, d) >= 0) return !1; + for (var e = a.next.next; e !== a.prev;) { + if (PIXI.EarCut.pointInTriangle(b.x, b.y, c.x, c.y, d.x, d.y, e.x, e.y) && PIXI.EarCut.area(e.prev, e, e.next) >= 0) return !1; + e = e.next + } + return !0 + }, PIXI.EarCut.isEarHashed = function(a, b, c, d) { + var e = a.prev, + f = a, + g = a.next; + if (PIXI.EarCut.area(e, f, g) >= 0) return !1; + for (var h = e.x < f.x ? e.x < g.x ? e.x : g.x : f.x < g.x ? f.x : g.x, i = e.y < f.y ? e.y < g.y ? e.y : g.y : f.y < g.y ? f.y : g.y, j = e.x > f.x ? e.x > g.x ? e.x : g.x : f.x > g.x ? f.x : g.x, k = e.y > f.y ? e.y > g.y ? e.y : g.y : f.y > g.y ? f.y : g.y, l = PIXI.EarCut.zOrder(h, i, b, c, d), m = PIXI.EarCut.zOrder(j, k, b, c, d), n = a.nextZ; n && n.z <= m;) { + if (n !== a.prev && n !== a.next && PIXI.EarCut.pointInTriangle(e.x, e.y, f.x, f.y, g.x, g.y, n.x, n.y) && PIXI.EarCut.area(n.prev, n, n.next) >= 0) return !1; + n = n.nextZ + } + for (n = a.prevZ; n && n.z >= l;) { + if (n !== a.prev && n !== a.next && PIXI.EarCut.pointInTriangle(e.x, e.y, f.x, f.y, g.x, g.y, n.x, n.y) && PIXI.EarCut.area(n.prev, n, n.next) >= 0) return !1; + n = n.prevZ + } + return !0 + }, PIXI.EarCut.cureLocalIntersections = function(a, b, c) { + var d = a; + do { + var e = d.prev, + f = d.next.next; + PIXI.EarCut.intersects(e, d, d.next, f) && PIXI.EarCut.locallyInside(e, f) && PIXI.EarCut.locallyInside(f, e) && (b.push(e.i / c), b.push(d.i / c), b.push(f.i / c), PIXI.EarCut.removeNode(d), PIXI.EarCut.removeNode(d.next), d = a = f), d = d.next + } while (d !== a); + return d + }, PIXI.EarCut.splitEarcut = function(a, b, c, d, e, f) { + var g = a; + do { + for (var h = g.next.next; h !== g.prev;) { + if (g.i !== h.i && PIXI.EarCut.isValidDiagonal(g, h)) { + var i = PIXI.EarCut.splitPolygon(g, h); + return g = PIXI.EarCut.filterPoints(g, g.next), i = PIXI.EarCut.filterPoints(i, i.next), PIXI.EarCut.earcutLinked(g, b, c, d, e, f), void PIXI.EarCut.earcutLinked(i, b, c, d, e, f) + } + h = h.next + } + g = g.next + } while (g !== a) + }, PIXI.EarCut.eliminateHoles = function(a, b, c, d) { + var e, f, g, h, i, j = []; + for (e = 0, f = b.length; e < f; e++) g = b[e] * d, h = e < f - 1 ? b[e + 1] * d : a.length, i = PIXI.EarCut.linkedList(a, g, h, d, !1), i === i.next && (i.steiner = !0), j.push(PIXI.EarCut.getLeftmost(i)); + for (j.sort(compareX), e = 0; e < j.length; e++) PIXI.EarCut.eliminateHole(j[e], c), c = PIXI.EarCut.filterPoints(c, c.next); + return c + }, PIXI.EarCut.compareX = function(a, b) { + return a.x - b.x + }, PIXI.EarCut.eliminateHole = function(a, b) { + if (b = PIXI.EarCut.findHoleBridge(a, b)) { + var c = PIXI.EarCut.splitPolygon(b, a); + PIXI.EarCut.filterPoints(c, c.next) + } + }, PIXI.EarCut.findHoleBridge = function(a, b) { + var c, d = b, + e = a.x, + f = a.y, + g = -(1 / 0); + do { + if (f <= d.y && f >= d.next.y) { + var h = d.x + (f - d.y) * (d.next.x - d.x) / (d.next.y - d.y); + h <= e && h > g && (g = h, c = d.x < d.next.x ? d : d.next) + } + d = d.next + } while (d !== b); + if (!c) return null; + if (a.x === c.x) return c.prev; + var i, j = c, + k = 1 / 0; + for (d = c.next; d !== j;) e >= d.x && d.x >= c.x && PIXI.EarCut.pointInTriangle(f < c.y ? e : g, f, c.x, c.y, f < c.y ? g : e, f, d.x, d.y) && (i = Math.abs(f - d.y) / (e - d.x), (i < k || i === k && d.x > c.x) && PIXI.EarCut.locallyInside(d, a) && (c = d, k = i)), d = d.next; + return c + }, PIXI.EarCut.indexCurve = function(a, b, c, d) { + var e = a; + do null === e.z && (e.z = PIXI.EarCut.zOrder(e.x, e.y, b, c, d)), e.prevZ = e.prev, e.nextZ = e.next, e = e.next; while (e !== a); + e.prevZ.nextZ = null, e.prevZ = null, PIXI.EarCut.sortLinked(e) + }, PIXI.EarCut.sortLinked = function(a) { + var b, c, d, e, f, g, h, i, j = 1; + do { + for (c = a, a = null, f = null, g = 0; c;) { + for (g++, d = c, h = 0, b = 0; b < j && (h++, d = d.nextZ, d); b++); + for (i = j; h > 0 || i > 0 && d;) 0 === h ? (e = d, d = d.nextZ, i--) : 0 !== i && d ? c.z <= d.z ? (e = c, c = c.nextZ, h--) : (e = d, d = d.nextZ, i--) : (e = c, c = c.nextZ, h--), f ? f.nextZ = e : a = e, e.prevZ = f, f = e; + c = d + } + f.nextZ = null, j *= 2 + } while (g > 1); + return a + }, PIXI.EarCut.zOrder = function(a, b, c, d, e) { + return a = 32767 * (a - c) / e, b = 32767 * (b - d) / e, a = 16711935 & (a | a << 8), a = 252645135 & (a | a << 4), a = 858993459 & (a | a << 2), a = 1431655765 & (a | a << 1), b = 16711935 & (b | b << 8), b = 252645135 & (b | b << 4), b = 858993459 & (b | b << 2), b = 1431655765 & (b | b << 1), a | b << 1 + }, PIXI.EarCut.getLeftmost = function(a) { + var b = a, + c = a; + do b.x < c.x && (c = b), b = b.next; while (b !== a); + return c + }, PIXI.EarCut.pointInTriangle = function(a, b, c, d, e, f, g, h) { + return (e - g) * (b - h) - (a - g) * (f - h) >= 0 && (a - g) * (d - h) - (c - g) * (b - h) >= 0 && (c - g) * (f - h) - (e - g) * (d - h) >= 0 + }, PIXI.EarCut.isValidDiagonal = function(a, b) { + return PIXI.EarCut.equals(a, b) || a.next.i !== b.i && a.prev.i !== b.i && !PIXI.EarCut.intersectsPolygon(a, b) && PIXI.EarCut.locallyInside(a, b) && PIXI.EarCut.locallyInside(b, a) && PIXI.EarCut.middleInside(a, b) + }, PIXI.EarCut.area = function(a, b, c) { + return (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y) + }, PIXI.EarCut.equals = function(a, b) { + return a.x === b.x && a.y === b.y + }, PIXI.EarCut.intersects = function(a, b, c, d) { + return PIXI.EarCut.area(a, b, c) > 0 != PIXI.EarCut.area(a, b, d) > 0 && PIXI.EarCut.area(c, d, a) > 0 != PIXI.EarCut.area(c, d, b) > 0 + }, PIXI.EarCut.intersectsPolygon = function(a, b) { + var c = a; + do { + if (c.i !== a.i && c.next.i !== a.i && c.i !== b.i && c.next.i !== b.i && PIXI.EarCut.intersects(c, c.next, a, b)) return !0; + c = c.next + } while (c !== a); + return !1 + }, PIXI.EarCut.locallyInside = function(a, b) { + return PIXI.EarCut.area(a.prev, a, a.next) < 0 ? PIXI.EarCut.area(a, b, a.next) >= 0 && PIXI.EarCut.area(a, a.prev, b) >= 0 : PIXI.EarCut.area(a, b, a.prev) < 0 || PIXI.EarCut.area(a, a.next, b) < 0 + }, PIXI.EarCut.middleInside = function(a, b) { + var c = a, + d = !1, + e = (a.x + b.x) / 2, + f = (a.y + b.y) / 2; + do c.y > f != c.next.y > f && e < (c.next.x - c.x) * (f - c.y) / (c.next.y - c.y) + c.x && (d = !d), c = c.next; while (c !== a); + return d + }, PIXI.EarCut.splitPolygon = function(a, b) { + var c = new PIXI.EarCut.Node(a.i, a.x, a.y), + d = new PIXI.EarCut.Node(b.i, b.x, b.y), + e = a.next, + f = b.prev; + return a.next = b, b.prev = a, c.next = e, e.prev = c, d.next = c, c.prev = d, f.next = d, d.prev = f, d + }, PIXI.EarCut.insertNode = function(a, b, c, d) { + var e = new PIXI.EarCut.Node(a, b, c); + return d ? (e.next = d.next, e.prev = d, d.next.prev = e, d.next = e) : (e.prev = e, e.next = e), e + }, PIXI.EarCut.removeNode = function(a) { + a.next.prev = a.prev, a.prev.next = a.next, a.prevZ && (a.prevZ.nextZ = a.nextZ), a.nextZ && (a.nextZ.prevZ = a.prevZ) + }, PIXI.EarCut.Node = function(a, b, c) { + this.i = a, this.x = b, this.y = c, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = !1 + }, PIXI.WebGLGraphics = function() {}, PIXI.WebGLGraphics.stencilBufferLimit = 6, PIXI.WebGLGraphics.renderGraphics = function(a, b) { + var c, d = b.gl, + e = b.projection, + f = b.offset, + g = b.shaderManager.primitiveShader; + a.dirty && PIXI.WebGLGraphics.updateGraphics(a, d); + for (var h = a._webGL[d.id], i = 0; i < h.data.length; i++) 1 === h.data[i].mode ? (c = h.data[i], b.stencilManager.pushStencil(a, c, b), d.drawElements(d.TRIANGLE_FAN, 4, d.UNSIGNED_SHORT, 2 * (c.indices.length - 4)), b.stencilManager.popStencil(a, c, b)) : (c = h.data[i], b.shaderManager.setShader(g), g = b.shaderManager.primitiveShader, d.uniformMatrix3fv(g.translationMatrix, !1, a.worldTransform.toArray(!0)), d.uniform1f(g.flipY, 1), d.uniform2f(g.projectionVector, e.x, -e.y), d.uniform2f(g.offsetVector, -f.x, -f.y), d.uniform3fv(g.tintColor, PIXI.hex2rgb(a.tint)), d.uniform1f(g.alpha, a.worldAlpha), d.bindBuffer(d.ARRAY_BUFFER, c.buffer), d.vertexAttribPointer(g.aVertexPosition, 2, d.FLOAT, !1, 24, 0), d.vertexAttribPointer(g.colorAttribute, 4, d.FLOAT, !1, 24, 8), d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, c.indexBuffer), d.drawElements(d.TRIANGLE_STRIP, c.indices.length, d.UNSIGNED_SHORT, 0)) + }, PIXI.WebGLGraphics.updateGraphics = function(a, b) { + var c = a._webGL[b.id]; + c || (c = a._webGL[b.id] = { + lastIndex: 0, + data: [], + gl: b + }), a.dirty = !1; + var d; + if (a.clearDirty) { + for (a.clearDirty = !1, d = 0; d < c.data.length; d++) { + var e = c.data[d]; + e.reset(), PIXI.WebGLGraphics.graphicsDataPool.push(e) + } + c.data = [], c.lastIndex = 0 + } + var f; + for (d = c.lastIndex; d < a.graphicsData.length; d++) { + var g = a.graphicsData[d]; + if (g.type === PIXI.Graphics.POLY) { + if (g.points = g.shape.points.slice(), g.shape.closed && (g.points[0] === g.points[g.points.length - 2] && g.points[1] === g.points[g.points.length - 1] || g.points.push(g.points[0], g.points[1])), g.fill && g.points.length >= PIXI.WebGLGraphics.stencilBufferLimit) + if (g.points.length < 2 * PIXI.WebGLGraphics.stencilBufferLimit) { + f = PIXI.WebGLGraphics.switchMode(c, 0); + var h = PIXI.WebGLGraphics.buildPoly(g, f); + h || (f = PIXI.WebGLGraphics.switchMode(c, 1), PIXI.WebGLGraphics.buildComplexPoly(g, f)) + } else f = PIXI.WebGLGraphics.switchMode(c, 1), PIXI.WebGLGraphics.buildComplexPoly(g, f); + g.lineWidth > 0 && (f = PIXI.WebGLGraphics.switchMode(c, 0), PIXI.WebGLGraphics.buildLine(g, f)) + } else f = PIXI.WebGLGraphics.switchMode(c, 0), g.type === PIXI.Graphics.RECT ? PIXI.WebGLGraphics.buildRectangle(g, f) : g.type === PIXI.Graphics.CIRC || g.type === PIXI.Graphics.ELIP ? PIXI.WebGLGraphics.buildCircle(g, f) : g.type === PIXI.Graphics.RREC && PIXI.WebGLGraphics.buildRoundedRectangle(g, f); + c.lastIndex++ + } + for (d = 0; d < c.data.length; d++) f = c.data[d], f.dirty && f.upload() + }, PIXI.WebGLGraphics.switchMode = function(a, b) { + var c; + return a.data.length ? (c = a.data[a.data.length - 1], c.mode === b && 1 !== b || (c = PIXI.WebGLGraphics.graphicsDataPool.pop() || new PIXI.WebGLGraphicsData(a.gl), c.mode = b, a.data.push(c))) : (c = PIXI.WebGLGraphics.graphicsDataPool.pop() || new PIXI.WebGLGraphicsData(a.gl), c.mode = b, a.data.push(c)), c.dirty = !0, c + }, PIXI.WebGLGraphics.buildRectangle = function(a, b) { + var c = a.shape, + d = c.x, + e = c.y, + f = c.width, + g = c.height; + if (a.fill) { + var h = PIXI.hex2rgb(a.fillColor), + i = a.fillAlpha, + j = h[0] * i, + k = h[1] * i, + l = h[2] * i, + m = b.points, + n = b.indices, + o = m.length / 6; + m.push(d, e), m.push(j, k, l, i), m.push(d + f, e), m.push(j, k, l, i), m.push(d, e + g), m.push(j, k, l, i), m.push(d + f, e + g), m.push(j, k, l, i), n.push(o, o, o + 1, o + 2, o + 3, o + 3) + } + if (a.lineWidth) { + var p = a.points; + a.points = [d, e, d + f, e, d + f, e + g, d, e + g, d, e], PIXI.WebGLGraphics.buildLine(a, b), a.points = p + } + }, PIXI.WebGLGraphics.buildRoundedRectangle = function(a, b) { + var c = a.shape, + d = c.x, + e = c.y, + f = c.width, + g = c.height, + h = c.radius, + i = []; + if (i.push(d, e + h), i = i.concat(PIXI.WebGLGraphics.quadraticBezierCurve(d, e + g - h, d, e + g, d + h, e + g)), i = i.concat(PIXI.WebGLGraphics.quadraticBezierCurve(d + f - h, e + g, d + f, e + g, d + f, e + g - h)), i = i.concat(PIXI.WebGLGraphics.quadraticBezierCurve(d + f, e + h, d + f, e, d + f - h, e)), i = i.concat(PIXI.WebGLGraphics.quadraticBezierCurve(d + h, e, d, e, d, e + h)), a.fill) { + var j = PIXI.hex2rgb(a.fillColor), + k = a.fillAlpha, + l = j[0] * k, + m = j[1] * k, + n = j[2] * k, + o = b.points, + p = b.indices, + q = o.length / 6, + r = PIXI.EarCut.Triangulate(i, null, 2), + s = 0; + for (s = 0; s < r.length; s += 3) p.push(r[s] + q), p.push(r[s] + q), p.push(r[s + 1] + q), p.push(r[s + 2] + q), p.push(r[s + 2] + q); + for (s = 0; s < i.length; s++) o.push(i[s], i[++s], l, m, n, k) + } + if (a.lineWidth) { + var t = a.points; + a.points = i, PIXI.WebGLGraphics.buildLine(a, b), a.points = t + } + }, PIXI.WebGLGraphics.quadraticBezierCurve = function(a, b, c, d, e, f) { + function g(a, b, c) { + var d = b - a; + return a + d * c + } + for (var h, i, j, k, l, m, n = 20, o = [], p = 0, q = 0; q <= n; q++) p = q / n, h = g(a, c, p), i = g(b, d, p), j = g(c, e, p), k = g(d, f, p), l = g(h, j, p), m = g(i, k, p), o.push(l, m); + return o + }, PIXI.WebGLGraphics.buildCircle = function(a, b) { + var c, d, e = a.shape, + f = e.x, + g = e.y; + a.type === PIXI.Graphics.CIRC ? (c = e.radius, d = e.radius) : (c = e.width, d = e.height); + var h = 40, + i = 2 * Math.PI / h, + j = 0; + if (a.fill) { + var k = PIXI.hex2rgb(a.fillColor), + l = a.fillAlpha, + m = k[0] * l, + n = k[1] * l, + o = k[2] * l, + p = b.points, + q = b.indices, + r = p.length / 6; + for (q.push(r), j = 0; j < h + 1; j++) p.push(f, g, m, n, o, l), p.push(f + Math.sin(i * j) * c, g + Math.cos(i * j) * d, m, n, o, l), q.push(r++, r++); + q.push(r - 1) + } + if (a.lineWidth) { + var s = a.points; + for (a.points = [], j = 0; j < h + 1; j++) a.points.push(f + Math.sin(i * j) * c, g + Math.cos(i * j) * d); + PIXI.WebGLGraphics.buildLine(a, b), a.points = s + } + }, PIXI.WebGLGraphics.buildLine = function(a, b) { + var c = 0, + d = a.points; + if (0 !== d.length) { + if (a.lineWidth % 2) + for (c = 0; c < d.length; c++) d[c] += .5; + var e = new PIXI.Point(d[0], d[1]), + f = new PIXI.Point(d[d.length - 2], d[d.length - 1]); + if (e.x === f.x && e.y === f.y) { + d = d.slice(), d.pop(), d.pop(), f = new PIXI.Point(d[d.length - 2], d[d.length - 1]); + var g = f.x + .5 * (e.x - f.x), + h = f.y + .5 * (e.y - f.y); + d.unshift(g, h), d.push(g, h) + } + var i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F = b.points, + G = b.indices, + H = d.length / 2, + I = d.length, + J = F.length / 6, + K = a.lineWidth / 2, + L = PIXI.hex2rgb(a.lineColor), + M = a.lineAlpha, + N = L[0] * M, + O = L[1] * M, + P = L[2] * M; + for (k = d[0], l = d[1], m = d[2], n = d[3], q = -(l - n), r = k - m, E = Math.sqrt(q * q + r * r), q /= E, r /= E, q *= K, r *= K, F.push(k - q, l - r, N, O, P, M), F.push(k + q, l + r, N, O, P, M), c = 1; c < H - 1; c++) k = d[2 * (c - 1)], l = d[2 * (c - 1) + 1], m = d[2 * c], n = d[2 * c + 1], o = d[2 * (c + 1)], p = d[2 * (c + 1) + 1], q = -(l - n), r = k - m, E = Math.sqrt(q * q + r * r), q /= E, r /= E, q *= K, r *= K, s = -(n - p), t = m - o, E = Math.sqrt(s * s + t * t), s /= E, t /= E, s *= K, t *= K, w = -r + l - (-r + n), x = -q + m - (-q + k), y = (-q + k) * (-r + n) - (-q + m) * (-r + l), z = -t + p - (-t + n), A = -s + m - (-s + o), B = (-s + o) * (-t + n) - (-s + m) * (-t + p), C = w * A - z * x, Math.abs(C) < .1 ? (C += 10.1, F.push(m - q, n - r, N, O, P, M), F.push(m + q, n + r, N, O, P, M)) : (i = (x * B - A * y) / C, j = (z * y - w * B) / C, D = (i - m) * (i - m) + (j - n) + (j - n), D > 19600 ? (u = q - s, v = r - t, E = Math.sqrt(u * u + v * v), u /= E, v /= E, u *= K, v *= K, F.push(m - u, n - v), F.push(N, O, P, M), F.push(m + u, n + v), F.push(N, O, P, M), F.push(m - u, n - v), F.push(N, O, P, M), I++) : (F.push(i, j), F.push(N, O, P, M), F.push(m - (i - m), n - (j - n)), F.push(N, O, P, M))); + for (k = d[2 * (H - 2)], l = d[2 * (H - 2) + 1], m = d[2 * (H - 1)], n = d[2 * (H - 1) + 1], q = -(l - n), r = k - m, E = Math.sqrt(q * q + r * r), q /= E, r /= E, q *= K, r *= K, F.push(m - q, n - r), F.push(N, O, P, M), F.push(m + q, n + r), F.push(N, O, P, M), G.push(J), c = 0; c < I; c++) G.push(J++); + G.push(J - 1) + } + }, PIXI.WebGLGraphics.buildComplexPoly = function(a, b) { + var c = a.points.slice(); + if (!(c.length < 6)) { + var d = b.indices; + b.points = c, b.alpha = a.fillAlpha, b.color = PIXI.hex2rgb(a.fillColor); + for (var e, f, g = 1 / 0, h = -(1 / 0), i = 1 / 0, j = -(1 / 0), k = 0; k < c.length; k += 2) e = c[k], f = c[k + 1], g = e < g ? e : g, h = e > h ? e : h, i = f < i ? f : i, j = f > j ? f : j; + c.push(g, i, h, i, h, j, g, j); + var l = c.length / 2; + for (k = 0; k < l; k++) d.push(k) + } + }, PIXI.WebGLGraphics.buildPoly = function(a, b) { + var c = a.points; + if (!(c.length < 6)) { + var d = b.points, + e = b.indices, + f = c.length / 2, + g = PIXI.hex2rgb(a.fillColor), + h = a.fillAlpha, + i = g[0] * h, + j = g[1] * h, + k = g[2] * h, + l = PIXI.EarCut.Triangulate(c, null, 2); + if (!l) return !1; + var m = d.length / 6, + n = 0; + for (n = 0; n < l.length; n += 3) e.push(l[n] + m), e.push(l[n] + m), e.push(l[n + 1] + m), e.push(l[n + 2] + m), e.push(l[n + 2] + m); + for (n = 0; n < f; n++) d.push(c[2 * n], c[2 * n + 1], i, j, k, h); + return !0 + } + }, PIXI.WebGLGraphics.graphicsDataPool = [], PIXI.WebGLGraphicsData = function(a) { + this.gl = a, this.color = [0, 0, 0], this.points = [], this.indices = [], this.buffer = a.createBuffer(), this.indexBuffer = a.createBuffer(), this.mode = 1, this.alpha = 1, this.dirty = !0 + }, PIXI.WebGLGraphicsData.prototype.reset = function() { + this.points = [], this.indices = [] + }, PIXI.WebGLGraphicsData.prototype.upload = function() { + var a = this.gl; + this.glPoints = new PIXI.Float32Array(this.points), a.bindBuffer(a.ARRAY_BUFFER, this.buffer), a.bufferData(a.ARRAY_BUFFER, this.glPoints, a.STATIC_DRAW), this.glIndicies = new PIXI.Uint16Array(this.indices), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer), a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.glIndicies, a.STATIC_DRAW), this.dirty = !1 + }, PIXI.CanvasGraphics = function() {}, PIXI.CanvasGraphics.renderGraphics = function(a, b) { + var c = a.worldAlpha; + a.dirty && (this.updateGraphicsTint(a), a.dirty = !1); + for (var d = 0; d < a.graphicsData.length; d++) { + var e = a.graphicsData[d], + f = e.shape, + g = e._fillTint, + h = e._lineTint; + if (b.lineWidth = e.lineWidth, e.type === PIXI.Graphics.POLY) { + b.beginPath(); + var i = f.points; + b.moveTo(i[0], i[1]); + for (var j = 1; j < i.length / 2; j++) b.lineTo(i[2 * j], i[2 * j + 1]); + f.closed && b.lineTo(i[0], i[1]), i[0] === i[i.length - 2] && i[1] === i[i.length - 1] && b.closePath(), e.fill && (b.globalAlpha = e.fillAlpha * c, b.fillStyle = "#" + ("00000" + (0 | g).toString(16)).substr(-6), b.fill()), e.lineWidth && (b.globalAlpha = e.lineAlpha * c, b.strokeStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), b.stroke()) + } else if (e.type === PIXI.Graphics.RECT)(e.fillColor || 0 === e.fillColor) && (b.globalAlpha = e.fillAlpha * c, b.fillStyle = "#" + ("00000" + (0 | g).toString(16)).substr(-6), b.fillRect(f.x, f.y, f.width, f.height)), e.lineWidth && (b.globalAlpha = e.lineAlpha * c, b.strokeStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), b.strokeRect(f.x, f.y, f.width, f.height)); + else if (e.type === PIXI.Graphics.CIRC) b.beginPath(), b.arc(f.x, f.y, f.radius, 0, 2 * Math.PI), b.closePath(), e.fill && (b.globalAlpha = e.fillAlpha * c, b.fillStyle = "#" + ("00000" + (0 | g).toString(16)).substr(-6), b.fill()), e.lineWidth && (b.globalAlpha = e.lineAlpha * c, b.strokeStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), b.stroke()); + else if (e.type === PIXI.Graphics.ELIP) { + var k = 2 * f.width, + l = 2 * f.height, + m = f.x - k / 2, + n = f.y - l / 2; + b.beginPath(); + var o = .5522848, + p = k / 2 * o, + q = l / 2 * o, + r = m + k, + s = n + l, + t = m + k / 2, + u = n + l / 2; + b.moveTo(m, u), b.bezierCurveTo(m, u - q, t - p, n, t, n), b.bezierCurveTo(t + p, n, r, u - q, r, u), b.bezierCurveTo(r, u + q, t + p, s, t, s), b.bezierCurveTo(t - p, s, m, u + q, m, u), b.closePath(), e.fill && (b.globalAlpha = e.fillAlpha * c, b.fillStyle = "#" + ("00000" + (0 | g).toString(16)).substr(-6), b.fill()), e.lineWidth && (b.globalAlpha = e.lineAlpha * c, b.strokeStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), b.stroke()) + } else if (e.type === PIXI.Graphics.RREC) { + var v = f.x, + w = f.y, + x = f.width, + y = f.height, + z = f.radius, + A = Math.min(x, y) / 2 | 0; + z = z > A ? A : z, b.beginPath(), b.moveTo(v, w + z), b.lineTo(v, w + y - z), b.quadraticCurveTo(v, w + y, v + z, w + y), b.lineTo(v + x - z, w + y), b.quadraticCurveTo(v + x, w + y, v + x, w + y - z), b.lineTo(v + x, w + z), b.quadraticCurveTo(v + x, w, v + x - z, w), b.lineTo(v + z, w), b.quadraticCurveTo(v, w, v, w + z), b.closePath(), (e.fillColor || 0 === e.fillColor) && (b.globalAlpha = e.fillAlpha * c, b.fillStyle = "#" + ("00000" + (0 | g).toString(16)).substr(-6), b.fill()), e.lineWidth && (b.globalAlpha = e.lineAlpha * c, b.strokeStyle = "#" + ("00000" + (0 | h).toString(16)).substr(-6), b.stroke()) + } + } + }, PIXI.CanvasGraphics.renderGraphicsMask = function(a, b) { + var c = a.graphicsData.length; + if (0 !== c) { + b.beginPath(); + for (var d = 0; d < c; d++) { + var e = a.graphicsData[d], + f = e.shape; + if (e.type === PIXI.Graphics.POLY) { + var g = f.points; + b.moveTo(g[0], g[1]); + for (var h = 1; h < g.length / 2; h++) b.lineTo(g[2 * h], g[2 * h + 1]); + g[0] === g[g.length - 2] && g[1] === g[g.length - 1] && b.closePath() + } else if (e.type === PIXI.Graphics.RECT) b.rect(f.x, f.y, f.width, f.height), b.closePath(); + else if (e.type === PIXI.Graphics.CIRC) b.arc(f.x, f.y, f.radius, 0, 2 * Math.PI), b.closePath(); + else if (e.type === PIXI.Graphics.ELIP) { + var i = 2 * f.width, + j = 2 * f.height, + k = f.x - i / 2, + l = f.y - j / 2, + m = .5522848, + n = i / 2 * m, + o = j / 2 * m, + p = k + i, + q = l + j, + r = k + i / 2, + s = l + j / 2; + b.moveTo(k, s), b.bezierCurveTo(k, s - o, r - n, l, r, l), b.bezierCurveTo(r + n, l, p, s - o, p, s), b.bezierCurveTo(p, s + o, r + n, q, r, q), b.bezierCurveTo(r - n, q, k, s + o, k, s), b.closePath() + } else if (e.type === PIXI.Graphics.RREC) { + var t = f.x, + u = f.y, + v = f.width, + w = f.height, + x = f.radius, + y = Math.min(v, w) / 2 | 0; + x = x > y ? y : x, b.moveTo(t, u + x), b.lineTo(t, u + w - x), b.quadraticCurveTo(t, u + w, t + x, u + w), b.lineTo(t + v - x, u + w), b.quadraticCurveTo(t + v, u + w, t + v, u + w - x), b.lineTo(t + v, u + x), b.quadraticCurveTo(t + v, u, t + v - x, u), b.lineTo(t + x, u), b.quadraticCurveTo(t, u, t, u + x), b.closePath() + } + } + } + }, PIXI.CanvasGraphics.updateGraphicsTint = function(a) { + if (16777215 !== a.tint) + for (var b = (a.tint >> 16 & 255) / 255, c = (a.tint >> 8 & 255) / 255, d = (255 & a.tint) / 255, e = 0; e < a.graphicsData.length; e++) { + var f = a.graphicsData[e], + g = 0 | f.fillColor, + h = 0 | f.lineColor; + f._fillTint = ((g >> 16 & 255) / 255 * b * 255 << 16) + ((g >> 8 & 255) / 255 * c * 255 << 8) + (255 & g) / 255 * d * 255, f._lineTint = ((h >> 16 & 255) / 255 * b * 255 << 16) + ((h >> 8 & 255) / 255 * c * 255 << 8) + (255 & h) / 255 * d * 255 + } + }, c.Graphics = function(a, b, d) { + void 0 === b && (b = 0), void 0 === d && (d = 0), this.type = c.GRAPHICS, this.physicsType = c.SPRITE, this.anchor = new c.Point, PIXI.Graphics.call(this), c.Component.Core.init.call(this, a, b, d, "", null) + }, c.Graphics.prototype = Object.create(PIXI.Graphics.prototype), c.Graphics.prototype.constructor = c.Graphics, c.Component.Core.install.call(c.Graphics.prototype, ["Angle", "AutoCull", "Bounds", "Destroy", "FixedToCamera", "InputEnabled", "InWorld", "LifeSpan", "PhysicsBody", "Reset"]), c.Graphics.prototype.preUpdatePhysics = c.Component.PhysicsBody.preUpdate, c.Graphics.prototype.preUpdateLifeSpan = c.Component.LifeSpan.preUpdate, c.Graphics.prototype.preUpdateInWorld = c.Component.InWorld.preUpdate, c.Graphics.prototype.preUpdateCore = c.Component.Core.preUpdate, c.Graphics.prototype.preUpdate = function() { + return !!(this.preUpdatePhysics() && this.preUpdateLifeSpan() && this.preUpdateInWorld()) && this.preUpdateCore() + }, c.Graphics.prototype.postUpdate = function() { + c.Component.PhysicsBody.postUpdate.call(this), c.Component.FixedToCamera.postUpdate.call(this), this._boundsDirty && (this.updateLocalBounds(), this._boundsDirty = !1); + for (var a = 0; a < this.children.length; a++) this.children[a].postUpdate() + }, c.Graphics.prototype.destroy = function(a) { + this.clear(), c.Component.Destroy.prototype.destroy.call(this, a) + }, c.Graphics.prototype.drawTriangle = function(a, b) { + void 0 === b && (b = !1); + var d = new c.Polygon(a); + if (b) { + var e = new c.Point(this.game.camera.x - a[0].x, this.game.camera.y - a[0].y), + f = new c.Point(a[1].x - a[0].x, a[1].y - a[0].y), + g = new c.Point(a[1].x - a[2].x, a[1].y - a[2].y), + h = g.cross(f); + e.dot(h) > 0 && this.drawPolygon(d) + } else this.drawPolygon(d) + }, c.Graphics.prototype.drawTriangles = function(a, b, d) { + void 0 === d && (d = !1); + var e, f = new c.Point, + g = new c.Point, + h = new c.Point, + i = []; + if (b) + if (a[0] instanceof c.Point) + for (e = 0; e < b.length / 3; e++) i.push(a[b[3 * e]]), i.push(a[b[3 * e + 1]]), i.push(a[b[3 * e + 2]]), 3 === i.length && (this.drawTriangle(i, d), i = []); + else + for (e = 0; e < b.length; e++) f.x = a[2 * b[e]], f.y = a[2 * b[e] + 1], i.push(f.copyTo({})), 3 === i.length && (this.drawTriangle(i, d), i = []); + else if (a[0] instanceof c.Point) + for (e = 0; e < a.length / 3; e++) this.drawTriangle([a[3 * e], a[3 * e + 1], a[3 * e + 2]], d); + else + for (e = 0; e < a.length / 6; e++) f.x = a[6 * e + 0], f.y = a[6 * e + 1], g.x = a[6 * e + 2], g.y = a[6 * e + 3], h.x = a[6 * e + 4], h.y = a[6 * e + 5], this.drawTriangle([f, g, h], d) + }, c.RenderTexture = function(a, b, d, e, f, g) { + void 0 === e && (e = ""), void 0 === f && (f = c.scaleModes.DEFAULT), void 0 === g && (g = 1), this.game = a, this.key = e, this.type = c.RENDERTEXTURE, this._tempMatrix = new PIXI.Matrix, PIXI.RenderTexture.call(this, b, d, this.game.renderer, f, g), this.render = c.RenderTexture.prototype.render + }, c.RenderTexture.prototype = Object.create(PIXI.RenderTexture.prototype), c.RenderTexture.prototype.constructor = c.RenderTexture, c.RenderTexture.prototype.renderXY = function(a, b, c, d) { + a.updateTransform(), this._tempMatrix.copyFrom(a.worldTransform), this._tempMatrix.tx = b, this._tempMatrix.ty = c, this.renderer.type === PIXI.WEBGL_RENDERER ? this.renderWebGL(a, this._tempMatrix, d) : this.renderCanvas(a, this._tempMatrix, d) + }, c.RenderTexture.prototype.renderRawXY = function(a, b, c, d) { + this._tempMatrix.identity().translate(b, c), this.renderer.type === PIXI.WEBGL_RENDERER ? this.renderWebGL(a, this._tempMatrix, d) : this.renderCanvas(a, this._tempMatrix, d) + }, c.RenderTexture.prototype.render = function(a, b, c) { + void 0 === b || null === b ? this._tempMatrix.copyFrom(a.worldTransform) : this._tempMatrix.copyFrom(b), this.renderer.type === PIXI.WEBGL_RENDERER ? this.renderWebGL(a, this._tempMatrix, c) : this.renderCanvas(a, this._tempMatrix, c) + }, c.Text = function(a, b, d, e, f) { + b = b || 0, d = d || 0, e = void 0 === e || null === e ? "" : e.toString(), f = c.Utils.extend({}, f), this.type = c.TEXT, this.physicsType = c.SPRITE, this.padding = new c.Point, this.textBounds = null, this.canvas = PIXI.CanvasPool.create(this), this.context = this.canvas.getContext("2d"), this.colors = [], this.strokeColors = [], this.fontStyles = [], this.fontWeights = [], this.autoRound = !1, this.useAdvancedWrap = !1, this._res = a.renderer.resolution, this._text = e, this._fontComponents = null, this._lineSpacing = 0, this._charCount = 0, this._width = 0, this._height = 0, c.Sprite.call(this, a, b, d, PIXI.Texture.fromCanvas(this.canvas)), this.setStyle(f), "" !== e && this.updateText() + }, c.Text.prototype = Object.create(c.Sprite.prototype), c.Text.prototype.constructor = c.Text, c.Text.prototype.preUpdate = function() { + return !!(this.preUpdatePhysics() && this.preUpdateLifeSpan() && this.preUpdateInWorld()) && this.preUpdateCore() + }, c.Text.prototype.update = function() {}, c.Text.prototype.destroy = function(a) { + this.texture.destroy(!0), c.Component.Destroy.prototype.destroy.call(this, a) + }, c.Text.prototype.setShadow = function(a, b, c, d, e, f) { + return void 0 === a && (a = 0), void 0 === b && (b = 0), void 0 === c && (c = "rgba(0, 0, 0, 1)"), void 0 === d && (d = 0), void 0 === e && (e = !0), void 0 === f && (f = !0), this.style.shadowOffsetX = a, this.style.shadowOffsetY = b, this.style.shadowColor = c, this.style.shadowBlur = d, this.style.shadowStroke = e, this.style.shadowFill = f, this.dirty = !0, this + }, c.Text.prototype.setStyle = function(a, b) { + void 0 === b && (b = !1), a = a || {}, a.font = a.font || "bold 20pt Arial", a.backgroundColor = a.backgroundColor || null, a.fill = a.fill || "black", a.align = a.align || "left", a.boundsAlignH = a.boundsAlignH || "left", a.boundsAlignV = a.boundsAlignV || "top", a.stroke = a.stroke || "black", a.strokeThickness = a.strokeThickness || 0, a.wordWrap = a.wordWrap || !1, a.wordWrapWidth = a.wordWrapWidth || 100, a.maxLines = a.maxLines || 0, a.shadowOffsetX = a.shadowOffsetX || 0, a.shadowOffsetY = a.shadowOffsetY || 0, a.shadowColor = a.shadowColor || "rgba(0,0,0,0)", a.shadowBlur = a.shadowBlur || 0, a.tabs = a.tabs || 0; + var c = this.fontToComponents(a.font); + return a.fontStyle && (c.fontStyle = a.fontStyle), a.fontVariant && (c.fontVariant = a.fontVariant), a.fontWeight && (c.fontWeight = a.fontWeight), a.fontSize && ("number" == typeof a.fontSize && (a.fontSize = a.fontSize + "px"), c.fontSize = a.fontSize), this._fontComponents = c, a.font = this.componentsToFont(this._fontComponents), this.style = a, this.dirty = !0, b && this.updateText(), this + }, c.Text.prototype.updateText = function() { + this.texture.baseTexture.resolution = this._res, this.context.font = this.style.font; + var a = this.text; + this.style.wordWrap && (a = this.runWordWrap(this.text)); + var b = a.split(/(?:\r\n|\r|\n)/), + c = this.style.tabs, + d = [], + e = 0, + f = this.determineFontProperties(this.style.font), + g = b.length; + this.style.maxLines > 0 && this.style.maxLines < b.length && (g = this.style.maxLines), this._charCount = 0; + for (var h = 0; h < g; h++) { + if (0 === c) { + var i = this.style.strokeThickness + this.padding.x; + i += this.colors.length > 0 || this.strokeColors.length > 0 || this.fontWeights.length > 0 || this.fontStyles.length > 0 ? this.measureLine(b[h]) : this.context.measureText(b[h]).width, this.style.wordWrap && (i -= this.context.measureText(" ").width) + } else { + var j = b[h].split(/(?:\t)/), + i = this.padding.x + this.style.strokeThickness; + if (Array.isArray(c)) + for (var k = 0, l = 0; l < j.length; l++) { + var m = 0; + m = this.colors.length > 0 || this.strokeColors.length > 0 || this.fontWeights.length > 0 || this.fontStyles.length > 0 ? this.measureLine(j[l]) : Math.ceil(this.context.measureText(j[l]).width), l > 0 && (k += c[l - 1]), i = k + m + } else + for (var l = 0; l < j.length; l++) { + i += this.colors.length > 0 || this.strokeColors.length > 0 || this.fontWeights.length > 0 || this.fontStyles.length > 0 ? this.measureLine(j[l]) : Math.ceil(this.context.measureText(j[l]).width); + var n = this.game.math.snapToCeil(i, c) - i; + i += n + } + } + d[h] = Math.ceil(i), e = Math.max(e, d[h]) + } + this.canvas.width = e * this._res; + var o = f.fontSize + this.style.strokeThickness + this.padding.y, + p = o * g, + q = this._lineSpacing; + q < 0 && Math.abs(q) > o && (q = -o), 0 !== q && (p += q > 0 ? q * b.length : q * (b.length - 1)), this.canvas.height = p * this._res, this.context.scale(this._res, this._res), navigator.isCocoonJS && this.context.clearRect(0, 0, this.canvas.width, this.canvas.height), + this.style.backgroundColor && (this.context.fillStyle = this.style.backgroundColor, this.context.fillRect(0, 0, this.canvas.width, this.canvas.height)), this.context.fillStyle = this.style.fill, this.context.font = this.style.font, this.context.strokeStyle = this.style.stroke, this.context.textBaseline = "alphabetic", this.context.lineWidth = this.style.strokeThickness, this.context.lineCap = "round", this.context.lineJoin = "round"; + var r, s; + for (this._charCount = 0, h = 0; h < g; h++) r = this.style.strokeThickness / 2, s = this.style.strokeThickness / 2 + h * o + f.ascent, h > 0 && (s += q * h), "right" === this.style.align ? r += e - d[h] : "center" === this.style.align && (r += (e - d[h]) / 2), this.autoRound && (r = Math.round(r), s = Math.round(s)), this.colors.length > 0 || this.strokeColors.length > 0 || this.fontWeights.length > 0 || this.fontStyles.length > 0 ? this.updateLine(b[h], r, s) : (this.style.stroke && this.style.strokeThickness && (this.updateShadow(this.style.shadowStroke), 0 === c ? this.context.strokeText(b[h], r, s) : this.renderTabLine(b[h], r, s, !1)), this.style.fill && (this.updateShadow(this.style.shadowFill), 0 === c ? this.context.fillText(b[h], r, s) : this.renderTabLine(b[h], r, s, !0))); + this.updateTexture(), this.dirty = !1 + }, c.Text.prototype.renderTabLine = function(a, b, c, d) { + var e = a.split(/(?:\t)/), + f = this.style.tabs, + g = 0; + if (Array.isArray(f)) + for (var h = 0, i = 0; i < e.length; i++) i > 0 && (h += f[i - 1]), g = b + h, d ? this.context.fillText(e[i], g, c) : this.context.strokeText(e[i], g, c); + else + for (var i = 0; i < e.length; i++) { + var j = Math.ceil(this.context.measureText(e[i]).width); + g = this.game.math.snapToCeil(b, f), d ? this.context.fillText(e[i], g, c) : this.context.strokeText(e[i], g, c), b = g + j + } + }, c.Text.prototype.updateShadow = function(a) { + a ? (this.context.shadowOffsetX = this.style.shadowOffsetX, this.context.shadowOffsetY = this.style.shadowOffsetY, this.context.shadowColor = this.style.shadowColor, this.context.shadowBlur = this.style.shadowBlur) : (this.context.shadowOffsetX = 0, this.context.shadowOffsetY = 0, this.context.shadowColor = 0, this.context.shadowBlur = 0) + }, c.Text.prototype.measureLine = function(a) { + for (var b = 0, c = 0; c < a.length; c++) { + var d = a[c]; + if (this.fontWeights.length > 0 || this.fontStyles.length > 0) { + var e = this.fontToComponents(this.context.font); + this.fontStyles[this._charCount] && (e.fontStyle = this.fontStyles[this._charCount]), this.fontWeights[this._charCount] && (e.fontWeight = this.fontWeights[this._charCount]), this.context.font = this.componentsToFont(e) + } + this.style.stroke && this.style.strokeThickness && (this.strokeColors[this._charCount] && (this.context.strokeStyle = this.strokeColors[this._charCount]), this.updateShadow(this.style.shadowStroke)), this.style.fill && (this.colors[this._charCount] && (this.context.fillStyle = this.colors[this._charCount]), this.updateShadow(this.style.shadowFill)), b += this.context.measureText(d).width, this._charCount++ + } + return Math.ceil(b) + }, c.Text.prototype.updateLine = function(a, b, c) { + for (var d = 0; d < a.length; d++) { + var e = a[d]; + if (this.fontWeights.length > 0 || this.fontStyles.length > 0) { + var f = this.fontToComponents(this.context.font); + this.fontStyles[this._charCount] && (f.fontStyle = this.fontStyles[this._charCount]), this.fontWeights[this._charCount] && (f.fontWeight = this.fontWeights[this._charCount]), this.context.font = this.componentsToFont(f) + } + this.style.stroke && this.style.strokeThickness && (this.strokeColors[this._charCount] && (this.context.strokeStyle = this.strokeColors[this._charCount]), this.updateShadow(this.style.shadowStroke), this.context.strokeText(e, b, c)), this.style.fill && (this.colors[this._charCount] && (this.context.fillStyle = this.colors[this._charCount]), this.updateShadow(this.style.shadowFill), this.context.fillText(e, b, c)), b += this.context.measureText(e).width, this._charCount++ + } + }, c.Text.prototype.clearColors = function() { + return this.colors = [], this.strokeColors = [], this.dirty = !0, this + }, c.Text.prototype.clearFontValues = function() { + return this.fontStyles = [], this.fontWeights = [], this.dirty = !0, this + }, c.Text.prototype.addColor = function(a, b) { + return this.colors[b] = a, this.dirty = !0, this + }, c.Text.prototype.addStrokeColor = function(a, b) { + return this.strokeColors[b] = a, this.dirty = !0, this + }, c.Text.prototype.addFontStyle = function(a, b) { + return this.fontStyles[b] = a, this.dirty = !0, this + }, c.Text.prototype.addFontWeight = function(a, b) { + return this.fontWeights[b] = a, this.dirty = !0, this + }, c.Text.prototype.precalculateWordWrap = function(a) { + this.texture.baseTexture.resolution = this._res, this.context.font = this.style.font; + var b = this.runWordWrap(a); + return b.split(/(?:\r\n|\r|\n)/) + }, c.Text.prototype.runWordWrap = function(a) { + return this.useAdvancedWrap ? this.advancedWordWrap(a) : this.basicWordWrap(a) + }, c.Text.prototype.advancedWordWrap = function(a) { + for (var b = this.context, c = this.style.wordWrapWidth, d = "", e = a.replace(/ +/gi, " ").split(/\r?\n/gi), f = e.length, g = 0; g < f; g++) { + var h = e[g], + i = ""; + h = h.replace(/^ *|\s*$/gi, ""); + var j = b.measureText(h).width; + if (j < c) d += h + "\n"; + else { + for (var k = c, l = h.split(" "), m = 0; m < l.length; m++) { + var n = l[m], + o = n + " ", + p = b.measureText(o).width; + if (p > k) { + if (0 === m) { + for (var q = o; q.length && (q = q.slice(0, -1), p = b.measureText(q).width, !(p <= k));); + if (!q.length) throw new Error("This text's wordWrapWidth setting is less than a single character!"); + var r = n.substr(q.length); + l[m] = r, i += q + } + var s = l[m].length ? m : m + 1, + t = l.slice(s).join(" ").replace(/[ \n]*$/gi, ""); + e[g + 1] = t + " " + (e[g + 1] || ""), f = e.length; + break + } + i += o, k -= p + } + d += i.replace(/[ \n]*$/gi, "") + "\n" + } + } + return d = d.replace(/[\s|\n]*$/gi, "") + }, c.Text.prototype.basicWordWrap = function(a) { + for (var b = "", c = a.split("\n"), d = 0; d < c.length; d++) { + for (var e = this.style.wordWrapWidth, f = c[d].split(" "), g = 0; g < f.length; g++) { + var h = this.context.measureText(f[g]).width, + i = h + this.context.measureText(" ").width; + i > e ? (g > 0 && (b += "\n"), b += f[g] + " ", e = this.style.wordWrapWidth - h) : (e -= i, b += f[g] + " ") + } + d < c.length - 1 && (b += "\n") + } + return b + }, c.Text.prototype.updateFont = function(a) { + var b = this.componentsToFont(a); + this.style.font !== b && (this.style.font = b, this.dirty = !0, this.parent && this.updateTransform()) + }, c.Text.prototype.fontToComponents = function(a) { + var b = a.match(/^\s*(?:\b(normal|italic|oblique|inherit)?\b)\s*(?:\b(normal|small-caps|inherit)?\b)\s*(?:\b(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit)?\b)\s*(?:\b(xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller|0|\d*(?:[.]\d*)?(?:%|[a-z]{2,5}))?\b)\s*(.*)\s*$/); + if (b) { + var c = b[5].trim(); + return /^(?:inherit|serif|sans-serif|cursive|fantasy|monospace)$/.exec(c) || /['",]/.exec(c) || (c = "'" + c + "'"), { + font: a, + fontStyle: b[1] || "normal", + fontVariant: b[2] || "normal", + fontWeight: b[3] || "normal", + fontSize: b[4] || "medium", + fontFamily: c + } + } + return console.warn("Phaser.Text - unparsable CSS font: " + a), { + font: a + } + }, c.Text.prototype.componentsToFont = function(a) { + var b, c = []; + return b = a.fontStyle, b && "normal" !== b && c.push(b), b = a.fontVariant, b && "normal" !== b && c.push(b), b = a.fontWeight, b && "normal" !== b && c.push(b), b = a.fontSize, b && "medium" !== b && c.push(b), b = a.fontFamily, b && c.push(b), c.length || c.push(a.font), c.join(" ") + }, c.Text.prototype.setText = function(a, b) { + return void 0 === b && (b = !1), this.text = a.toString() || "", b ? this.updateText() : this.dirty = !0, this + }, c.Text.prototype.parseList = function(a) { + if (!Array.isArray(a)) return this; + for (var b = "", c = 0; c < a.length; c++) Array.isArray(a[c]) ? (b += a[c].join("\t"), c < a.length - 1 && (b += "\n")) : (b += a[c], c < a.length - 1 && (b += "\t")); + return this.text = b, this.dirty = !0, this + }, c.Text.prototype.setTextBounds = function(a, b, d, e) { + return void 0 === a ? this.textBounds = null : (this.textBounds ? this.textBounds.setTo(a, b, d, e) : this.textBounds = new c.Rectangle(a, b, d, e), this.style.wordWrapWidth > d && (this.style.wordWrapWidth = d)), this.updateTexture(), this + }, c.Text.prototype.updateTexture = function() { + var a = this.texture.baseTexture, + b = this.texture.crop, + c = this.texture.frame, + d = this.canvas.width, + e = this.canvas.height; + if (a.width = d, a.height = e, b.width = d, b.height = e, c.width = d, c.height = e, this.texture.width = d, this.texture.height = e, this._width = d, this._height = e, this.textBounds) { + var f = this.textBounds.x, + g = this.textBounds.y; + "right" === this.style.boundsAlignH ? f += this.textBounds.width - this.canvas.width / this.resolution : "center" === this.style.boundsAlignH && (f += this.textBounds.halfWidth - this.canvas.width / this.resolution / 2), "bottom" === this.style.boundsAlignV ? g += this.textBounds.height - this.canvas.height / this.resolution : "middle" === this.style.boundsAlignV && (g += this.textBounds.halfHeight - this.canvas.height / this.resolution / 2), this.pivot.x = -f, this.pivot.y = -g + } + this.renderable = 0 !== d && 0 !== e, this.texture.requiresReTint = !0, this.texture.baseTexture.dirty() + }, c.Text.prototype._renderWebGL = function(a) { + this.dirty && (this.updateText(), this.dirty = !1), PIXI.Sprite.prototype._renderWebGL.call(this, a) + }, c.Text.prototype._renderCanvas = function(a) { + this.dirty && (this.updateText(), this.dirty = !1), PIXI.Sprite.prototype._renderCanvas.call(this, a) + }, c.Text.prototype.determineFontProperties = function(a) { + var b = c.Text.fontPropertiesCache[a]; + if (!b) { + b = {}; + var d = c.Text.fontPropertiesCanvas, + e = c.Text.fontPropertiesContext; + e.font = a; + var f = Math.ceil(e.measureText("|MÉq").width), + g = Math.ceil(e.measureText("|MÉq").width), + h = 2 * g; + if (g = 1.4 * g | 0, d.width = f, d.height = h, e.fillStyle = "#f00", e.fillRect(0, 0, f, h), e.font = a, e.textBaseline = "alphabetic", e.fillStyle = "#000", e.fillText("|MÉq", 0, g), !e.getImageData(0, 0, f, h)) return b.ascent = g, b.descent = g + 6, b.fontSize = b.ascent + b.descent, c.Text.fontPropertiesCache[a] = b, b; + var i, j, k = e.getImageData(0, 0, f, h).data, + l = k.length, + m = 4 * f, + n = 0, + o = !1; + for (i = 0; i < g; i++) { + for (j = 0; j < m; j += 4) + if (255 !== k[n + j]) { + o = !0; + break + } if (o) break; + n += m + } + for (b.ascent = g - i, n = l - m, o = !1, i = h; i > g; i--) { + for (j = 0; j < m; j += 4) + if (255 !== k[n + j]) { + o = !0; + break + } if (o) break; + n -= m + } + b.descent = i - g, b.descent += 6, b.fontSize = b.ascent + b.descent, c.Text.fontPropertiesCache[a] = b + } + return b + }, c.Text.prototype.getBounds = function(a) { + return this.dirty && (this.updateText(), this.dirty = !1), PIXI.Sprite.prototype.getBounds.call(this, a) + }, Object.defineProperty(c.Text.prototype, "text", { + get: function() { + return this._text + }, + set: function(a) { + a !== this._text && (this._text = a.toString() || "", this.dirty = !0, this.parent && this.updateTransform()) + } + }), Object.defineProperty(c.Text.prototype, "cssFont", { + get: function() { + return this.componentsToFont(this._fontComponents) + }, + set: function(a) { + a = a || "bold 20pt Arial", this._fontComponents = this.fontToComponents(a), this.updateFont(this._fontComponents) + } + }), Object.defineProperty(c.Text.prototype, "font", { + get: function() { + return this._fontComponents.fontFamily + }, + set: function(a) { + a = a || "Arial", a = a.trim(), /^(?:inherit|serif|sans-serif|cursive|fantasy|monospace)$/.exec(a) || /['",]/.exec(a) || (a = "'" + a + "'"), this._fontComponents.fontFamily = a, this.updateFont(this._fontComponents) + } + }), Object.defineProperty(c.Text.prototype, "fontSize", { + get: function() { + var a = this._fontComponents.fontSize; + return a && /(?:^0$|px$)/.exec(a) ? parseInt(a, 10) : a + }, + set: function(a) { + a = a || "0", "number" == typeof a && (a += "px"), this._fontComponents.fontSize = a, this.updateFont(this._fontComponents) + } + }), Object.defineProperty(c.Text.prototype, "fontWeight", { + get: function() { + return this._fontComponents.fontWeight || "normal" + }, + set: function(a) { + a = a || "normal", this._fontComponents.fontWeight = a, this.updateFont(this._fontComponents) + } + }), Object.defineProperty(c.Text.prototype, "fontStyle", { + get: function() { + return this._fontComponents.fontStyle || "normal" + }, + set: function(a) { + a = a || "normal", this._fontComponents.fontStyle = a, this.updateFont(this._fontComponents) + } + }), Object.defineProperty(c.Text.prototype, "fontVariant", { + get: function() { + return this._fontComponents.fontVariant || "normal" + }, + set: function(a) { + a = a || "normal", this._fontComponents.fontVariant = a, this.updateFont(this._fontComponents) + } + }), Object.defineProperty(c.Text.prototype, "fill", { + get: function() { + return this.style.fill + }, + set: function(a) { + a !== this.style.fill && (this.style.fill = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "align", { + get: function() { + return this.style.align + }, + set: function(a) { + a !== this.style.align && (this.style.align = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "resolution", { + get: function() { + return this._res + }, + set: function(a) { + a !== this._res && (this._res = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "tabs", { + get: function() { + return this.style.tabs + }, + set: function(a) { + a !== this.style.tabs && (this.style.tabs = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "boundsAlignH", { + get: function() { + return this.style.boundsAlignH + }, + set: function(a) { + a !== this.style.boundsAlignH && (this.style.boundsAlignH = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "boundsAlignV", { + get: function() { + return this.style.boundsAlignV + }, + set: function(a) { + a !== this.style.boundsAlignV && (this.style.boundsAlignV = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "stroke", { + get: function() { + return this.style.stroke + }, + set: function(a) { + a !== this.style.stroke && (this.style.stroke = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "strokeThickness", { + get: function() { + return this.style.strokeThickness + }, + set: function(a) { + a !== this.style.strokeThickness && (this.style.strokeThickness = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "wordWrap", { + get: function() { + return this.style.wordWrap + }, + set: function(a) { + a !== this.style.wordWrap && (this.style.wordWrap = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "wordWrapWidth", { + get: function() { + return this.style.wordWrapWidth + }, + set: function(a) { + a !== this.style.wordWrapWidth && (this.style.wordWrapWidth = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "lineSpacing", { + get: function() { + return this._lineSpacing + }, + set: function(a) { + a !== this._lineSpacing && (this._lineSpacing = parseFloat(a), this.dirty = !0, this.parent && this.updateTransform()) + } + }), Object.defineProperty(c.Text.prototype, "shadowOffsetX", { + get: function() { + return this.style.shadowOffsetX + }, + set: function(a) { + a !== this.style.shadowOffsetX && (this.style.shadowOffsetX = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "shadowOffsetY", { + get: function() { + return this.style.shadowOffsetY + }, + set: function(a) { + a !== this.style.shadowOffsetY && (this.style.shadowOffsetY = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "shadowColor", { + get: function() { + return this.style.shadowColor + }, + set: function(a) { + a !== this.style.shadowColor && (this.style.shadowColor = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "shadowBlur", { + get: function() { + return this.style.shadowBlur + }, + set: function(a) { + a !== this.style.shadowBlur && (this.style.shadowBlur = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "shadowStroke", { + get: function() { + return this.style.shadowStroke + }, + set: function(a) { + a !== this.style.shadowStroke && (this.style.shadowStroke = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "shadowFill", { + get: function() { + return this.style.shadowFill + }, + set: function(a) { + a !== this.style.shadowFill && (this.style.shadowFill = a, this.dirty = !0) + } + }), Object.defineProperty(c.Text.prototype, "width", { + get: function() { + return this.dirty && (this.updateText(), this.dirty = !1), this.scale.x * this.texture.frame.width + }, + set: function(a) { + this.scale.x = a / this.texture.frame.width, this._width = a + } + }), Object.defineProperty(c.Text.prototype, "height", { + get: function() { + return this.dirty && (this.updateText(), this.dirty = !1), this.scale.y * this.texture.frame.height + }, + set: function(a) { + this.scale.y = a / this.texture.frame.height, this._height = a + } + }), c.Text.fontPropertiesCache = {}, c.Text.fontPropertiesCanvas = document.createElement("canvas"), c.Text.fontPropertiesContext = c.Text.fontPropertiesCanvas.getContext("2d"), c.BitmapText = function(a, b, d, e, f, g, h) { + b = b || 0, d = d || 0, e = e || "", f = f || "", g = g || 32, h = h || "left", PIXI.DisplayObjectContainer.call(this), this.type = c.BITMAPTEXT, this.physicsType = c.SPRITE, this.textWidth = 0, this.textHeight = 0, this.anchor = new c.Point, this._prevAnchor = new c.Point, this._glyphs = [], this._maxWidth = 0, this._text = f.toString() || "", this._data = a.cache.getBitmapFont(e), this._font = e, this._fontSize = g, this._align = h, this._tint = 16777215, this.updateText(), this.dirty = !1, c.Component.Core.init.call(this, a, b, d, "", null) + }, c.BitmapText.prototype = Object.create(PIXI.DisplayObjectContainer.prototype), c.BitmapText.prototype.constructor = c.BitmapText, c.Component.Core.install.call(c.BitmapText.prototype, ["Angle", "AutoCull", "Bounds", "Destroy", "FixedToCamera", "InputEnabled", "InWorld", "LifeSpan", "PhysicsBody", "Reset"]), c.BitmapText.prototype.preUpdatePhysics = c.Component.PhysicsBody.preUpdate, c.BitmapText.prototype.preUpdateLifeSpan = c.Component.LifeSpan.preUpdate, c.BitmapText.prototype.preUpdateInWorld = c.Component.InWorld.preUpdate, c.BitmapText.prototype.preUpdateCore = c.Component.Core.preUpdate, c.BitmapText.prototype.preUpdate = function() { + return !!(this.preUpdatePhysics() && this.preUpdateLifeSpan() && this.preUpdateInWorld()) && this.preUpdateCore() + }, c.BitmapText.prototype.postUpdate = function() { + c.Component.PhysicsBody.postUpdate.call(this), c.Component.FixedToCamera.postUpdate.call(this), this.body && this.body.type === c.Physics.ARCADE && (this.textWidth === this.body.sourceWidth && this.textHeight === this.body.sourceHeight || this.body.setSize(this.textWidth, this.textHeight)) + }, c.BitmapText.prototype.setText = function(a) { + this.text = a + }; + c.BitmapText.prototype.scanLine = function(a, b, c) { + for (var d = 0, e = 0, f = -1, g = 0, h = null, i = this._maxWidth > 0 ? this._maxWidth : null, j = [], k = 0; k < c.length; k++) { + var l = k === c.length - 1; + if (/(?:\r\n|\r|\n)/.test(c.charAt(k))) return { + width: e, + text: c.substr(0, k), + end: l, + chars: j + }; + var m = c.charCodeAt(k), + n = a.chars[m], + o = 0; + void 0 === n && (m = 32, n = a.chars[m]); + var p = h && n.kerning[h] ? n.kerning[h] : 0; + if (/(\s)/.test(c.charAt(k)) && (f = k, g = e), o = (p + n.texture.width + n.xOffset) * b, i && e + o >= i && f > -1) return { + width: g || e, + text: c.substr(0, k - (k - f)), + end: l, + chars: j + }; + e += (n.xAdvance + p) * b, j.push(d + (n.xOffset + p) * b), d += (n.xAdvance + p) * b, h = m + } + return { + width: e, + text: c, + end: l, + chars: j + } + }; + c.BitmapText.prototype.cleanText = function(a, b) { + void 0 === b && (b = ""); + var c = this._data.font; + if (!c) return ""; + for (var d = /\r\n|\n\r|\n|\r/g, e = a.replace(d, "\n").split("\n"), f = 0; f < e.length; f++) { + for (var g = "", h = e[f], i = 0; i < h.length; i++) g = c.chars[h.charCodeAt(i)] ? g.concat(h[i]) : g.concat(b); + e[f] = g + } + return e.join("\n") + }, c.BitmapText.prototype.updateText = function() { + var a = this._data.font; + if (a) { + var b = this.text, + c = this._fontSize / a.size, + d = [], + e = 0; + this.textWidth = 0; + do { + var f = this.scanLine(a, c, b); + f.y = e, d.push(f), f.width > this.textWidth && (this.textWidth = f.width), e += a.lineHeight * c, b = b.substr(f.text.length + 1) + } while (f.end === !1); + this.textHeight = e; + for (var g = 0, h = 0, i = this.textWidth * this.anchor.x, j = this.textHeight * this.anchor.y, k = 0; k < d.length; k++) { + var f = d[k]; + "right" === this._align ? h = this.textWidth - f.width : "center" === this._align && (h = (this.textWidth - f.width) / 2); + for (var l = 0; l < f.text.length; l++) { + var m = f.text.charCodeAt(l), + n = a.chars[m]; + void 0 === n && (m = 32, n = a.chars[m]); + var o = this._glyphs[g]; + o ? o.texture = n.texture : (o = new PIXI.Sprite(n.texture), o.name = f.text[l], this._glyphs.push(o)), o.position.x = f.chars[l] + h - i, o.position.y = f.y + n.yOffset * c - j, o.scale.set(c), o.tint = this.tint, o.texture.requiresReTint = !0, o.parent || this.addChild(o), g++ + } + } + for (k = g; k < this._glyphs.length; k++) this.removeChild(this._glyphs[k]) + } + }, c.BitmapText.prototype.purgeGlyphs = function() { + for (var a = this._glyphs.length, b = [], c = 0; c < this._glyphs.length; c++) this._glyphs[c].parent !== this ? this._glyphs[c].destroy() : b.push(this._glyphs[c]); + return this._glyphs = [], this._glyphs = b, this.updateText(), a - b.length + }, c.BitmapText.prototype.updateTransform = function() { + !this.dirty && this.anchor.equals(this._prevAnchor) || (this.updateText(), this.dirty = !1, this._prevAnchor.copyFrom(this.anchor)), PIXI.DisplayObjectContainer.prototype.updateTransform.call(this) + }, Object.defineProperty(c.BitmapText.prototype, "align", { + get: function() { + return this._align + }, + set: function(a) { + a === this._align || "left" !== a && "center" !== a && "right" !== a || (this._align = a, this.updateText()) + } + }), Object.defineProperty(c.BitmapText.prototype, "tint", { + get: function() { + return this._tint + }, + set: function(a) { + a !== this._tint && (this._tint = a, this.updateText()) + } + }), Object.defineProperty(c.BitmapText.prototype, "font", { + get: function() { + return this._font + }, + set: function(a) { + a !== this._font && (this._font = a.trim(), this._data = this.game.cache.getBitmapFont(this._font), this.updateText()) + } + }), Object.defineProperty(c.BitmapText.prototype, "fontSize", { + get: function() { + return this._fontSize + }, + set: function(a) { + a = parseInt(a, 10), a !== this._fontSize && a > 0 && (this._fontSize = a, this.updateText()) + } + }), Object.defineProperty(c.BitmapText.prototype, "text", { + get: function() { + return this._text + }, + set: function(a) { + a !== this._text && (this._text = a.toString() || "", this.updateText()) + } + }), Object.defineProperty(c.BitmapText.prototype, "maxWidth", { + get: function() { + return this._maxWidth + }, + set: function(a) { + a !== this._maxWidth && (this._maxWidth = a, this.updateText()) + } + }), Object.defineProperty(c.BitmapText.prototype, "smoothed", { + get: function() { + return !this._data.base.scaleMode + }, + set: function(a) { + a ? this._data.base.scaleMode = 0 : this._data.base.scaleMode = 1 + } + }), c.RetroFont = function(a, b, d, e, f, g, h, i, j, k) { + if (!a.cache.checkImageKey(b)) return !1; + void 0 !== g && null !== g || (g = a.cache.getImage(b).width / d), this.characterWidth = d, this.characterHeight = e, this.characterSpacingX = h || 0, this.characterSpacingY = i || 0, this.characterPerRow = g, this.offsetX = j || 0, this.offsetY = k || 0, this.align = "left", this.multiLine = !1, this.autoUpperCase = !0, this.customSpacingX = 0, this.customSpacingY = 0, this.fixedWidth = 0, this.fontSet = a.cache.getImage(b), this._text = "", this.grabData = [], this.frameData = new c.FrameData; + for (var l = this.offsetX, m = this.offsetY, n = 0, o = 0; o < f.length; o++) { + var p = this.frameData.addFrame(new c.Frame(o, l, m, this.characterWidth, this.characterHeight)); + this.grabData[f.charCodeAt(o)] = p.index, n++, n === this.characterPerRow ? (n = 0, l = this.offsetX, m += this.characterHeight + this.characterSpacingY) : l += this.characterWidth + this.characterSpacingX + } + a.cache.updateFrameData(b, this.frameData), this.stamp = new c.Image(a, 0, 0, b, 0), c.RenderTexture.call(this, a, 100, 100, "", c.scaleModes.NEAREST), this.type = c.RETROFONT + }, c.RetroFont.prototype = Object.create(c.RenderTexture.prototype), c.RetroFont.prototype.constructor = c.RetroFont, c.RetroFont.ALIGN_LEFT = "left", c.RetroFont.ALIGN_RIGHT = "right", c.RetroFont.ALIGN_CENTER = "center", c.RetroFont.TEXT_SET1 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", c.RetroFont.TEXT_SET2 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ", c.RetroFont.TEXT_SET3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ", c.RetroFont.TEXT_SET4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789", c.RetroFont.TEXT_SET5 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789", c.RetroFont.TEXT_SET6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ", c.RetroFont.TEXT_SET7 = "AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39", c.RetroFont.TEXT_SET8 = "0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ", c.RetroFont.TEXT_SET9 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!", c.RetroFont.TEXT_SET10 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", c.RetroFont.TEXT_SET11 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789", c.RetroFont.prototype.setFixedWidth = function(a, b) { + void 0 === b && (b = "left"), this.fixedWidth = a, this.align = b + }, c.RetroFont.prototype.setText = function(a, b, c, d, e, f) { + this.multiLine = b || !1, this.customSpacingX = c || 0, this.customSpacingY = d || 0, this.align = e || "left", f ? this.autoUpperCase = !1 : this.autoUpperCase = !0, a.length > 0 && (this.text = a) + }, c.RetroFont.prototype.buildRetroFontText = function() { + var a = 0, + b = 0; + if (this.clear(), this.multiLine) { + var d = this._text.split("\n"); + this.fixedWidth > 0 ? this.resize(this.fixedWidth, d.length * (this.characterHeight + this.customSpacingY) - this.customSpacingY, !0) : this.resize(this.getLongestLine() * (this.characterWidth + this.customSpacingX), d.length * (this.characterHeight + this.customSpacingY) - this.customSpacingY, !0); + for (var e = 0; e < d.length; e++) a = 0, this.align === c.RetroFont.ALIGN_RIGHT ? a = this.width - d[e].length * (this.characterWidth + this.customSpacingX) : this.align === c.RetroFont.ALIGN_CENTER && (a = this.width / 2 - d[e].length * (this.characterWidth + this.customSpacingX) / 2, a += this.customSpacingX / 2), a < 0 && (a = 0), this.pasteLine(d[e], a, b, this.customSpacingX), b += this.characterHeight + this.customSpacingY + } else this.fixedWidth > 0 ? this.resize(this.fixedWidth, this.characterHeight, !0) : this.resize(this._text.length * (this.characterWidth + this.customSpacingX), this.characterHeight, !0), a = 0, this.align === c.RetroFont.ALIGN_RIGHT ? a = this.width - this._text.length * (this.characterWidth + this.customSpacingX) : this.align === c.RetroFont.ALIGN_CENTER && (a = this.width / 2 - this._text.length * (this.characterWidth + this.customSpacingX) / 2, a += this.customSpacingX / 2), a < 0 && (a = 0), this.pasteLine(this._text, a, 0, this.customSpacingX); + this.requiresReTint = !0 + }, c.RetroFont.prototype.pasteLine = function(a, b, c, d) { + for (var e = 0; e < a.length; e++) + if (" " === a.charAt(e)) b += this.characterWidth + d; + else if (this.grabData[a.charCodeAt(e)] >= 0 && (this.stamp.frame = this.grabData[a.charCodeAt(e)], this.renderXY(this.stamp, b, c, !1), b += this.characterWidth + d, b > this.width)) break + }, c.RetroFont.prototype.getLongestLine = function() { + var a = 0; + if (this._text.length > 0) + for (var b = this._text.split("\n"), c = 0; c < b.length; c++) b[c].length > a && (a = b[c].length); + return a + }, c.RetroFont.prototype.removeUnsupportedCharacters = function(a) { + for (var b = "", c = 0; c < this._text.length; c++) { + var d = this._text[c], + e = d.charCodeAt(0); + (this.grabData[e] >= 0 || !a && "\n" === d) && (b = b.concat(d)) + } + return b + }, c.RetroFont.prototype.updateOffset = function(a, b) { + if (this.offsetX !== a || this.offsetY !== b) { + for (var c = a - this.offsetX, d = b - this.offsetY, e = this.game.cache.getFrameData(this.stamp.key).getFrames(), f = e.length; f--;) e[f].x += c, e[f].y += d; + this.buildRetroFontText() + } + }, Object.defineProperty(c.RetroFont.prototype, "text", { + get: function() { + return this._text + }, + set: function(a) { + var b; + b = this.autoUpperCase ? a.toUpperCase() : a, b !== this._text && (this._text = b, this.removeUnsupportedCharacters(this.multiLine), this.buildRetroFontText()) + } + }), Object.defineProperty(c.RetroFont.prototype, "smoothed", { + get: function() { + return this.stamp.smoothed + }, + set: function(a) { + this.stamp.smoothed = a, this.buildRetroFontText() + } + }), c.Rope = function(a, b, d, e, f, g) { + this.points = [], this.points = g, this._hasUpdateAnimation = !1, this._updateAnimationCallback = null, b = b || 0, d = d || 0, e = e || null, f = f || null, this.type = c.ROPE, PIXI.Rope.call(this, c.Cache.DEFAULT, this.points), c.Component.Core.init.call(this, a, b, d, e, f) + }, c.Rope.prototype = Object.create(PIXI.Rope.prototype), c.Rope.prototype.constructor = c.Rope, c.Component.Core.install.call(c.Rope.prototype, ["Angle", "Animation", "AutoCull", "Bounds", "BringToTop", "Crop", "Delta", "Destroy", "FixedToCamera", "InWorld", "LifeSpan", "LoadTexture", "Overlap", "PhysicsBody", "Reset", "ScaleMinMax", "Smoothed"]), c.Rope.prototype.preUpdatePhysics = c.Component.PhysicsBody.preUpdate, c.Rope.prototype.preUpdateLifeSpan = c.Component.LifeSpan.preUpdate, c.Rope.prototype.preUpdateInWorld = c.Component.InWorld.preUpdate, c.Rope.prototype.preUpdateCore = c.Component.Core.preUpdate, c.Rope.prototype.preUpdate = function() { + return !!(this.preUpdatePhysics() && this.preUpdateLifeSpan() && this.preUpdateInWorld()) && this.preUpdateCore() + }, c.Rope.prototype.update = function() { + this._hasUpdateAnimation && this.updateAnimation.call(this) + }, c.Rope.prototype.reset = function(a, b) { + return c.Component.Reset.prototype.reset.call(this, a, b), this + }, Object.defineProperty(c.Rope.prototype, "updateAnimation", { + get: function() { + return this._updateAnimation + }, + set: function(a) { + a && "function" == typeof a ? (this._hasUpdateAnimation = !0, this._updateAnimation = a) : (this._hasUpdateAnimation = !1, this._updateAnimation = null) + } + }), Object.defineProperty(c.Rope.prototype, "segments", { + get: function() { + for (var a, b, d, e, f, g, h, i, j = [], k = 0; k < this.points.length; k++) a = 4 * k, b = this.vertices[a] * this.scale.x, d = this.vertices[a + 1] * this.scale.y, e = this.vertices[a + 4] * this.scale.x, f = this.vertices[a + 3] * this.scale.y, g = c.Math.difference(b, e), h = c.Math.difference(d, f), b += this.world.x, d += this.world.y, i = new c.Rectangle(b, d, g, h), j.push(i); + return j + } + }), c.TileSprite = function(a, b, d, e, f, g, h) { + b = b || 0, d = d || 0, e = e || 256, f = f || 256, g = g || null, h = h || null, this.type = c.TILESPRITE, this.physicsType = c.SPRITE, this._scroll = new c.Point; + var i = a.cache.getImage("__default", !0); + PIXI.TilingSprite.call(this, new PIXI.Texture(i.base), e, f), c.Component.Core.init.call(this, a, b, d, g, h) + }, c.TileSprite.prototype = Object.create(PIXI.TilingSprite.prototype), c.TileSprite.prototype.constructor = c.TileSprite, c.Component.Core.install.call(c.TileSprite.prototype, ["Angle", "Animation", "AutoCull", "Bounds", "BringToTop", "Destroy", "FixedToCamera", "Health", "InCamera", "InputEnabled", "InWorld", "LifeSpan", "LoadTexture", "Overlap", "PhysicsBody", "Reset", "Smoothed"]), c.TileSprite.prototype.preUpdatePhysics = c.Component.PhysicsBody.preUpdate, c.TileSprite.prototype.preUpdateLifeSpan = c.Component.LifeSpan.preUpdate, c.TileSprite.prototype.preUpdateInWorld = c.Component.InWorld.preUpdate, c.TileSprite.prototype.preUpdateCore = c.Component.Core.preUpdate, c.TileSprite.prototype.preUpdate = function() { + return 0 !== this._scroll.x && (this.tilePosition.x += this._scroll.x * this.game.time.physicsElapsed), 0 !== this._scroll.y && (this.tilePosition.y += this._scroll.y * this.game.time.physicsElapsed), !!(this.preUpdatePhysics() && this.preUpdateLifeSpan() && this.preUpdateInWorld()) && this.preUpdateCore() + }, c.TileSprite.prototype.autoScroll = function(a, b) { + this._scroll.set(a, b) + }, c.TileSprite.prototype.stopScroll = function() { + this._scroll.set(0, 0) + }, c.TileSprite.prototype.destroy = function(a) { + c.Component.Destroy.prototype.destroy.call(this, a), PIXI.TilingSprite.prototype.destroy.call(this) + }, c.TileSprite.prototype.reset = function(a, b) { + return c.Component.Reset.prototype.reset.call(this, a, b), this.tilePosition.x = 0, this.tilePosition.y = 0, this + }, c.Device = function() { + this.deviceReadyAt = 0, this.initialized = !1, this.desktop = !1, this.iOS = !1, this.iOSVersion = 0, this.cocoonJS = !1, this.cocoonJSApp = !1, this.cordova = !1, this.node = !1, this.nodeWebkit = !1, this.electron = !1, this.ejecta = !1, this.crosswalk = !1, this.android = !1, this.chromeOS = !1, this.linux = !1, this.macOS = !1, this.windows = !1, this.windowsPhone = !1, this.canvas = !1, this.canvasBitBltShift = null, this.webGL = !1, this.file = !1, this.fileSystem = !1, this.localStorage = !1, this.worker = !1, this.css3D = !1, this.pointerLock = !1, this.typedArray = !1, this.vibration = !1, this.getUserMedia = !0, this.quirksMode = !1, this.touch = !1, this.mspointer = !1, this.wheelEvent = null, this.arora = !1, this.chrome = !1, this.chromeVersion = 0, this.epiphany = !1, this.firefox = !1, this.firefoxVersion = 0, this.ie = !1, this.ieVersion = 0, this.trident = !1, this.tridentVersion = 0, this.edge = !1, this.mobileSafari = !1, this.midori = !1, this.opera = !1, this.safari = !1, this.safariVersion = 0, this.webApp = !1, this.silk = !1, this.audioData = !1, this.webAudio = !1, this.ogg = !1, this.opus = !1, this.mp3 = !1, this.wav = !1, this.m4a = !1, this.webm = !1, this.dolby = !1, this.oggVideo = !1, this.h264Video = !1, this.mp4Video = !1, this.webmVideo = !1, this.vp9Video = !1, this.hlsVideo = !1, this.iPhone = !1, this.iPhone4 = !1, this.iPad = !1, this.pixelRatio = 0, this.littleEndian = !1, this.LITTLE_ENDIAN = !1, this.support32bit = !1, this.fullscreen = !1, this.requestFullscreen = "", this.cancelFullscreen = "", this.fullscreenKeyboard = !1 + }, c.Device = new c.Device, c.Device.onInitialized = new c.Signal, c.Device.whenReady = function(a, b, c) { + var d = this._readyCheck; + if (this.deviceReadyAt || !d) a.call(b, this); + else if (d._monitor || c) d._queue = d._queue || [], d._queue.push([a, b]); + else { + d._monitor = d.bind(this), d._queue = d._queue || [], d._queue.push([a, b]); + var e = "undefined" != typeof window.cordova, + f = navigator.isCocoonJS; + "complete" === document.readyState || "interactive" === document.readyState ? window.setTimeout(d._monitor, 0) : e && !f ? document.addEventListener("deviceready", d._monitor, !1) : (document.addEventListener("DOMContentLoaded", d._monitor, !1), window.addEventListener("load", d._monitor, !1)) + } + }, c.Device._readyCheck = function() { + var a = this._readyCheck; + if (document.body) { + if (!this.deviceReadyAt) { + this.deviceReadyAt = Date.now(), document.removeEventListener("deviceready", a._monitor), document.removeEventListener("DOMContentLoaded", a._monitor), window.removeEventListener("load", a._monitor), this._initialize(), this.initialized = !0, this.onInitialized.dispatch(this); + for (var b; b = a._queue.shift();) { + var c = b[0], + d = b[1]; + c.call(d, this) + } + this._readyCheck = null, this._initialize = null, this.onInitialized = null + } + } else window.setTimeout(a._monitor, 20) + }, c.Device._initialize = function() { + function a() { + var a = navigator.userAgent; + /Playstation Vita/.test(a) ? l.vita = !0 : /Kindle/.test(a) || /\bKF[A-Z][A-Z]+/.test(a) || /Silk.*Mobile Safari/.test(a) ? l.kindle = !0 : /Android/.test(a) ? l.android = !0 : /CrOS/.test(a) ? l.chromeOS = !0 : /iP[ao]d|iPhone/i.test(a) ? (l.iOS = !0, navigator.appVersion.match(/OS (\d+)/), l.iOSVersion = parseInt(RegExp.$1, 10)) : /Linux/.test(a) ? l.linux = !0 : /Mac OS/.test(a) ? l.macOS = !0 : /Windows/.test(a) && (l.windows = !0), (/Windows Phone/i.test(a) || /IEMobile/i.test(a)) && (l.android = !1, l.iOS = !1, l.macOS = !1, l.windows = !0, l.windowsPhone = !0); + var b = /Silk/.test(a); + (l.windows || l.macOS || l.linux && !b || l.chromeOS) && (l.desktop = !0), (l.windowsPhone || /Windows NT/i.test(a) && /Touch/i.test(a)) && (l.desktop = !1); + } + + function b() { + l.canvas = !!window.CanvasRenderingContext2D || l.cocoonJS; + try { + l.localStorage = !!localStorage.getItem + } catch (a) { + l.localStorage = !1 + } + l.file = !!(window.File && window.FileReader && window.FileList && window.Blob), l.fileSystem = !!window.requestFileSystem, l.webGL = function() { + try { + var a = document.createElement("canvas"); + return a.screencanvas = !1, !!window.WebGLRenderingContext && (a.getContext("webgl") || a.getContext("experimental-webgl")) + } catch (a) { + return !1 + } + }(), l.webGL = !!l.webGL, l.worker = !!window.Worker, l.pointerLock = "pointerLockElement" in document || "mozPointerLockElement" in document || "webkitPointerLockElement" in document, l.quirksMode = "CSS1Compat" !== document.compatMode, navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia, window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL, l.getUserMedia = l.getUserMedia && !!navigator.getUserMedia && !!window.URL, l.firefox && l.firefoxVersion < 21 && (l.getUserMedia = !1), !l.iOS && (l.ie || l.firefox || l.chrome) && (l.canvasBitBltShift = !0), (l.safari || l.mobileSafari) && (l.canvasBitBltShift = !1) + } + + function c() { + ("ontouchstart" in document.documentElement || window.navigator.maxTouchPoints && window.navigator.maxTouchPoints >= 1) && (l.touch = !0), (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && (l.mspointer = !0), l.cocoonJS || ("onwheel" in window || l.ie && "WheelEvent" in window ? l.wheelEvent = "wheel" : "onmousewheel" in window ? l.wheelEvent = "mousewheel" : l.firefox && "MouseScrollEvent" in window && (l.wheelEvent = "DOMMouseScroll")) + } + + function d() { + for (var a = ["requestFullscreen", "requestFullScreen", "webkitRequestFullscreen", "webkitRequestFullScreen", "msRequestFullscreen", "msRequestFullScreen", "mozRequestFullScreen", "mozRequestFullscreen"], b = document.createElement("div"), c = 0; c < a.length; c++) + if (b[a[c]]) { + l.fullscreen = !0, l.requestFullscreen = a[c]; + break + } var d = ["cancelFullScreen", "exitFullscreen", "webkitCancelFullScreen", "webkitExitFullscreen", "msCancelFullScreen", "msExitFullscreen", "mozCancelFullScreen", "mozExitFullscreen"]; + if (l.fullscreen) + for (var c = 0; c < d.length; c++) + if (document[d[c]]) { + l.cancelFullscreen = d[c]; + break + } window.Element && Element.ALLOW_KEYBOARD_INPUT && (l.fullscreenKeyboard = !0) + } + + function e() { + var a = navigator.userAgent; + if (/Arora/.test(a) ? l.arora = !0 : /Edge\/\d+/.test(a) ? l.edge = !0 : /Chrome\/(\d+)/.test(a) && !l.windowsPhone ? (l.chrome = !0, l.chromeVersion = parseInt(RegExp.$1, 10)) : /Epiphany/.test(a) ? l.epiphany = !0 : /Firefox\D+(\d+)/.test(a) ? (l.firefox = !0, l.firefoxVersion = parseInt(RegExp.$1, 10)) : /AppleWebKit/.test(a) && l.iOS ? l.mobileSafari = !0 : /MSIE (\d+\.\d+);/.test(a) ? (l.ie = !0, l.ieVersion = parseInt(RegExp.$1, 10)) : /Midori/.test(a) ? l.midori = !0 : /Opera/.test(a) ? l.opera = !0 : /Safari\/(\d+)/.test(a) && !l.windowsPhone ? (l.safari = !0, /Version\/(\d+)\./.test(a) && (l.safariVersion = parseInt(RegExp.$1, 10))) : /Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a) && (l.ie = !0, l.trident = !0, l.tridentVersion = parseInt(RegExp.$1, 10), l.ieVersion = parseInt(RegExp.$3, 10)), /Silk/.test(a) && (l.silk = !0), navigator.standalone && (l.webApp = !0), "undefined" != typeof window.cordova && (l.cordova = !0), "undefined" != typeof process && "undefined" != typeof require && (l.node = !0), l.node && "object" == typeof process.versions && (l.nodeWebkit = !!process.versions["node-webkit"], l.electron = !!process.versions.electron), navigator.isCocoonJS && (l.cocoonJS = !0), l.cocoonJS) try { + l.cocoonJSApp = "undefined" != typeof CocoonJS + } catch (a) { + l.cocoonJSApp = !1 + } + "undefined" != typeof window.ejecta && (l.ejecta = !0), /Crosswalk/.test(a) && (l.crosswalk = !0) + } + + function f() { + var a = document.createElement("video"), + b = !1; + try { + (b = !!a.canPlayType) && (a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, "") && (l.oggVideo = !0), a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, "") && (l.h264Video = !0, l.mp4Video = !0), a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "") && (l.webmVideo = !0), a.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, "") && (l.vp9Video = !0), a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, "") && (l.hlsVideo = !0)) + } catch (a) {} + } + + function g() { + l.audioData = !!window.Audio, l.webAudio = !(!window.AudioContext && !window.webkitAudioContext); + var a = document.createElement("audio"), + b = !1; + try { + if ((b = !!a.canPlayType) && (a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, "") && (l.ogg = !0), (a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, "") || a.canPlayType("audio/opus;").replace(/^no$/, "")) && (l.opus = !0), a.canPlayType("audio/mpeg;").replace(/^no$/, "") && (l.mp3 = !0), a.canPlayType('audio/wav; codecs="1"').replace(/^no$/, "") && (l.wav = !0), (a.canPlayType("audio/x-m4a;") || a.canPlayType("audio/aac;").replace(/^no$/, "")) && (l.m4a = !0), a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "") && (l.webm = !0), "" !== a.canPlayType('audio/mp4;codecs="ec-3"'))) + if (l.edge) l.dolby = !0; + else if (l.safari && l.safariVersion >= 9 && /Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)) { + var c = parseInt(RegExp.$1, 10), + d = parseInt(RegExp.$2, 10); + (10 === c && d >= 11 || c > 10) && (l.dolby = !0) + } + } catch (a) {} + } + + function h() { + var a = new ArrayBuffer(4), + b = new Uint8Array(a), + c = new Uint32Array(a); + return b[0] = 161, b[1] = 178, b[2] = 195, b[3] = 212, 3569595041 === c[0] || 2712847316 !== c[0] && null + } + + function i() { + if (void 0 === Uint8ClampedArray) return !1; + var a = PIXI.CanvasPool.create(this, 1, 1), + b = a.getContext("2d"); + if (!b) return !1; + var c = b.createImageData(1, 1); + return PIXI.CanvasPool.remove(this), c.data instanceof Uint8ClampedArray + } + + function j() { + l.pixelRatio = window.devicePixelRatio || 1, l.iPhone = navigator.userAgent.toLowerCase().indexOf("iphone") !== -1, l.iPhone4 = 2 === l.pixelRatio && l.iPhone, l.iPad = navigator.userAgent.toLowerCase().indexOf("ipad") !== -1, "undefined" != typeof Int8Array ? l.typedArray = !0 : l.typedArray = !1, "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array && "undefined" != typeof Uint32Array && (l.littleEndian = h(), l.LITTLE_ENDIAN = l.littleEndian), l.support32bit = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8ClampedArray && "undefined" != typeof Int32Array && null !== l.littleEndian && i(), navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate, navigator.vibrate && (l.vibration = !0) + } + + function k() { + var a, b = document.createElement("p"), + c = { + webkitTransform: "-webkit-transform", + OTransform: "-o-transform", + msTransform: "-ms-transform", + MozTransform: "-moz-transform", + transform: "transform" + }; + document.body.insertBefore(b, null); + for (var d in c) void 0 !== b.style[d] && (b.style[d] = "translate3d(1px,1px,1px)", a = window.getComputedStyle(b).getPropertyValue(c[d])); + document.body.removeChild(b), l.css3D = void 0 !== a && a.length > 0 && "none" !== a + } + var l = this; + a(), e(), g(), f(), k(), j(), b(), d(), c() + }, c.Device.canPlayAudio = function(a) { + return !("mp3" !== a || !this.mp3) || (!("ogg" !== a || !this.ogg && !this.opus) || (!("m4a" !== a || !this.m4a) || (!("opus" !== a || !this.opus) || (!("wav" !== a || !this.wav) || (!("webm" !== a || !this.webm) || !("mp4" !== a || !this.dolby)))))) + }, c.Device.canPlayVideo = function(a) { + return !("webm" !== a || !this.webmVideo && !this.vp9Video) || (!("mp4" !== a || !this.mp4Video && !this.h264Video) || (!("ogg" !== a && "ogv" !== a || !this.oggVideo) || !("mpeg" !== a || !this.hlsVideo))) + }, c.Device.isConsoleOpen = function() { + return !(!window.console || !window.console.firebug) || !(!window.console || (console.profile(), console.profileEnd(), console.clear && console.clear(), !console.profiles)) && console.profiles.length > 0 + }, c.Device.isAndroidStockBrowser = function() { + var a = window.navigator.userAgent.match(/Android.*AppleWebKit\/([\d.]+)/); + return a && a[1] < 537 + }, c.Canvas = { + create: function(a, b, c, d, e) { + b = b || 256, c = c || 256; + var f = e ? document.createElement("canvas") : PIXI.CanvasPool.create(a, b, c); + return "string" == typeof d && "" !== d && (f.id = d), f.width = b, f.height = c, f.style.display = "block", f + }, + setBackgroundColor: function(a, b) { + return b = b || "rgb(0,0,0)", a.style.backgroundColor = b, a + }, + setTouchAction: function(a, b) { + return b = b || "none", a.style.msTouchAction = b, a.style["ms-touch-action"] = b, a.style["touch-action"] = b, a + }, + setUserSelect: function(a, b) { + return b = b || "none", a.style["-webkit-touch-callout"] = b, a.style["-webkit-user-select"] = b, a.style["-khtml-user-select"] = b, a.style["-moz-user-select"] = b, a.style["-ms-user-select"] = b, a.style["user-select"] = b, a.style["-webkit-tap-highlight-color"] = "rgba(0, 0, 0, 0)", a + }, + addToDOM: function(a, b, c) { + var d; + return void 0 === c && (c = !0), b && ("string" == typeof b ? d = document.getElementById(b) : "object" == typeof b && 1 === b.nodeType && (d = b)), d || (d = document.body), c && d.style && (d.style.overflow = "hidden"), d.appendChild(a), a + }, + removeFromDOM: function(a) { + a.parentNode && a.parentNode.removeChild(a) + }, + setTransform: function(a, b, c, d, e, f, g) { + return a.setTransform(d, f, g, e, b, c), a + }, + setSmoothingEnabled: function(a, b) { + var d = c.Canvas.getSmoothingPrefix(a); + return d && (a[d] = b), a + }, + getSmoothingPrefix: function(a) { + var b = ["i", "webkitI", "msI", "mozI", "oI"]; + for (var c in b) { + var d = b[c] + "mageSmoothingEnabled"; + if (d in a) return d + } + return null + }, + getSmoothingEnabled: function(a) { + var b = c.Canvas.getSmoothingPrefix(a); + if (b) return a[b] + }, + setImageRenderingCrisp: function(a) { + for (var b = ["optimizeSpeed", "crisp-edges", "-moz-crisp-edges", "-webkit-optimize-contrast", "optimize-contrast", "pixelated"], c = 0; c < b.length; c++) a.style["image-rendering"] = b[c]; + return a.style.msInterpolationMode = "nearest-neighbor", a + }, + setImageRenderingBicubic: function(a) { + return a.style["image-rendering"] = "auto", a.style.msInterpolationMode = "bicubic", a + } + }, c.RequestAnimationFrame = function(a, b) { + void 0 === b && (b = !1), this.game = a, this.isRunning = !1, this.forceSetTimeOut = b; + for (var c = ["ms", "moz", "webkit", "o"], d = 0; d < c.length && !window.requestAnimationFrame; d++) window.requestAnimationFrame = window[c[d] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[c[d] + "CancelAnimationFrame"]; + this._isSetTimeOut = !1, this._onLoop = null, this._timeOutID = null + }, c.RequestAnimationFrame.prototype = { + start: function() { + this.isRunning = !0; + var a = this; + !window.requestAnimationFrame || this.forceSetTimeOut ? (this._isSetTimeOut = !0, this._onLoop = function() { + return a.updateSetTimeout() + }, this._timeOutID = window.setTimeout(this._onLoop, 0)) : (this._isSetTimeOut = !1, this._onLoop = function(b) { + return a.updateRAF(b) + }, this._timeOutID = window.requestAnimationFrame(this._onLoop)) + }, + updateRAF: function(a) { + this.isRunning && (this.game.update(Math.floor(a)), this._timeOutID = window.requestAnimationFrame(this._onLoop)) + }, + updateSetTimeout: function() { + this.isRunning && (this.game.update(Date.now()), this._timeOutID = window.setTimeout(this._onLoop, this.game.time.timeToCall)) + }, + stop: function() { + this._isSetTimeOut ? clearTimeout(this._timeOutID) : window.cancelAnimationFrame(this._timeOutID), this.isRunning = !1 + }, + isSetTimeOut: function() { + return this._isSetTimeOut + }, + isRAF: function() { + return this._isSetTimeOut === !1 + } + }, c.RequestAnimationFrame.prototype.constructor = c.RequestAnimationFrame, c.Math = { + PI2: 2 * Math.PI, + between: function(a, b) { + return Math.floor(Math.random() * (b - a + 1) + a) + }, + fuzzyEqual: function(a, b, c) { + return void 0 === c && (c = 1e-4), Math.abs(a - b) < c + }, + fuzzyLessThan: function(a, b, c) { + return void 0 === c && (c = 1e-4), a < b + c + }, + fuzzyGreaterThan: function(a, b, c) { + return void 0 === c && (c = 1e-4), a > b - c + }, + fuzzyCeil: function(a, b) { + return void 0 === b && (b = 1e-4), Math.ceil(a - b) + }, + fuzzyFloor: function(a, b) { + return void 0 === b && (b = 1e-4), Math.floor(a + b) + }, + average: function() { + for (var a = 0, b = arguments.length, c = 0; c < b; c++) a += +arguments[c]; + return a / b + }, + shear: function(a) { + return a % 1 + }, + snapTo: function(a, b, c) { + return void 0 === c && (c = 0), 0 === b ? a : (a -= c, a = b * Math.round(a / b), c + a) + }, + snapToFloor: function(a, b, c) { + return void 0 === c && (c = 0), 0 === b ? a : (a -= c, a = b * Math.floor(a / b), c + a) + }, + snapToCeil: function(a, b, c) { + return void 0 === c && (c = 0), 0 === b ? a : (a -= c, a = b * Math.ceil(a / b), c + a) + }, + roundTo: function(a, b, c) { + void 0 === b && (b = 0), void 0 === c && (c = 10); + var d = Math.pow(c, -b); + return Math.round(a * d) / d + }, + floorTo: function(a, b, c) { + void 0 === b && (b = 0), void 0 === c && (c = 10); + var d = Math.pow(c, -b); + return Math.floor(a * d) / d + }, + ceilTo: function(a, b, c) { + void 0 === b && (b = 0), void 0 === c && (c = 10); + var d = Math.pow(c, -b); + return Math.ceil(a * d) / d + }, + rotateToAngle: function(a, b, d) { + return void 0 === d && (d = .05), a === b ? a : (Math.abs(b - a) <= d || Math.abs(b - a) >= c.Math.PI2 - d ? a = b : (Math.abs(b - a) > Math.PI && (b < a ? b += c.Math.PI2 : b -= c.Math.PI2), b > a ? a += d : b < a && (a -= d)), a) + }, + getShortestAngle: function(a, b) { + var c = b - a; + if (0 === c) return 0; + var d = Math.floor((c - -180) / 360); + return c - 360 * d + }, + angleBetween: function(a, b, c, d) { + return Math.atan2(d - b, c - a) + }, + angleBetweenY: function(a, b, c, d) { + return Math.atan2(c - a, d - b) + }, + angleBetweenPoints: function(a, b) { + return Math.atan2(b.y - a.y, b.x - a.x) + }, + angleBetweenPointsY: function(a, b) { + return Math.atan2(b.x - a.x, b.y - a.y) + }, + reverseAngle: function(a) { + return this.normalizeAngle(a + Math.PI, !0) + }, + normalizeAngle: function(a) { + return a %= 2 * Math.PI, a >= 0 ? a : a + 2 * Math.PI + }, + maxAdd: function(a, b, c) { + return Math.min(a + b, c) + }, + minSub: function(a, b, c) { + return Math.max(a - b, c) + }, + wrap: function(a, b, c) { + var d = c - b; + if (d <= 0) return 0; + var e = (a - b) % d; + return e < 0 && (e += d), e + b + }, + wrapValue: function(a, b, c) { + var d; + return a = Math.abs(a), b = Math.abs(b), c = Math.abs(c), d = (a + b) % c + }, + isOdd: function(a) { + return !!(1 & a) + }, + isEven: function(a) { + return !(1 & a) + }, + min: function() { + if (1 === arguments.length && "object" == typeof arguments[0]) var a = arguments[0]; + else var a = arguments; + for (var b = 1, c = 0, d = a.length; b < d; b++) a[b] < a[c] && (c = b); + return a[c] + }, + max: function() { + if (1 === arguments.length && "object" == typeof arguments[0]) var a = arguments[0]; + else var a = arguments; + for (var b = 1, c = 0, d = a.length; b < d; b++) a[b] > a[c] && (c = b); + return a[c] + }, + minProperty: function(a) { + if (2 === arguments.length && "object" == typeof arguments[1]) var b = arguments[1]; + else var b = arguments.slice(1); + for (var c = 1, d = 0, e = b.length; c < e; c++) b[c][a] < b[d][a] && (d = c); + return b[d][a] + }, + maxProperty: function(a) { + if (2 === arguments.length && "object" == typeof arguments[1]) var b = arguments[1]; + else var b = arguments.slice(1); + for (var c = 1, d = 0, e = b.length; c < e; c++) b[c][a] > b[d][a] && (d = c); + return b[d][a] + }, + wrapAngle: function(a, b) { + return b ? this.wrap(a, -Math.PI, Math.PI) : this.wrap(a, -180, 180) + }, + linearInterpolation: function(a, b) { + var c = a.length - 1, + d = c * b, + e = Math.floor(d); + return b < 0 ? this.linear(a[0], a[1], d) : b > 1 ? this.linear(a[c], a[c - 1], c - d) : this.linear(a[e], a[e + 1 > c ? c : e + 1], d - e) + }, + bezierInterpolation: function(a, b) { + for (var c = 0, d = a.length - 1, e = 0; e <= d; e++) c += Math.pow(1 - b, d - e) * Math.pow(b, e) * a[e] * this.bernstein(d, e); + return c + }, + catmullRomInterpolation: function(a, b) { + var c = a.length - 1, + d = c * b, + e = Math.floor(d); + return a[0] === a[c] ? (b < 0 && (e = Math.floor(d = c * (1 + b))), this.catmullRom(a[(e - 1 + c) % c], a[e], a[(e + 1) % c], a[(e + 2) % c], d - e)) : b < 0 ? a[0] - (this.catmullRom(a[0], a[0], a[1], a[1], -d) - a[0]) : b > 1 ? a[c] - (this.catmullRom(a[c], a[c], a[c - 1], a[c - 1], d - c) - a[c]) : this.catmullRom(a[e ? e - 1 : 0], a[e], a[c < e + 1 ? c : e + 1], a[c < e + 2 ? c : e + 2], d - e) + }, + linear: function(a, b, c) { + return (b - a) * c + a + }, + bernstein: function(a, b) { + return this.factorial(a) / this.factorial(b) / this.factorial(a - b) + }, + factorial: function(a) { + if (0 === a) return 1; + for (var b = a; --a;) b *= a; + return b + }, + catmullRom: function(a, b, c, d, e) { + var f = .5 * (c - a), + g = .5 * (d - b), + h = e * e, + i = e * h; + return (2 * b - 2 * c + f + g) * i + (-3 * b + 3 * c - 2 * f - g) * h + f * e + b + }, + difference: function(a, b) { + return Math.abs(a - b) + }, + roundAwayFromZero: function(a) { + return a > 0 ? Math.ceil(a) : Math.floor(a) + }, + sinCosGenerator: function(a, b, c, d) { + void 0 === b && (b = 1), void 0 === c && (c = 1), void 0 === d && (d = 1); + for (var e = b, f = c, g = d * Math.PI / a, h = [], i = [], j = 0; j < a; j++) f -= e * g, e += f * g, h[j] = f, i[j] = e; + return { + sin: i, + cos: h, + length: a + } + }, + distance: function(a, b, c, d) { + var e = a - c, + f = b - d; + return Math.sqrt(e * e + f * f) + }, + distanceSq: function(a, b, c, d) { + var e = a - c, + f = b - d; + return e * e + f * f + }, + distancePow: function(a, b, c, d, e) { + return void 0 === e && (e = 2), Math.sqrt(Math.pow(c - a, e) + Math.pow(d - b, e)) + }, + clamp: function(a, b, c) { + return a < b ? b : c < a ? c : a + }, + clampBottom: function(a, b) { + return a < b ? b : a + }, + within: function(a, b, c) { + return Math.abs(a - b) <= c + }, + mapLinear: function(a, b, c, d, e) { + return d + (a - b) * (e - d) / (c - b) + }, + smoothstep: function(a, b, c) { + return a = Math.max(0, Math.min(1, (a - b) / (c - b))), a * a * (3 - 2 * a) + }, + smootherstep: function(a, b, c) { + return a = Math.max(0, Math.min(1, (a - b) / (c - b))), a * a * a * (a * (6 * a - 15) + 10) + }, + sign: function(a) { + return a < 0 ? -1 : a > 0 ? 1 : 0 + }, + percent: function(a, b, c) { + return void 0 === c && (c = 0), a > b || c > b ? 1 : a < c || c > a ? 0 : (a - c) / b + } + }; + var k = Math.PI / 180, + l = 180 / Math.PI; + return c.Math.degToRad = function(a) { + return a * k + }, c.Math.radToDeg = function(a) { + return a * l + }, c.RandomDataGenerator = function(a) { + void 0 === a && (a = []), this.c = 1, this.s0 = 0, this.s1 = 0, this.s2 = 0, "string" == typeof a ? this.state(a) : this.sow(a) + }, c.RandomDataGenerator.prototype = { + rnd: function() { + var a = 2091639 * this.s0 + 2.3283064365386963e-10 * this.c; + return this.c = 0 | a, this.s0 = this.s1, this.s1 = this.s2, this.s2 = a - this.c, this.s2 + }, + sow: function(a) { + if (this.s0 = this.hash(" "), this.s1 = this.hash(this.s0), this.s2 = this.hash(this.s1), this.c = 1, a) + for (var b = 0; b < a.length && null != a[b]; b++) { + var c = a[b]; + this.s0 -= this.hash(c), this.s0 += ~~(this.s0 < 0), this.s1 -= this.hash(c), this.s1 += ~~(this.s1 < 0), this.s2 -= this.hash(c), this.s2 += ~~(this.s2 < 0) + } + }, + hash: function(a) { + var b, c, d; + for (d = 4022871197, a = a.toString(), c = 0; c < a.length; c++) d += a.charCodeAt(c), b = .02519603282416938 * d, d = b >>> 0, b -= d, b *= d, d = b >>> 0, b -= d, d += 4294967296 * b; + return 2.3283064365386963e-10 * (d >>> 0) + }, + integer: function() { + return 4294967296 * this.rnd.apply(this) + }, + frac: function() { + return this.rnd.apply(this) + 1.1102230246251565e-16 * (2097152 * this.rnd.apply(this) | 0) + }, + real: function() { + return this.integer() + this.frac() + }, + integerInRange: function(a, b) { + return Math.floor(this.realInRange(0, b - a + 1) + a) + }, + between: function(a, b) { + return this.integerInRange(a, b) + }, + realInRange: function(a, b) { + return this.frac() * (b - a) + a + }, + normal: function() { + return 1 - 2 * this.frac() + }, + uuid: function() { + var a = "", + b = ""; + for (b = a = ""; a++ < 36; b += ~a % 5 | 3 * a & 4 ? (15 ^ a ? 8 ^ this.frac() * (20 ^ a ? 16 : 4) : 4).toString(16) : "-"); + return b + }, + pick: function(a) { + return a[this.integerInRange(0, a.length - 1)] + }, + sign: function() { + return this.pick([-1, 1]) + }, + weightedPick: function(a) { + return a[~~(Math.pow(this.frac(), 2) * (a.length - 1) + .5)] + }, + timestamp: function(a, b) { + return this.realInRange(a || 9466848e5, b || 1577862e6) + }, + angle: function() { + return this.integerInRange(-180, 180) + }, + state: function(a) { + return "string" == typeof a && a.match(/^!rnd/) && (a = a.split(","), this.c = parseFloat(a[1]), this.s0 = parseFloat(a[2]), this.s1 = parseFloat(a[3]), this.s2 = parseFloat(a[4])), ["!rnd", this.c, this.s0, this.s1, this.s2].join(",") + } + }, c.RandomDataGenerator.prototype.constructor = c.RandomDataGenerator, c.QuadTree = function(a, b, c, d, e, f, g) { + this.maxObjects = 10, this.maxLevels = 4, this.level = 0, this.bounds = {}, this.objects = [], this.nodes = [], this._empty = [], this.reset(a, b, c, d, e, f, g) + }, c.QuadTree.prototype = { + reset: function(a, b, c, d, e, f, g) { + this.maxObjects = e || 10, this.maxLevels = f || 4, this.level = g || 0, this.bounds = { + x: Math.round(a), + y: Math.round(b), + width: c, + height: d, + subWidth: Math.floor(c / 2), + subHeight: Math.floor(d / 2), + right: Math.round(a) + Math.floor(c / 2), + bottom: Math.round(b) + Math.floor(d / 2) + }, this.objects.length = 0, this.nodes.length = 0 + }, + populate: function(a) { + a.forEach(this.populateHandler, this, !0) + }, + populateHandler: function(a) { + a.body && a.exists && this.insert(a.body) + }, + split: function() { + this.nodes[0] = new c.QuadTree(this.bounds.right, this.bounds.y, this.bounds.subWidth, this.bounds.subHeight, this.maxObjects, this.maxLevels, this.level + 1), this.nodes[1] = new c.QuadTree(this.bounds.x, this.bounds.y, this.bounds.subWidth, this.bounds.subHeight, this.maxObjects, this.maxLevels, this.level + 1), this.nodes[2] = new c.QuadTree(this.bounds.x, this.bounds.bottom, this.bounds.subWidth, this.bounds.subHeight, this.maxObjects, this.maxLevels, this.level + 1), this.nodes[3] = new c.QuadTree(this.bounds.right, this.bounds.bottom, this.bounds.subWidth, this.bounds.subHeight, this.maxObjects, this.maxLevels, this.level + 1) + }, + insert: function(a) { + var b, c = 0; + if (null != this.nodes[0] && (b = this.getIndex(a), b !== -1)) return void this.nodes[b].insert(a); + if (this.objects.push(a), this.objects.length > this.maxObjects && this.level < this.maxLevels) + for (null == this.nodes[0] && this.split(); c < this.objects.length;) b = this.getIndex(this.objects[c]), b !== -1 ? this.nodes[b].insert(this.objects.splice(c, 1)[0]) : c++ + }, + getIndex: function(a) { + var b = -1; + return a.x < this.bounds.right && a.right < this.bounds.right ? a.y < this.bounds.bottom && a.bottom < this.bounds.bottom ? b = 1 : a.y > this.bounds.bottom && (b = 2) : a.x > this.bounds.right && (a.y < this.bounds.bottom && a.bottom < this.bounds.bottom ? b = 0 : a.y > this.bounds.bottom && (b = 3)), b + }, + retrieve: function(a) { + if (a instanceof c.Rectangle) var b = this.objects, + d = this.getIndex(a); + else { + if (!a.body) return this._empty; + var b = this.objects, + d = this.getIndex(a.body) + } + return this.nodes[0] && (d !== -1 ? b = b.concat(this.nodes[d].retrieve(a)) : (b = b.concat(this.nodes[0].retrieve(a)), b = b.concat(this.nodes[1].retrieve(a)), b = b.concat(this.nodes[2].retrieve(a)), b = b.concat(this.nodes[3].retrieve(a)))), b + }, + clear: function() { + this.objects.length = 0; + for (var a = this.nodes.length; a--;) this.nodes[a].clear(), this.nodes.splice(a, 1); + this.nodes.length = 0 + } + }, c.QuadTree.prototype.constructor = c.QuadTree, c.Net = function(a) { + this.game = a + }, c.Net.prototype = { + getHostName: function() { + return window.location && window.location.hostname ? window.location.hostname : null + }, + checkDomainName: function(a) { + return window.location.hostname.indexOf(a) !== -1 + }, + updateQueryString: function(a, b, c, d) { + void 0 === c && (c = !1), void 0 !== d && "" !== d || (d = window.location.href); + var e = "", + f = new RegExp("([?|&])" + a + "=.*?(&|#|$)(.*)", "gi"); + if (f.test(d)) e = "undefined" != typeof b && null !== b ? d.replace(f, "$1" + a + "=" + b + "$2$3") : d.replace(f, "$1$3").replace(/(&|\?)$/, ""); + else if ("undefined" != typeof b && null !== b) { + var g = d.indexOf("?") !== -1 ? "&" : "?", + h = d.split("#"); + d = h[0] + g + a + "=" + b, h[1] && (d += "#" + h[1]), e = d + } else e = d; + return c ? void(window.location.href = e) : e + }, + getQueryString: function(a) { + void 0 === a && (a = ""); + var b = {}, + c = location.search.substring(1).split("&"); + for (var d in c) { + var e = c[d].split("="); + if (e.length > 1) { + if (a && a === this.decodeURI(e[0])) return this.decodeURI(e[1]); + b[this.decodeURI(e[0])] = this.decodeURI(e[1]) + } + } + return b + }, + decodeURI: function(a) { + return decodeURIComponent(a.replace(/\+/g, " ")) + } + }, c.Net.prototype.constructor = c.Net, c.TweenManager = function(a) { + this.game = a, this.frameBased = !1, this._tweens = [], this._add = [], this.easeMap = { + Power0: c.Easing.Power0, + Power1: c.Easing.Power1, + Power2: c.Easing.Power2, + Power3: c.Easing.Power3, + Power4: c.Easing.Power4, + Linear: c.Easing.Linear.None, + Quad: c.Easing.Quadratic.Out, + Cubic: c.Easing.Cubic.Out, + Quart: c.Easing.Quartic.Out, + Quint: c.Easing.Quintic.Out, + Sine: c.Easing.Sinusoidal.Out, + Expo: c.Easing.Exponential.Out, + Circ: c.Easing.Circular.Out, + Elastic: c.Easing.Elastic.Out, + Back: c.Easing.Back.Out, + Bounce: c.Easing.Bounce.Out, + "Quad.easeIn": c.Easing.Quadratic.In, + "Cubic.easeIn": c.Easing.Cubic.In, + "Quart.easeIn": c.Easing.Quartic.In, + "Quint.easeIn": c.Easing.Quintic.In, + "Sine.easeIn": c.Easing.Sinusoidal.In, + "Expo.easeIn": c.Easing.Exponential.In, + "Circ.easeIn": c.Easing.Circular.In, + "Elastic.easeIn": c.Easing.Elastic.In, + "Back.easeIn": c.Easing.Back.In, + "Bounce.easeIn": c.Easing.Bounce.In, + "Quad.easeOut": c.Easing.Quadratic.Out, + "Cubic.easeOut": c.Easing.Cubic.Out, + "Quart.easeOut": c.Easing.Quartic.Out, + "Quint.easeOut": c.Easing.Quintic.Out, + "Sine.easeOut": c.Easing.Sinusoidal.Out, + "Expo.easeOut": c.Easing.Exponential.Out, + "Circ.easeOut": c.Easing.Circular.Out, + "Elastic.easeOut": c.Easing.Elastic.Out, + "Back.easeOut": c.Easing.Back.Out, + "Bounce.easeOut": c.Easing.Bounce.Out, + "Quad.easeInOut": c.Easing.Quadratic.InOut, + "Cubic.easeInOut": c.Easing.Cubic.InOut, + "Quart.easeInOut": c.Easing.Quartic.InOut, + "Quint.easeInOut": c.Easing.Quintic.InOut, + "Sine.easeInOut": c.Easing.Sinusoidal.InOut, + "Expo.easeInOut": c.Easing.Exponential.InOut, + "Circ.easeInOut": c.Easing.Circular.InOut, + "Elastic.easeInOut": c.Easing.Elastic.InOut, + "Back.easeInOut": c.Easing.Back.InOut, + "Bounce.easeInOut": c.Easing.Bounce.InOut + }, this.game.onPause.add(this._pauseAll, this), this.game.onResume.add(this._resumeAll, this) + }, c.TweenManager.prototype = { + getAll: function() { + return this._tweens + }, + removeAll: function() { + for (var a = 0; a < this._tweens.length; a++) this._tweens[a].pendingDelete = !0; + this._add = [] + }, + removeFrom: function(a, b) { + void 0 === b && (b = !0); + var d, e; + if (Array.isArray(a)) + for (d = 0, e = a.length; d < e; d++) this.removeFrom(a[d]); + else if (a.type === c.GROUP && b) + for (var d = 0, e = a.children.length; d < e; d++) this.removeFrom(a.children[d]); + else { + for (d = 0, e = this._tweens.length; d < e; d++) a === this._tweens[d].target && this.remove(this._tweens[d]); + for (d = 0, e = this._add.length; d < e; d++) a === this._add[d].target && this.remove(this._add[d]) + } + }, + add: function(a) { + a._manager = this, this._add.push(a) + }, + create: function(a) { + return new c.Tween(a, this.game, this) + }, + remove: function(a) { + var b = this._tweens.indexOf(a); + b !== -1 ? this._tweens[b].pendingDelete = !0 : (b = this._add.indexOf(a), b !== -1 && (this._add[b].pendingDelete = !0)) + }, + update: function() { + var a = this._add.length, + b = this._tweens.length; + if (0 === b && 0 === a) return !1; + for (var c = 0; c < b;) this._tweens[c].update(this.game.time.time) ? c++ : (this._tweens.splice(c, 1), b--); + return a > 0 && (this._tweens = this._tweens.concat(this._add), this._add.length = 0), !0 + }, + isTweening: function(a) { + return this._tweens.some(function(b) { + return b.target === a + }) + }, + _pauseAll: function() { + for (var a = this._tweens.length - 1; a >= 0; a--) this._tweens[a]._pause() + }, + _resumeAll: function() { + for (var a = this._tweens.length - 1; a >= 0; a--) this._tweens[a]._resume() + }, + pauseAll: function() { + for (var a = this._tweens.length - 1; a >= 0; a--) this._tweens[a].pause() + }, + resumeAll: function() { + for (var a = this._tweens.length - 1; a >= 0; a--) this._tweens[a].resume(!0) + } + }, c.TweenManager.prototype.constructor = c.TweenManager, c.Tween = function(a, b, d) { + this.game = b, this.target = a, this.manager = d, this.timeline = [], this.reverse = !1, this.timeScale = 1, this.repeatCounter = 0, this.pendingDelete = !1, this.onStart = new c.Signal, this.onLoop = new c.Signal, this.onRepeat = new c.Signal, this.onChildComplete = new c.Signal, this.onComplete = new c.Signal, this.isRunning = !1, this.current = 0, this.properties = {}, this.chainedTween = null, this.isPaused = !1, this.frameBased = d.frameBased, this._onUpdateCallback = null, this._onUpdateCallbackContext = null, this._pausedTime = 0, this._codePaused = !1, this._hasStarted = !1 + }, c.Tween.prototype = { + to: function(a, b, d, e, f, g, h) { + return (void 0 === b || b <= 0) && (b = 1e3), void 0 !== d && null !== d || (d = c.Easing.Default), void 0 === e && (e = !1), void 0 === f && (f = 0), void 0 === g && (g = 0), void 0 === h && (h = !1), "string" == typeof d && this.manager.easeMap[d] && (d = this.manager.easeMap[d]), this.isRunning ? (console.warn("Phaser.Tween.to cannot be called after Tween.start"), this) : (this.timeline.push(new c.TweenData(this).to(a, b, d, f, g, h)), e && this.start(), this) + }, + from: function(a, b, d, e, f, g, h) { + return void 0 === b && (b = 1e3), void 0 !== d && null !== d || (d = c.Easing.Default), void 0 === e && (e = !1), void 0 === f && (f = 0), void 0 === g && (g = 0), void 0 === h && (h = !1), "string" == typeof d && this.manager.easeMap[d] && (d = this.manager.easeMap[d]), this.isRunning ? (console.warn("Phaser.Tween.from cannot be called after Tween.start"), this) : (this.timeline.push(new c.TweenData(this).from(a, b, d, f, g, h)), e && this.start(), this) + }, + start: function(a) { + if (void 0 === a && (a = 0), null === this.game || null === this.target || 0 === this.timeline.length || this.isRunning) return this; + for (var b = 0; b < this.timeline.length; b++) + for (var c in this.timeline[b].vEnd) this.properties[c] = this.target[c] || 0, Array.isArray(this.properties[c]) || (this.properties[c] *= 1); + for (var b = 0; b < this.timeline.length; b++) this.timeline[b].loadValues(); + return this.manager.add(this), this.isRunning = !0, (a < 0 || a > this.timeline.length - 1) && (a = 0), this.current = a, this.timeline[this.current].start(), this + }, + stop: function(a) { + return void 0 === a && (a = !1), this.isRunning = !1, this._onUpdateCallback = null, this._onUpdateCallbackContext = null, a && (this.onComplete.dispatch(this.target, this), this._hasStarted = !1, this.chainedTween && this.chainedTween.start()), this.manager.remove(this), this + }, + updateTweenData: function(a, b, c) { + if (0 === this.timeline.length) return this; + if (void 0 === c && (c = 0), c === -1) + for (var d = 0; d < this.timeline.length; d++) this.timeline[d][a] = b; + else this.timeline[c][a] = b; + return this + }, + delay: function(a, b) { + return this.updateTweenData("delay", a, b) + }, + repeat: function(a, b, c) { + return void 0 === b && (b = 0), this.updateTweenData("repeatCounter", a, c), this.updateTweenData("repeatDelay", b, c) + }, + repeatDelay: function(a, b) { + return this.updateTweenData("repeatDelay", a, b) + }, + yoyo: function(a, b, c) { + return void 0 === b && (b = 0), this.updateTweenData("yoyo", a, c), this.updateTweenData("yoyoDelay", b, c) + }, + yoyoDelay: function(a, b) { + return this.updateTweenData("yoyoDelay", a, b) + }, + easing: function(a, b) { + return "string" == typeof a && this.manager.easeMap[a] && (a = this.manager.easeMap[a]), this.updateTweenData("easingFunction", a, b) + }, + interpolation: function(a, b, d) { + return void 0 === b && (b = c.Math), this.updateTweenData("interpolationFunction", a, d), this.updateTweenData("interpolationContext", b, d) + }, + repeatAll: function(a) { + return void 0 === a && (a = 0), this.repeatCounter = a, this + }, + chain: function() { + for (var a = arguments.length; a--;) a > 0 ? arguments[a - 1].chainedTween = arguments[a] : this.chainedTween = arguments[a]; + return this + }, + loop: function(a) { + return void 0 === a && (a = !0), this.repeatCounter = a ? -1 : 0, this + }, + onUpdateCallback: function(a, b) { + return this._onUpdateCallback = a, this._onUpdateCallbackContext = b, this + }, + pause: function() { + this.isPaused = !0, this._codePaused = !0, this._pausedTime = this.game.time.time + }, + _pause: function() { + this._codePaused || (this.isPaused = !0, this._pausedTime = this.game.time.time) + }, + resume: function() { + if (this.isPaused) { + this.isPaused = !1, this._codePaused = !1; + for (var a = 0; a < this.timeline.length; a++) this.timeline[a].isRunning || (this.timeline[a].startTime += this.game.time.time - this._pausedTime) + } + }, + _resume: function() { + this._codePaused || this.resume() + }, + update: function(a) { + if (this.pendingDelete || !this.target) return !1; + if (this.isPaused) return !0; + var b = this.timeline[this.current].update(a); + if (b === c.TweenData.PENDING) return !0; + if (b === c.TweenData.RUNNING) return this._hasStarted || (this.onStart.dispatch(this.target, this), this._hasStarted = !0), null !== this._onUpdateCallback && this._onUpdateCallback.call(this._onUpdateCallbackContext, this, this.timeline[this.current].value, this.timeline[this.current]), this.isRunning; + if (b === c.TweenData.LOOPED) return this.timeline[this.current].repeatCounter === -1 ? this.onLoop.dispatch(this.target, this) : this.onRepeat.dispatch(this.target, this), !0; + if (b === c.TweenData.COMPLETE) { + var d = !1; + return this.reverse ? (this.current--, this.current < 0 && (this.current = this.timeline.length - 1, d = !0)) : (this.current++, this.current === this.timeline.length && (this.current = 0, d = !0)), d ? this.repeatCounter === -1 ? (this.timeline[this.current].start(), this.onLoop.dispatch(this.target, this), !0) : this.repeatCounter > 0 ? (this.repeatCounter--, this.timeline[this.current].start(), this.onRepeat.dispatch(this.target, this), !0) : (this.isRunning = !1, this.onComplete.dispatch(this.target, this), this._hasStarted = !1, this.chainedTween && this.chainedTween.start(), !1) : (this.onChildComplete.dispatch(this.target, this), this.timeline[this.current].start(), !0) + } + }, + generateData: function(a, b) { + if (null === this.game || null === this.target) return null; + void 0 === a && (a = 60), void 0 === b && (b = []); + for (var c = 0; c < this.timeline.length; c++) + for (var d in this.timeline[c].vEnd) this.properties[d] = this.target[d] || 0, Array.isArray(this.properties[d]) || (this.properties[d] *= 1); + for (var c = 0; c < this.timeline.length; c++) this.timeline[c].loadValues(); + for (var c = 0; c < this.timeline.length; c++) b = b.concat(this.timeline[c].generateData(a)); + return b + } + }, Object.defineProperty(c.Tween.prototype, "totalDuration", { + get: function() { + for (var a = 0, b = 0; b < this.timeline.length; b++) a += this.timeline[b].duration; + return a + } + }), c.Tween.prototype.constructor = c.Tween, c.TweenData = function(a) { + this.parent = a, this.game = a.game, this.vStart = {}, this.vStartCache = {}, this.vEnd = {}, this.vEndCache = {}, this.duration = 1e3, this.percent = 0, this.value = 0, this.repeatCounter = 0, this.repeatDelay = 0, this.repeatTotal = 0, this.interpolate = !1, this.yoyo = !1, this.yoyoDelay = 0, this.inReverse = !1, this.delay = 0, this.dt = 0, this.startTime = null, this.easingFunction = c.Easing.Default, this.interpolationFunction = c.Math.linearInterpolation, this.interpolationContext = c.Math, this.isRunning = !1, this.isFrom = !1 + }, c.TweenData.PENDING = 0, c.TweenData.RUNNING = 1, c.TweenData.LOOPED = 2, c.TweenData.COMPLETE = 3, c.TweenData.prototype = { + to: function(a, b, c, d, e, f) { + return this.vEnd = a, this.duration = b, this.easingFunction = c, this.delay = d, this.repeatTotal = e, this.yoyo = f, this.isFrom = !1, this + }, + from: function(a, b, c, d, e, f) { + return this.vEnd = a, this.duration = b, this.easingFunction = c, this.delay = d, this.repeatTotal = e, this.yoyo = f, this.isFrom = !0, this + }, + start: function() { + if (this.startTime = this.game.time.time + this.delay, this.parent.reverse ? this.dt = this.duration : this.dt = 0, this.delay > 0 ? this.isRunning = !1 : this.isRunning = !0, this.isFrom) + for (var a in this.vStartCache) this.vStart[a] = this.vEndCache[a], this.vEnd[a] = this.vStartCache[a], this.parent.target[a] = this.vStart[a]; + return this.value = 0, this.yoyoCounter = 0, this.repeatCounter = this.repeatTotal, this + }, + loadValues: function() { + for (var a in this.parent.properties) { + if (this.vStart[a] = this.parent.properties[a], Array.isArray(this.vEnd[a])) { + if (0 === this.vEnd[a].length) continue; + 0 === this.percent && (this.vEnd[a] = [this.vStart[a]].concat(this.vEnd[a])); + } + "undefined" != typeof this.vEnd[a] ? ("string" == typeof this.vEnd[a] && (this.vEnd[a] = this.vStart[a] + parseFloat(this.vEnd[a], 10)), this.parent.properties[a] = this.vEnd[a]) : this.vEnd[a] = this.vStart[a], this.vStartCache[a] = this.vStart[a], this.vEndCache[a] = this.vEnd[a] + } + return this + }, + update: function(a) { + if (this.isRunning) { + if (a < this.startTime) return c.TweenData.RUNNING + } else { + if (!(a >= this.startTime)) return c.TweenData.PENDING; + this.isRunning = !0 + } + var b = this.parent.frameBased ? this.game.time.physicsElapsedMS : this.game.time.elapsedMS; + this.parent.reverse ? (this.dt -= b * this.parent.timeScale, this.dt = Math.max(this.dt, 0)) : (this.dt += b * this.parent.timeScale, this.dt = Math.min(this.dt, this.duration)), this.percent = this.dt / this.duration, this.value = this.easingFunction(this.percent); + for (var d in this.vEnd) { + var e = this.vStart[d], + f = this.vEnd[d]; + Array.isArray(f) ? this.parent.target[d] = this.interpolationFunction.call(this.interpolationContext, f, this.value) : this.parent.target[d] = e + (f - e) * this.value + } + return !this.parent.reverse && 1 === this.percent || this.parent.reverse && 0 === this.percent ? this.repeat() : c.TweenData.RUNNING + }, + generateData: function(a) { + this.parent.reverse ? this.dt = this.duration : this.dt = 0; + var b = [], + c = !1, + d = 1 / a * 1e3; + do { + this.parent.reverse ? (this.dt -= d, this.dt = Math.max(this.dt, 0)) : (this.dt += d, this.dt = Math.min(this.dt, this.duration)), this.percent = this.dt / this.duration, this.value = this.easingFunction(this.percent); + var e = {}; + for (var f in this.vEnd) { + var g = this.vStart[f], + h = this.vEnd[f]; + Array.isArray(h) ? e[f] = this.interpolationFunction(h, this.value) : e[f] = g + (h - g) * this.value + } + b.push(e), (!this.parent.reverse && 1 === this.percent || this.parent.reverse && 0 === this.percent) && (c = !0) + } while (!c); + if (this.yoyo) { + var i = b.slice(); + i.reverse(), b = b.concat(i) + } + return b + }, + repeat: function() { + if (this.yoyo) { + if (this.inReverse && 0 === this.repeatCounter) { + for (var a in this.vStartCache) this.vStart[a] = this.vStartCache[a], this.vEnd[a] = this.vEndCache[a]; + return this.inReverse = !1, c.TweenData.COMPLETE + } + this.inReverse = !this.inReverse + } else if (0 === this.repeatCounter) return c.TweenData.COMPLETE; + if (this.inReverse) + for (var a in this.vStartCache) this.vStart[a] = this.vEndCache[a], this.vEnd[a] = this.vStartCache[a]; + else { + for (var a in this.vStartCache) this.vStart[a] = this.vStartCache[a], this.vEnd[a] = this.vEndCache[a]; + this.repeatCounter > 0 && this.repeatCounter-- + } + return this.startTime = this.game.time.time, this.yoyo && this.inReverse ? this.startTime += this.yoyoDelay : this.inReverse || (this.startTime += this.repeatDelay), this.parent.reverse ? this.dt = this.duration : this.dt = 0, c.TweenData.LOOPED + } + }, c.TweenData.prototype.constructor = c.TweenData, c.Easing = { + Linear: { + None: function(a) { + return a + } + }, + Quadratic: { + In: function(a) { + return a * a + }, + Out: function(a) { + return a * (2 - a) + }, + InOut: function(a) { + return (a *= 2) < 1 ? .5 * a * a : -.5 * (--a * (a - 2) - 1) + } + }, + Cubic: { + In: function(a) { + return a * a * a + }, + Out: function(a) { + return --a * a * a + 1 + }, + InOut: function(a) { + return (a *= 2) < 1 ? .5 * a * a * a : .5 * ((a -= 2) * a * a + 2) + } + }, + Quartic: { + In: function(a) { + return a * a * a * a + }, + Out: function(a) { + return 1 - --a * a * a * a + }, + InOut: function(a) { + return (a *= 2) < 1 ? .5 * a * a * a * a : -.5 * ((a -= 2) * a * a * a - 2) + } + }, + Quintic: { + In: function(a) { + return a * a * a * a * a + }, + Out: function(a) { + return --a * a * a * a * a + 1 + }, + InOut: function(a) { + return (a *= 2) < 1 ? .5 * a * a * a * a * a : .5 * ((a -= 2) * a * a * a * a + 2) + } + }, + Sinusoidal: { + In: function(a) { + return 0 === a ? 0 : 1 === a ? 1 : 1 - Math.cos(a * Math.PI / 2) + }, + Out: function(a) { + return 0 === a ? 0 : 1 === a ? 1 : Math.sin(a * Math.PI / 2) + }, + InOut: function(a) { + return 0 === a ? 0 : 1 === a ? 1 : .5 * (1 - Math.cos(Math.PI * a)) + } + }, + Exponential: { + In: function(a) { + return 0 === a ? 0 : Math.pow(1024, a - 1) + }, + Out: function(a) { + return 1 === a ? 1 : 1 - Math.pow(2, -10 * a) + }, + InOut: function(a) { + return 0 === a ? 0 : 1 === a ? 1 : (a *= 2) < 1 ? .5 * Math.pow(1024, a - 1) : .5 * (-Math.pow(2, -10 * (a - 1)) + 2) + } + }, + Circular: { + In: function(a) { + return 1 - Math.sqrt(1 - a * a) + }, + Out: function(a) { + return Math.sqrt(1 - --a * a) + }, + InOut: function(a) { + return (a *= 2) < 1 ? -.5 * (Math.sqrt(1 - a * a) - 1) : .5 * (Math.sqrt(1 - (a -= 2) * a) + 1) + } + }, + Elastic: { + In: function(a) { + var b, c = .1, + d = .4; + return 0 === a ? 0 : 1 === a ? 1 : (!c || c < 1 ? (c = 1, b = d / 4) : b = d * Math.asin(1 / c) / (2 * Math.PI), -(c * Math.pow(2, 10 * (a -= 1)) * Math.sin((a - b) * (2 * Math.PI) / d))) + }, + Out: function(a) { + var b, c = .1, + d = .4; + return 0 === a ? 0 : 1 === a ? 1 : (!c || c < 1 ? (c = 1, b = d / 4) : b = d * Math.asin(1 / c) / (2 * Math.PI), c * Math.pow(2, -10 * a) * Math.sin((a - b) * (2 * Math.PI) / d) + 1) + }, + InOut: function(a) { + var b, c = .1, + d = .4; + return 0 === a ? 0 : 1 === a ? 1 : (!c || c < 1 ? (c = 1, b = d / 4) : b = d * Math.asin(1 / c) / (2 * Math.PI), (a *= 2) < 1 ? -.5 * (c * Math.pow(2, 10 * (a -= 1)) * Math.sin((a - b) * (2 * Math.PI) / d)) : c * Math.pow(2, -10 * (a -= 1)) * Math.sin((a - b) * (2 * Math.PI) / d) * .5 + 1) + } + }, + Back: { + In: function(a) { + var b = 1.70158; + return a * a * ((b + 1) * a - b) + }, + Out: function(a) { + var b = 1.70158; + return --a * a * ((b + 1) * a + b) + 1 + }, + InOut: function(a) { + var b = 2.5949095; + return (a *= 2) < 1 ? .5 * (a * a * ((b + 1) * a - b)) : .5 * ((a -= 2) * a * ((b + 1) * a + b) + 2) + } + }, + Bounce: { + In: function(a) { + return 1 - c.Easing.Bounce.Out(1 - a) + }, + Out: function(a) { + return a < 1 / 2.75 ? 7.5625 * a * a : a < 2 / 2.75 ? 7.5625 * (a -= 1.5 / 2.75) * a + .75 : a < 2.5 / 2.75 ? 7.5625 * (a -= 2.25 / 2.75) * a + .9375 : 7.5625 * (a -= 2.625 / 2.75) * a + .984375 + }, + InOut: function(a) { + return a < .5 ? .5 * c.Easing.Bounce.In(2 * a) : .5 * c.Easing.Bounce.Out(2 * a - 1) + .5 + } + } + }, c.Easing.Default = c.Easing.Linear.None, c.Easing.Power0 = c.Easing.Linear.None, c.Easing.Power1 = c.Easing.Quadratic.Out, c.Easing.Power2 = c.Easing.Cubic.Out, c.Easing.Power3 = c.Easing.Quartic.Out, c.Easing.Power4 = c.Easing.Quintic.Out, c.Time = function(a) { + this.game = a, this.time = 0, this.prevTime = 0, this.now = 0, this.elapsed = 0, this.elapsedMS = 0, this.physicsElapsed = 1 / 60, this.physicsElapsedMS = 1 / 60 * 1e3, this.desiredFpsMult = 1 / 60, this._desiredFps = 60, this.suggestedFps = this.desiredFps, this.slowMotion = 1, this.advancedTiming = !1, this.frames = 0, this.fps = 0, this.fpsMin = 1e3, this.fpsMax = 0, this.msMin = 1e3, this.msMax = 0, this.pauseDuration = 0, this.timeToCall = 0, this.timeExpected = 0, this.events = new c.Timer(this.game, (!1)), this._frameCount = 0, this._elapsedAccumulator = 0, this._started = 0, this._timeLastSecond = 0, this._pauseStarted = 0, this._justResumed = !1, this._timers = [] + }, c.Time.prototype = { + boot: function() { + this._started = Date.now(), this.time = Date.now(), this.events.start(), this.timeExpected = this.time + }, + add: function(a) { + return this._timers.push(a), a + }, + create: function(a) { + void 0 === a && (a = !0); + var b = new c.Timer(this.game, a); + return this._timers.push(b), b + }, + removeAll: function() { + for (var a = 0; a < this._timers.length; a++) this._timers[a].destroy(); + this._timers = [], this.events.removeAll() + }, + refresh: function() { + var a = this.time; + this.time = Date.now(), this.elapsedMS = this.time - a + }, + update: function(a) { + var b = this.time; + this.time = Date.now(), this.elapsedMS = this.time - b, this.prevTime = this.now, this.now = a, this.elapsed = this.now - this.prevTime, this.game.raf._isSetTimeOut && (this.timeToCall = Math.floor(Math.max(0, 1e3 / this._desiredFps - (this.timeExpected - a))), this.timeExpected = a + this.timeToCall), this.advancedTiming && this.updateAdvancedTiming(), this.game.paused || (this.events.update(this.time), this._timers.length && this.updateTimers()) + }, + updateTimers: function() { + for (var a = 0, b = this._timers.length; a < b;) this._timers[a].update(this.time) ? a++ : (this._timers.splice(a, 1), b--) + }, + updateAdvancedTiming: function() { + this._frameCount++, this._elapsedAccumulator += this.elapsed, this._frameCount >= 2 * this._desiredFps && (this.suggestedFps = 5 * Math.floor(200 / (this._elapsedAccumulator / this._frameCount)), this._frameCount = 0, this._elapsedAccumulator = 0), this.msMin = Math.min(this.msMin, this.elapsed), this.msMax = Math.max(this.msMax, this.elapsed), this.frames++, this.now > this._timeLastSecond + 1e3 && (this.fps = Math.round(1e3 * this.frames / (this.now - this._timeLastSecond)), this.fpsMin = Math.min(this.fpsMin, this.fps), this.fpsMax = Math.max(this.fpsMax, this.fps), this._timeLastSecond = this.now, this.frames = 0) + }, + gamePaused: function() { + this._pauseStarted = Date.now(), this.events.pause(); + for (var a = this._timers.length; a--;) this._timers[a]._pause() + }, + gameResumed: function() { + this.time = Date.now(), this.pauseDuration = this.time - this._pauseStarted, this.events.resume(); + for (var a = this._timers.length; a--;) this._timers[a]._resume() + }, + totalElapsedSeconds: function() { + return .001 * (this.time - this._started) + }, + elapsedSince: function(a) { + return this.time - a + }, + elapsedSecondsSince: function(a) { + return .001 * (this.time - a) + }, + reset: function() { + this._started = this.time, this.removeAll() + } + }, Object.defineProperty(c.Time.prototype, "desiredFps", { + get: function() { + return this._desiredFps + }, + set: function(a) { + this._desiredFps = a, this.physicsElapsed = 1 / a, this.physicsElapsedMS = 1e3 * this.physicsElapsed, this.desiredFpsMult = 1 / a + } + }), c.Time.prototype.constructor = c.Time, c.Timer = function(a, b) { + void 0 === b && (b = !0), this.game = a, this.running = !1, this.autoDestroy = b, this.expired = !1, this.elapsed = 0, this.events = [], this.onComplete = new c.Signal, this.nextTick = 0, this.timeCap = 1e3, this.paused = !1, this._codePaused = !1, this._started = 0, this._pauseStarted = 0, this._pauseTotal = 0, this._now = Date.now(), this._len = 0, this._marked = 0, this._i = 0, this._diff = 0, this._newTick = 0 + }, c.Timer.MINUTE = 6e4, c.Timer.SECOND = 1e3, c.Timer.HALF = 500, c.Timer.QUARTER = 250, c.Timer.prototype = { + create: function(a, b, d, e, f, g) { + a = Math.round(a); + var h = a; + h += 0 === this._now ? this.game.time.time : this._now; + var i = new c.TimerEvent(this, a, h, d, b, e, f, g); + return this.events.push(i), this.order(), this.expired = !1, i + }, + add: function(a, b, c) { + return this.create(a, !1, 0, b, c, Array.prototype.slice.call(arguments, 3)) + }, + repeat: function(a, b, c, d) { + return this.create(a, !1, b, c, d, Array.prototype.slice.call(arguments, 4)) + }, + loop: function(a, b, c) { + return this.create(a, !0, 0, b, c, Array.prototype.slice.call(arguments, 3)) + }, + start: function(a) { + if (!this.running) { + this._started = this.game.time.time + (a || 0), this.running = !0; + for (var b = 0; b < this.events.length; b++) this.events[b].tick = this.events[b].delay + this._started + } + }, + stop: function(a) { + this.running = !1, void 0 === a && (a = !0), a && (this.events.length = 0) + }, + remove: function(a) { + for (var b = 0; b < this.events.length; b++) + if (this.events[b] === a) return this.events[b].pendingDelete = !0, !0; + return !1 + }, + order: function() { + this.events.length > 0 && (this.events.sort(this.sortHandler), this.nextTick = this.events[0].tick) + }, + sortHandler: function(a, b) { + return a.tick < b.tick ? -1 : a.tick > b.tick ? 1 : 0 + }, + clearPendingEvents: function() { + for (this._i = this.events.length; this._i--;) this.events[this._i].pendingDelete && this.events.splice(this._i, 1); + this._len = this.events.length, this._i = 0 + }, + update: function(a) { + if (this.paused) return !0; + if (this.elapsed = a - this._now, this._now = a, this.elapsed > this.timeCap && this.adjustEvents(a - this.elapsed), this._marked = 0, this.clearPendingEvents(), this.running && this._now >= this.nextTick && this._len > 0) { + for (; this._i < this._len && this.running && this._now >= this.events[this._i].tick && !this.events[this._i].pendingDelete;) this._newTick = this._now + this.events[this._i].delay - (this._now - this.events[this._i].tick), this._newTick < 0 && (this._newTick = this._now + this.events[this._i].delay), this.events[this._i].loop === !0 ? (this.events[this._i].tick = this._newTick, this.events[this._i].callback.apply(this.events[this._i].callbackContext, this.events[this._i].args)) : this.events[this._i].repeatCount > 0 ? (this.events[this._i].repeatCount--, this.events[this._i].tick = this._newTick, this.events[this._i].callback.apply(this.events[this._i].callbackContext, this.events[this._i].args)) : (this._marked++, this.events[this._i].pendingDelete = !0, this.events[this._i].callback.apply(this.events[this._i].callbackContext, this.events[this._i].args)), this._i++; + this.events.length > this._marked ? this.order() : (this.expired = !0, this.onComplete.dispatch(this)) + } + return !this.expired || !this.autoDestroy + }, + pause: function() { + this.running && (this._codePaused = !0, this.paused || (this._pauseStarted = this.game.time.time, this.paused = !0)) + }, + _pause: function() { + !this.paused && this.running && (this._pauseStarted = this.game.time.time, this.paused = !0) + }, + adjustEvents: function(a) { + for (var b = 0; b < this.events.length; b++) + if (!this.events[b].pendingDelete) { + var c = this.events[b].tick - a; + c < 0 && (c = 0), this.events[b].tick = this._now + c + } var d = this.nextTick - a; + d < 0 ? this.nextTick = this._now : this.nextTick = this._now + d + }, + resume: function() { + if (this.paused) { + var a = this.game.time.time; + this._pauseTotal += a - this._now, this._now = a, this.adjustEvents(this._pauseStarted), this.paused = !1, this._codePaused = !1 + } + }, + _resume: function() { + this._codePaused || this.resume() + }, + removeAll: function() { + this.onComplete.removeAll(), this.events.length = 0, this._len = 0, this._i = 0 + }, + destroy: function() { + this.onComplete.removeAll(), this.running = !1, this.events = [], this._len = 0, this._i = 0 + } + }, Object.defineProperty(c.Timer.prototype, "next", { + get: function() { + return this.nextTick + } + }), Object.defineProperty(c.Timer.prototype, "duration", { + get: function() { + return this.running && this.nextTick > this._now ? this.nextTick - this._now : 0 + } + }), Object.defineProperty(c.Timer.prototype, "length", { + get: function() { + return this.events.length + } + }), Object.defineProperty(c.Timer.prototype, "ms", { + get: function() { + return this.running ? this._now - this._started - this._pauseTotal : 0 + } + }), Object.defineProperty(c.Timer.prototype, "seconds", { + get: function() { + return this.running ? .001 * this.ms : 0 + } + }), c.Timer.prototype.constructor = c.Timer, c.TimerEvent = function(a, b, c, d, e, f, g, h) { + this.timer = a, this.delay = b, this.tick = c, this.repeatCount = d - 1, this.loop = e, this.callback = f, this.callbackContext = g, this.args = h, this.pendingDelete = !1 + }, c.TimerEvent.prototype.constructor = c.TimerEvent, c.AnimationManager = function(a) { + this.sprite = a, this.game = a.game, this.currentFrame = null, this.currentAnim = null, this.updateIfVisible = !0, this.isLoaded = !1, this._frameData = null, this._anims = {}, this._outputFrames = [] + }, c.AnimationManager.prototype = { + loadFrameData: function(a, b) { + if (void 0 === a) return !1; + if (this.isLoaded) + for (var c in this._anims) this._anims[c].updateFrameData(a); + return this._frameData = a, void 0 === b || null === b ? this.frame = 0 : "string" == typeof b ? this.frameName = b : this.frame = b, this.isLoaded = !0, !0 + }, + copyFrameData: function(a, b) { + if (this._frameData = a.clone(), this.isLoaded) + for (var c in this._anims) this._anims[c].updateFrameData(this._frameData); + return void 0 === b || null === b ? this.frame = 0 : "string" == typeof b ? this.frameName = b : this.frame = b, this.isLoaded = !0, !0 + }, + add: function(a, b, d, e, f) { + return b = b || [], d = d || 60, void 0 === e && (e = !1), void 0 === f && (f = !(!b || "number" != typeof b[0])), this._outputFrames = [], this._frameData.getFrameIndexes(b, f, this._outputFrames), this._anims[a] = new c.Animation(this.game, this.sprite, a, this._frameData, this._outputFrames, d, e), this.currentAnim = this._anims[a], this.sprite.tilingTexture && (this.sprite.refreshTexture = !0), this._anims[a] + }, + validateFrames: function(a, b) { + void 0 === b && (b = !0); + for (var c = 0; c < a.length; c++) + if (b === !0) { + if (a[c] > this._frameData.total) return !1 + } else if (this._frameData.checkFrameName(a[c]) === !1) return !1; + return !0 + }, + play: function(a, b, c, d) { + if (this._anims[a]) return this.currentAnim === this._anims[a] ? this.currentAnim.isPlaying === !1 ? (this.currentAnim.paused = !1, this.currentAnim.play(b, c, d)) : this.currentAnim : (this.currentAnim && this.currentAnim.isPlaying && this.currentAnim.stop(), this.currentAnim = this._anims[a], this.currentAnim.paused = !1, this.currentFrame = this.currentAnim.currentFrame, this.currentAnim.play(b, c, d)) + }, + stop: function(a, b) { + void 0 === b && (b = !1), !this.currentAnim || "string" == typeof a && a !== this.currentAnim.name || this.currentAnim.stop(b) + }, + update: function() { + return !(this.updateIfVisible && !this.sprite.visible) && (!(!this.currentAnim || !this.currentAnim.update()) && (this.currentFrame = this.currentAnim.currentFrame, !0)) + }, + next: function(a) { + this.currentAnim && (this.currentAnim.next(a), this.currentFrame = this.currentAnim.currentFrame) + }, + previous: function(a) { + this.currentAnim && (this.currentAnim.previous(a), this.currentFrame = this.currentAnim.currentFrame) + }, + getAnimation: function(a) { + return "string" == typeof a && this._anims[a] ? this._anims[a] : null + }, + refreshFrame: function() {}, + destroy: function() { + var a = null; + for (var a in this._anims) this._anims.hasOwnProperty(a) && this._anims[a].destroy(); + this._anims = {}, this._outputFrames = [], this._frameData = null, this.currentAnim = null, this.currentFrame = null, this.sprite = null, this.game = null + } + }, c.AnimationManager.prototype.constructor = c.AnimationManager, Object.defineProperty(c.AnimationManager.prototype, "frameData", { + get: function() { + return this._frameData + } + }), Object.defineProperty(c.AnimationManager.prototype, "frameTotal", { + get: function() { + return this._frameData.total + } + }), Object.defineProperty(c.AnimationManager.prototype, "paused", { + get: function() { + return this.currentAnim.isPaused + }, + set: function(a) { + this.currentAnim.paused = a + } + }), Object.defineProperty(c.AnimationManager.prototype, "name", { + get: function() { + if (this.currentAnim) return this.currentAnim.name + } + }), Object.defineProperty(c.AnimationManager.prototype, "frame", { + get: function() { + if (this.currentFrame) return this.currentFrame.index + }, + set: function(a) { + "number" == typeof a && this._frameData && null !== this._frameData.getFrame(a) && (this.currentFrame = this._frameData.getFrame(a), this.currentFrame && this.sprite.setFrame(this.currentFrame)) + } + }), Object.defineProperty(c.AnimationManager.prototype, "frameName", { + get: function() { + if (this.currentFrame) return this.currentFrame.name + }, + set: function(a) { + "string" == typeof a && this._frameData && null !== this._frameData.getFrameByName(a) ? (this.currentFrame = this._frameData.getFrameByName(a), this.currentFrame && (this._frameIndex = this.currentFrame.index, this.sprite.setFrame(this.currentFrame))) : console.warn("Cannot set frameName: " + a) + } + }), c.Animation = function(a, b, d, e, f, g, h) { + void 0 === h && (h = !1), this.game = a, this._parent = b, this._frameData = e, this.name = d, this._frames = [], this._frames = this._frames.concat(f), this.delay = 1e3 / g, this.loop = h, this.loopCount = 0, this.killOnComplete = !1, this.isFinished = !1, this.isPlaying = !1, this.isPaused = !1, this._pauseStartTime = 0, this._frameIndex = 0, this._frameDiff = 0, this._frameSkip = 1, this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]), this.onStart = new c.Signal, this.onUpdate = null, this.onComplete = new c.Signal, this.onLoop = new c.Signal, this.isReversed = !1, this.game.onPause.add(this.onPause, this), this.game.onResume.add(this.onResume, this) + }, c.Animation.prototype = { + play: function(a, b, c) { + return "number" == typeof a && (this.delay = 1e3 / a), "boolean" == typeof b && (this.loop = b), "undefined" != typeof c && (this.killOnComplete = c), this.isPlaying = !0, this.isFinished = !1, this.paused = !1, this.loopCount = 0, this._timeLastFrame = this.game.time.time, this._timeNextFrame = this.game.time.time + this.delay, this._frameIndex = this.isReversed ? this._frames.length - 1 : 0, this.updateCurrentFrame(!1, !0), this._parent.events.onAnimationStart$dispatch(this._parent, this), this.onStart.dispatch(this._parent, this), this._parent.animations.currentAnim = this, this._parent.animations.currentFrame = this.currentFrame, this + }, + restart: function() { + this.isPlaying = !0, this.isFinished = !1, this.paused = !1, this.loopCount = 0, this._timeLastFrame = this.game.time.time, this._timeNextFrame = this.game.time.time + this.delay, this._frameIndex = 0, this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]), this._parent.setFrame(this.currentFrame), this._parent.animations.currentAnim = this, this._parent.animations.currentFrame = this.currentFrame, this.onStart.dispatch(this._parent, this) + }, + reverse: function() { + return this.reversed = !this.reversed, this + }, + reverseOnce: function() { + return this.onComplete.addOnce(this.reverse, this), this.reverse() + }, + setFrame: function(a, b) { + var c; + if (void 0 === b && (b = !1), "string" == typeof a) + for (var d = 0; d < this._frames.length; d++) this._frameData.getFrame(this._frames[d]).name === a && (c = d); + else if ("number" == typeof a) + if (b) c = a; + else + for (var d = 0; d < this._frames.length; d++) this._frames[d] === a && (c = d); + c && (this._frameIndex = c - 1, this._timeNextFrame = this.game.time.time, this.update()) + }, + stop: function(a, b) { + void 0 === a && (a = !1), void 0 === b && (b = !1), this.isPlaying = !1, this.isFinished = !0, this.paused = !1, a && (this.currentFrame = this._frameData.getFrame(this._frames[0]), this._parent.setFrame(this.currentFrame)), b && (this._parent.events.onAnimationComplete$dispatch(this._parent, this), this.onComplete.dispatch(this._parent, this)) + }, + onPause: function() { + this.isPlaying && (this._frameDiff = this._timeNextFrame - this.game.time.time) + }, + onResume: function() { + this.isPlaying && (this._timeNextFrame = this.game.time.time + this._frameDiff) + }, + update: function() { + return !this.isPaused && (!!(this.isPlaying && this.game.time.time >= this._timeNextFrame) && (this._frameSkip = 1, this._frameDiff = this.game.time.time - this._timeNextFrame, this._timeLastFrame = this.game.time.time, this._frameDiff > this.delay && (this._frameSkip = Math.floor(this._frameDiff / this.delay), this._frameDiff -= this._frameSkip * this.delay), this._timeNextFrame = this.game.time.time + (this.delay - this._frameDiff), this.isReversed ? this._frameIndex -= this._frameSkip : this._frameIndex += this._frameSkip, !this.isReversed && this._frameIndex >= this._frames.length || this.isReversed && this._frameIndex <= -1 ? this.loop ? (this._frameIndex = Math.abs(this._frameIndex) % this._frames.length, this.isReversed && (this._frameIndex = this._frames.length - 1 - this._frameIndex), this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]), this.currentFrame && this._parent.setFrame(this.currentFrame), this.loopCount++, this._parent.events.onAnimationLoop$dispatch(this._parent, this), this.onLoop.dispatch(this._parent, this), !this.onUpdate || (this.onUpdate.dispatch(this, this.currentFrame), !!this._frameData)) : (this.complete(), !1) : this.updateCurrentFrame(!0))) + }, + updateCurrentFrame: function(a, b) { + if (void 0 === b && (b = !1), !this._frameData) return !1; + var c = this.currentFrame.index; + return this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]), this.currentFrame && (b || !b && c !== this.currentFrame.index) && this._parent.setFrame(this.currentFrame), !this.onUpdate || !a || (this.onUpdate.dispatch(this, this.currentFrame), !!this._frameData) + }, + next: function(a) { + void 0 === a && (a = 1); + var b = this._frameIndex + a; + b >= this._frames.length && (this.loop ? b %= this._frames.length : b = this._frames.length - 1), b !== this._frameIndex && (this._frameIndex = b, this.updateCurrentFrame(!0)) + }, + previous: function(a) { + void 0 === a && (a = 1); + var b = this._frameIndex - a; + b < 0 && (this.loop ? b = this._frames.length + b : b++), b !== this._frameIndex && (this._frameIndex = b, this.updateCurrentFrame(!0)) + }, + updateFrameData: function(a) { + this._frameData = a, this.currentFrame = this._frameData ? this._frameData.getFrame(this._frames[this._frameIndex % this._frames.length]) : null + }, + destroy: function() { + this._frameData && (this.game.onPause.remove(this.onPause, this), this.game.onResume.remove(this.onResume, this), this.game = null, this._parent = null, this._frames = null, this._frameData = null, this.currentFrame = null, this.isPlaying = !1, this.onStart.dispose(), this.onLoop.dispose(), this.onComplete.dispose(), this.onUpdate && this.onUpdate.dispose()) + }, + complete: function() { + this._frameIndex = this._frames.length - 1, this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]), this.isPlaying = !1, this.isFinished = !0, this.paused = !1, this._parent.events.onAnimationComplete$dispatch(this._parent, this), this.onComplete.dispatch(this._parent, this), this.killOnComplete && this._parent.kill() + } + }, c.Animation.prototype.constructor = c.Animation, Object.defineProperty(c.Animation.prototype, "paused", { + get: function() { + return this.isPaused + }, + set: function(a) { + this.isPaused = a, a ? this._pauseStartTime = this.game.time.time : this.isPlaying && (this._timeNextFrame = this.game.time.time + this.delay) + } + }), Object.defineProperty(c.Animation.prototype, "reversed", { + get: function() { + return this.isReversed + }, + set: function(a) { + this.isReversed = a + } + }), Object.defineProperty(c.Animation.prototype, "frameTotal", { + get: function() { + return this._frames.length + } + }), Object.defineProperty(c.Animation.prototype, "frame", { + get: function() { + return null !== this.currentFrame ? this.currentFrame.index : this._frameIndex + }, + set: function(a) { + this.currentFrame = this._frameData.getFrame(this._frames[a]), null !== this.currentFrame && (this._frameIndex = a, this._parent.setFrame(this.currentFrame), this.onUpdate && this.onUpdate.dispatch(this, this.currentFrame)) + } + }), Object.defineProperty(c.Animation.prototype, "speed", { + get: function() { + return 1e3 / this.delay + }, + set: function(a) { + a > 0 && (this.delay = 1e3 / a) + } + }), Object.defineProperty(c.Animation.prototype, "enableUpdate", { + get: function() { + return null !== this.onUpdate + }, + set: function(a) { + a && null === this.onUpdate ? this.onUpdate = new c.Signal : a || null === this.onUpdate || (this.onUpdate.dispose(), this.onUpdate = null) + } + }), c.Animation.generateFrameNames = function(a, b, d, e, f) { + void 0 === e && (e = ""); + var g = [], + h = ""; + if (b < d) + for (var i = b; i <= d; i++) h = "number" == typeof f ? c.Utils.pad(i.toString(), f, "0", 1) : i.toString(), h = a + h + e, g.push(h); + else + for (var i = b; i >= d; i--) h = "number" == typeof f ? c.Utils.pad(i.toString(), f, "0", 1) : i.toString(), h = a + h + e, g.push(h); + return g + }, c.Frame = function(a, b, d, e, f, g) { + this.index = a, this.x = b, this.y = d, this.width = e, this.height = f, this.name = g, this.centerX = Math.floor(e / 2), this.centerY = Math.floor(f / 2), this.distance = c.Math.distance(0, 0, e, f), this.rotated = !1, this.rotationDirection = "cw", this.trimmed = !1, this.sourceSizeW = e, this.sourceSizeH = f, this.spriteSourceSizeX = 0, this.spriteSourceSizeY = 0, this.spriteSourceSizeW = 0, this.spriteSourceSizeH = 0, this.right = this.x + this.width, this.bottom = this.y + this.height + }, c.Frame.prototype = { + resize: function(a, b) { + this.width = a, this.height = b, this.centerX = Math.floor(a / 2), this.centerY = Math.floor(b / 2), this.distance = c.Math.distance(0, 0, a, b), this.sourceSizeW = a, this.sourceSizeH = b, this.right = this.x + a, this.bottom = this.y + b + }, + setTrim: function(a, b, c, d, e, f, g) { + this.trimmed = a, a && (this.sourceSizeW = b, this.sourceSizeH = c, this.centerX = Math.floor(b / 2), this.centerY = Math.floor(c / 2), this.spriteSourceSizeX = d, this.spriteSourceSizeY = e, this.spriteSourceSizeW = f, this.spriteSourceSizeH = g) + }, + clone: function() { + var a = new c.Frame(this.index, this.x, this.y, this.width, this.height, this.name); + for (var b in this) this.hasOwnProperty(b) && (a[b] = this[b]); + return a + }, + getRect: function(a) { + return void 0 === a ? a = new c.Rectangle(this.x, this.y, this.width, this.height) : a.setTo(this.x, this.y, this.width, this.height), a + } + }, c.Frame.prototype.constructor = c.Frame, c.FrameData = function() { + this._frames = [], this._frameNames = [] + }, c.FrameData.prototype = { + addFrame: function(a) { + return a.index = this._frames.length, this._frames.push(a), "" !== a.name && (this._frameNames[a.name] = a.index), a + }, + getFrame: function(a) { + return a >= this._frames.length && (a = 0), this._frames[a] + }, + getFrameByName: function(a) { + return "number" == typeof this._frameNames[a] ? this._frames[this._frameNames[a]] : null + }, + checkFrameName: function(a) { + return null != this._frameNames[a] + }, + clone: function() { + for (var a = new c.FrameData, b = 0; b < this._frames.length; b++) a._frames.push(this._frames[b].clone()); + for (var d in this._frameNames) this._frameNames.hasOwnProperty(d) && a._frameNames.push(this._frameNames[d]); + return a + }, + getFrameRange: function(a, b, c) { + void 0 === c && (c = []); + for (var d = a; d <= b; d++) c.push(this._frames[d]); + return c + }, + getFrames: function(a, b, c) { + if (void 0 === b && (b = !0), void 0 === c && (c = []), void 0 === a || 0 === a.length) + for (var d = 0; d < this._frames.length; d++) c.push(this._frames[d]); + else + for (var d = 0; d < a.length; d++) b ? c.push(this.getFrame(a[d])) : c.push(this.getFrameByName(a[d])); + return c + }, + getFrameIndexes: function(a, b, c) { + if (void 0 === b && (b = !0), void 0 === c && (c = []), void 0 === a || 0 === a.length) + for (var d = 0; d < this._frames.length; d++) c.push(this._frames[d].index); + else + for (var d = 0; d < a.length; d++) b && this._frames[a[d]] ? c.push(this._frames[a[d]].index) : this.getFrameByName(a[d]) && c.push(this.getFrameByName(a[d]).index); + return c + }, + destroy: function() { + this._frames = null, this._frameNames = null + } + }, c.FrameData.prototype.constructor = c.FrameData, Object.defineProperty(c.FrameData.prototype, "total", { + get: function() { + return this._frames.length + } + }), c.AnimationParser = { + spriteSheet: function(a, b, d, e, f, g, h) { + var i = b; + if ("string" == typeof b && (i = a.cache.getImage(b)), null === i) return null; + var j = i.width, + k = i.height; + d <= 0 && (d = Math.floor(-j / Math.min(-1, d))), e <= 0 && (e = Math.floor(-k / Math.min(-1, e))); + var l = Math.floor((j - g) / (d + h)), + m = Math.floor((k - g) / (e + h)), + n = l * m; + if (f !== -1 && (n = f), 0 === j || 0 === k || j < d || k < e || 0 === n) return console.warn("Phaser.AnimationParser.spriteSheet: '" + b + "'s width/height zero or width/height < given frameWidth/frameHeight"), null; + for (var o = new c.FrameData, p = g, q = g, r = 0; r < n; r++) o.addFrame(new c.Frame(r, p, q, d, e, "")), p += d + h, p + d > j && (p = g, q += e + h); + return o + }, + JSONData: function(a, b) { + if (!b.frames) return console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array"), void console.log(b); + for (var d, e = new c.FrameData, f = b.frames, g = 0; g < f.length; g++) d = e.addFrame(new c.Frame(g, f[g].frame.x, f[g].frame.y, f[g].frame.w, f[g].frame.h, f[g].filename)), f[g].trimmed && d.setTrim(f[g].trimmed, f[g].sourceSize.w, f[g].sourceSize.h, f[g].spriteSourceSize.x, f[g].spriteSourceSize.y, f[g].spriteSourceSize.w, f[g].spriteSourceSize.h); + return e + }, + JSONDataPyxel: function(a, b) { + var d = ["layers", "tilewidth", "tileheight", "tileswide", "tileshigh"]; + if (d.forEach(function(a) { + if (!b[a]) return console.warn('Phaser.AnimationParser.JSONDataPyxel: Invalid Pyxel Tilemap JSON given, missing "' + a + '" key.'), void console.log(b) + }), 1 !== b.layers.length) return console.warn("Phaser.AnimationParser.JSONDataPyxel: Too many layers, this parser only supports flat Tilemaps."), void console.log(b); + for (var e, f = new c.FrameData, g = b.tileheight, h = b.tilewidth, i = b.layers[0].tiles, j = 0; j < i.length; j++) e = f.addFrame(new c.Frame(j, i[j].x, i[j].y, h, g, "frame_" + j)), e.setTrim(!1); + return f + }, + JSONDataHash: function(a, b) { + if (!b.frames) return console.warn("Phaser.AnimationParser.JSONDataHash: Invalid Texture Atlas JSON given, missing 'frames' object"), void console.log(b); + var d, e = new c.FrameData, + f = b.frames, + g = 0; + for (var h in f) d = e.addFrame(new c.Frame(g, f[h].frame.x, f[h].frame.y, f[h].frame.w, f[h].frame.h, h)), f[h].trimmed && d.setTrim(f[h].trimmed, f[h].sourceSize.w, f[h].sourceSize.h, f[h].spriteSourceSize.x, f[h].spriteSourceSize.y, f[h].spriteSourceSize.w, f[h].spriteSourceSize.h), g++; + return e + }, + XMLData: function(a, b) { + if (!b.getElementsByTagName("TextureAtlas")) return void console.warn("Phaser.AnimationParser.XMLData: Invalid Texture Atlas XML given, missing tag"); + for (var d, e, f, g, h, i, j, k, l, m, n, o = new c.FrameData, p = b.getElementsByTagName("SubTexture"), q = 0; q < p.length; q++) f = p[q].attributes, e = f.name.value, g = parseInt(f.x.value, 10), h = parseInt(f.y.value, 10), i = parseInt(f.width.value, 10), j = parseInt(f.height.value, 10), k = null, l = null, f.frameX && (k = Math.abs(parseInt(f.frameX.value, 10)), l = Math.abs(parseInt(f.frameY.value, 10)), m = parseInt(f.frameWidth.value, 10), n = parseInt(f.frameHeight.value, 10)), d = o.addFrame(new c.Frame(q, g, h, i, j, e)), null === k && null === l || d.setTrim(!0, i, j, k, l, m, n); + return o + } + }, c.Cache = function(a) { + this.game = a, this.autoResolveURL = !1, this._cache = { + canvas: {}, + image: {}, + texture: {}, + sound: {}, + video: {}, + text: {}, + json: {}, + xml: {}, + physics: {}, + tilemap: {}, + binary: {}, + bitmapData: {}, + bitmapFont: {}, + shader: {}, + renderTexture: {} + }, this._urlMap = {}, this._urlResolver = new Image, this._urlTemp = null, this.onSoundUnlock = new c.Signal, this._cacheMap = [], this._cacheMap[c.Cache.CANVAS] = this._cache.canvas, this._cacheMap[c.Cache.IMAGE] = this._cache.image, this._cacheMap[c.Cache.TEXTURE] = this._cache.texture, this._cacheMap[c.Cache.SOUND] = this._cache.sound, this._cacheMap[c.Cache.TEXT] = this._cache.text, this._cacheMap[c.Cache.PHYSICS] = this._cache.physics, this._cacheMap[c.Cache.TILEMAP] = this._cache.tilemap, this._cacheMap[c.Cache.BINARY] = this._cache.binary, this._cacheMap[c.Cache.BITMAPDATA] = this._cache.bitmapData, this._cacheMap[c.Cache.BITMAPFONT] = this._cache.bitmapFont, this._cacheMap[c.Cache.JSON] = this._cache.json, this._cacheMap[c.Cache.XML] = this._cache.xml, this._cacheMap[c.Cache.VIDEO] = this._cache.video, this._cacheMap[c.Cache.SHADER] = this._cache.shader, this._cacheMap[c.Cache.RENDER_TEXTURE] = this._cache.renderTexture, this.addDefaultImage(), this.addMissingImage() + }, c.Cache.CANVAS = 1, c.Cache.IMAGE = 2, c.Cache.TEXTURE = 3, c.Cache.SOUND = 4, c.Cache.TEXT = 5, c.Cache.PHYSICS = 6, c.Cache.TILEMAP = 7, c.Cache.BINARY = 8, c.Cache.BITMAPDATA = 9, c.Cache.BITMAPFONT = 10, c.Cache.JSON = 11, c.Cache.XML = 12, c.Cache.VIDEO = 13, c.Cache.SHADER = 14, c.Cache.RENDER_TEXTURE = 15, c.Cache.DEFAULT = null, c.Cache.MISSING = null, c.Cache.prototype = { + addCanvas: function(a, b, c) { + void 0 === c && (c = b.getContext("2d")), this._cache.canvas[a] = { + canvas: b, + context: c + } + }, + addImage: function(a, b, d) { + this.checkImageKey(a) && this.removeImage(a); + var e = { + key: a, + url: b, + data: d, + base: new PIXI.BaseTexture(d), + frame: new c.Frame(0, 0, 0, d.width, d.height, a), + frameData: new c.FrameData + }; + return e.frameData.addFrame(new c.Frame(0, 0, 0, d.width, d.height, b)), this._cache.image[a] = e, this._resolveURL(b, e), "__default" === a ? c.Cache.DEFAULT = new PIXI.Texture(e.base) : "__missing" === a && (c.Cache.MISSING = new PIXI.Texture(e.base)), e + }, + addDefaultImage: function() { + var a = new Image; + a.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="; + var b = this.addImage("__default", null, a); + b.base.skipRender = !0, c.Cache.DEFAULT = new PIXI.Texture(b.base) + }, + addMissingImage: function() { + var a = new Image; + a.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="; + var b = this.addImage("__missing", null, a); + c.Cache.MISSING = new PIXI.Texture(b.base) + }, + addSound: function(a, b, c, d, e) { + void 0 === d && (d = !0, e = !1), void 0 === e && (d = !1, e = !0); + var f = !1; + e && (f = !0), this._cache.sound[a] = { + url: b, + data: c, + isDecoding: !1, + decoded: f, + webAudio: d, + audioTag: e, + locked: this.game.sound.touchLocked + }, this._resolveURL(b, this._cache.sound[a]) + }, + addText: function(a, b, c) { + this._cache.text[a] = { + url: b, + data: c + }, this._resolveURL(b, this._cache.text[a]) + }, + addPhysicsData: function(a, b, c, d) { + this._cache.physics[a] = { + url: b, + data: c, + format: d + }, this._resolveURL(b, this._cache.physics[a]) + }, + addTilemap: function(a, b, c, d) { + this._cache.tilemap[a] = { + url: b, + data: c, + format: d + }, this._resolveURL(b, this._cache.tilemap[a]) + }, + addBinary: function(a, b) { + this._cache.binary[a] = b + }, + addBitmapData: function(a, b, d) { + return b.key = a, void 0 === d && (d = new c.FrameData, d.addFrame(b.textureFrame)), this._cache.bitmapData[a] = { + data: b, + frameData: d + }, b + }, + addBitmapFont: function(a, b, d, e, f, g, h) { + var i = { + url: b, + data: d, + font: null, + base: new PIXI.BaseTexture(d) + }; + void 0 === g && (g = 0), void 0 === h && (h = 0), "json" === f ? i.font = c.LoaderParser.jsonBitmapFont(e, i.base, g, h) : i.font = c.LoaderParser.xmlBitmapFont(e, i.base, g, h), this._cache.bitmapFont[a] = i, this._resolveURL(b, i) + }, + addJSON: function(a, b, c) { + this._cache.json[a] = { + url: b, + data: c + }, this._resolveURL(b, this._cache.json[a]) + }, + addXML: function(a, b, c) { + this._cache.xml[a] = { + url: b, + data: c + }, this._resolveURL(b, this._cache.xml[a]) + }, + addVideo: function(a, b, c, d) { + this._cache.video[a] = { + url: b, + data: c, + isBlob: d, + locked: !0 + }, this._resolveURL(b, this._cache.video[a]) + }, + addShader: function(a, b, c) { + this._cache.shader[a] = { + url: b, + data: c + }, this._resolveURL(b, this._cache.shader[a]) + }, + addRenderTexture: function(a, b) { + this._cache.renderTexture[a] = { + texture: b, + frame: new c.Frame(0, 0, 0, b.width, b.height, "", "") + } + }, + addSpriteSheet: function(a, b, d, e, f, g, h, i) { + void 0 === g && (g = -1), void 0 === h && (h = 0), void 0 === i && (i = 0); + var j = { + key: a, + url: b, + data: d, + frameWidth: e, + frameHeight: f, + margin: h, + spacing: i, + base: new PIXI.BaseTexture(d), + frameData: c.AnimationParser.spriteSheet(this.game, d, e, f, g, h, i) + }; + this._cache.image[a] = j, this._resolveURL(b, j) + }, + addTextureAtlas: function(a, b, d, e, f) { + var g = { + key: a, + url: b, + data: d, + base: new PIXI.BaseTexture(d) + }; + f === c.Loader.TEXTURE_ATLAS_XML_STARLING ? g.frameData = c.AnimationParser.XMLData(this.game, e, a) : f === c.Loader.TEXTURE_ATLAS_JSON_PYXEL ? g.frameData = c.AnimationParser.JSONDataPyxel(this.game, e, a) : Array.isArray(e.frames) ? g.frameData = c.AnimationParser.JSONData(this.game, e, a) : g.frameData = c.AnimationParser.JSONDataHash(this.game, e, a), this._cache.image[a] = g, this._resolveURL(b, g) + }, + reloadSound: function(a) { + var b = this, + c = this.getSound(a); + c && (c.data.src = c.url, c.data.addEventListener("canplaythrough", function() { + return b.reloadSoundComplete(a) + }, !1), c.data.load()) + }, + reloadSoundComplete: function(a) { + var b = this.getSound(a); + b && (b.locked = !1, this.onSoundUnlock.dispatch(a)) + }, + updateSound: function(a, b, c) { + var d = this.getSound(a); + d && (d[b] = c) + }, + decodedSound: function(a, b) { + var c = this.getSound(a); + c.data = b, c.decoded = !0, c.isDecoding = !1 + }, + isSoundDecoded: function(a) { + var b = this.getItem(a, c.Cache.SOUND, "isSoundDecoded"); + if (b) return b.decoded + }, + isSoundReady: function(a) { + var b = this.getItem(a, c.Cache.SOUND, "isSoundDecoded"); + if (b) return b.decoded && !this.game.sound.touchLocked + }, + checkKey: function(a, b) { + return !!this._cacheMap[a][b] + }, + checkURL: function(a) { + return !!this._urlMap[this._resolveURL(a)] + }, + checkCanvasKey: function(a) { + return this.checkKey(c.Cache.CANVAS, a) + }, + checkImageKey: function(a) { + return this.checkKey(c.Cache.IMAGE, a) + }, + checkTextureKey: function(a) { + return this.checkKey(c.Cache.TEXTURE, a) + }, + checkSoundKey: function(a) { + return this.checkKey(c.Cache.SOUND, a) + }, + checkTextKey: function(a) { + return this.checkKey(c.Cache.TEXT, a) + }, + checkPhysicsKey: function(a) { + return this.checkKey(c.Cache.PHYSICS, a) + }, + checkTilemapKey: function(a) { + return this.checkKey(c.Cache.TILEMAP, a) + }, + checkBinaryKey: function(a) { + return this.checkKey(c.Cache.BINARY, a) + }, + checkBitmapDataKey: function(a) { + return this.checkKey(c.Cache.BITMAPDATA, a) + }, + checkBitmapFontKey: function(a) { + return this.checkKey(c.Cache.BITMAPFONT, a) + }, + checkJSONKey: function(a) { + return this.checkKey(c.Cache.JSON, a) + }, + checkXMLKey: function(a) { + return this.checkKey(c.Cache.XML, a) + }, + checkVideoKey: function(a) { + return this.checkKey(c.Cache.VIDEO, a) + }, + checkShaderKey: function(a) { + return this.checkKey(c.Cache.SHADER, a) + }, + checkRenderTextureKey: function(a) { + return this.checkKey(c.Cache.RENDER_TEXTURE, a) + }, + getItem: function(a, b, c, d) { + return this.checkKey(b, a) ? void 0 === d ? this._cacheMap[b][a] : this._cacheMap[b][a][d] : (c && console.warn("Phaser.Cache." + c + ': Key "' + a + '" not found in Cache.'), null) + }, + getCanvas: function(a) { + return this.getItem(a, c.Cache.CANVAS, "getCanvas", "canvas") + }, + getImage: function(a, b) { + void 0 !== a && null !== a || (a = "__default"), void 0 === b && (b = !1); + var d = this.getItem(a, c.Cache.IMAGE, "getImage"); + return null === d && (d = this.getItem("__missing", c.Cache.IMAGE, "getImage")), b ? d : d.data + }, + getTextureFrame: function(a) { + return this.getItem(a, c.Cache.TEXTURE, "getTextureFrame", "frame") + }, + getSound: function(a) { + return this.getItem(a, c.Cache.SOUND, "getSound") + }, + getSoundData: function(a) { + return this.getItem(a, c.Cache.SOUND, "getSoundData", "data") + }, + getText: function(a) { + return this.getItem(a, c.Cache.TEXT, "getText", "data") + }, + getPhysicsData: function(a, b, d) { + var e = this.getItem(a, c.Cache.PHYSICS, "getPhysicsData", "data"); + if (null === e || void 0 === b || null === b) return e; + if (e[b]) { + var f = e[b]; + if (!f || !d) return f; + for (var g in f) + if (g = f[g], g.fixtureKey === d) return g; + console.warn('Phaser.Cache.getPhysicsData: Could not find given fixtureKey: "' + d + " in " + a + '"') + } else console.warn('Phaser.Cache.getPhysicsData: Invalid key/object: "' + a + " / " + b + '"'); + return null + }, + getTilemapData: function(a) { + return this.getItem(a, c.Cache.TILEMAP, "getTilemapData") + }, + getBinary: function(a) { + return this.getItem(a, c.Cache.BINARY, "getBinary") + }, + getBitmapData: function(a) { + return this.getItem(a, c.Cache.BITMAPDATA, "getBitmapData", "data") + }, + getBitmapFont: function(a) { + return this.getItem(a, c.Cache.BITMAPFONT, "getBitmapFont") + }, + getJSON: function(a, b) { + var d = this.getItem(a, c.Cache.JSON, "getJSON", "data"); + return d ? b ? c.Utils.extend(!0, Array.isArray(d) ? [] : {}, d) : d : null + }, + getXML: function(a) { + return this.getItem(a, c.Cache.XML, "getXML", "data") + }, + getVideo: function(a) { + return this.getItem(a, c.Cache.VIDEO, "getVideo") + }, + getShader: function(a) { + return this.getItem(a, c.Cache.SHADER, "getShader", "data") + }, + getRenderTexture: function(a) { + return this.getItem(a, c.Cache.RENDER_TEXTURE, "getRenderTexture") + }, + getBaseTexture: function(a, b) { + return void 0 === b && (b = c.Cache.IMAGE), this.getItem(a, b, "getBaseTexture", "base") + }, + getFrame: function(a, b) { + return void 0 === b && (b = c.Cache.IMAGE), this.getItem(a, b, "getFrame", "frame") + }, + getFrameCount: function(a, b) { + var c = this.getFrameData(a, b); + return c ? c.total : 0 + }, + getFrameData: function(a, b) { + return void 0 === b && (b = c.Cache.IMAGE), this.getItem(a, b, "getFrameData", "frameData") + }, + hasFrameData: function(a, b) { + return void 0 === b && (b = c.Cache.IMAGE), null !== this.getItem(a, b, "", "frameData") + }, + updateFrameData: function(a, b, d) { + void 0 === d && (d = c.Cache.IMAGE), this._cacheMap[d][a] && (this._cacheMap[d][a].frameData = b) + }, + getFrameByIndex: function(a, b, c) { + var d = this.getFrameData(a, c); + return d ? d.getFrame(b) : null + }, + getFrameByName: function(a, b, c) { + var d = this.getFrameData(a, c); + return d ? d.getFrameByName(b) : null + }, + getURL: function(a) { + var a = this._resolveURL(a); + return a ? this._urlMap[a] : (console.warn('Phaser.Cache.getUrl: Invalid url: "' + a + '" or Cache.autoResolveURL was false'), null) + }, + getKeys: function(a) { + void 0 === a && (a = c.Cache.IMAGE); + var b = []; + if (this._cacheMap[a]) + for (var d in this._cacheMap[a]) "__default" !== d && "__missing" !== d && b.push(d); + return b + }, + removeCanvas: function(a) { + delete this._cache.canvas[a] + }, + removeImage: function(a, b) { + void 0 === b && (b = !0); + var c = this.getImage(a, !0); + b && c.base && c.base.destroy(), delete this._cache.image[a] + }, + removeSound: function(a) { + delete this._cache.sound[a] + }, + removeText: function(a) { + delete this._cache.text[a] + }, + removePhysics: function(a) { + delete this._cache.physics[a] + }, + removeTilemap: function(a) { + delete this._cache.tilemap[a] + }, + removeBinary: function(a) { + delete this._cache.binary[a] + }, + removeBitmapData: function(a) { + delete this._cache.bitmapData[a] + }, + removeBitmapFont: function(a) { + delete this._cache.bitmapFont[a] + }, + removeJSON: function(a) { + delete this._cache.json[a] + }, + removeXML: function(a) { + delete this._cache.xml[a] + }, + removeVideo: function(a) { + delete this._cache.video[a] + }, + removeShader: function(a) { + delete this._cache.shader[a] + }, + removeRenderTexture: function(a) { + delete this._cache.renderTexture[a] + }, + removeSpriteSheet: function(a) { + delete this._cache.spriteSheet[a] + }, + removeTextureAtlas: function(a) { + delete this._cache.atlas[a] + }, + clearGLTextures: function() { + for (var a in this._cache.image) this._cache.image[a].base._glTextures = [] + }, + _resolveURL: function(a, b) { + return this.autoResolveURL ? (this._urlResolver.src = this.game.load.baseURL + a, this._urlTemp = this._urlResolver.src, this._urlResolver.src = "", b && (this._urlMap[this._urlTemp] = b), this._urlTemp) : null + }, + destroy: function() { + for (var a = 0; a < this._cacheMap.length; a++) { + var b = this._cacheMap[a]; + for (var c in b) "__default" !== c && "__missing" !== c && (b[c].destroy && b[c].destroy(), delete b[c]) + } + this._urlMap = null, this._urlResolver = null, this._urlTemp = null + } + }, c.Cache.prototype.constructor = c.Cache, c.Loader = function(a) { + this.game = a, this.cache = a.cache, this.resetLocked = !1, this.isLoading = !1, this.hasLoaded = !1, this.preloadSprite = null, this.crossOrigin = !1, this.baseURL = "", this.path = "", this.headers = { + requestedWith: !1, + json: "application/json", + xml: "application/xml" + }, this.onLoadStart = new c.Signal, this.onLoadComplete = new c.Signal, this.onPackComplete = new c.Signal, this.onFileStart = new c.Signal, this.onFileComplete = new c.Signal, this.onFileError = new c.Signal, this.useXDomainRequest = !1, this._warnedAboutXDomainRequest = !1, this.enableParallel = !0, this.maxParallelDownloads = 4, this._withSyncPointDepth = 0, this._fileList = [], this._flightQueue = [], this._processingHead = 0, this._fileLoadStarted = !1, this._totalPackCount = 0, this._totalFileCount = 0, this._loadedPackCount = 0, this._loadedFileCount = 0 + }, c.Loader.TEXTURE_ATLAS_JSON_ARRAY = 0, c.Loader.TEXTURE_ATLAS_JSON_HASH = 1, c.Loader.TEXTURE_ATLAS_XML_STARLING = 2, c.Loader.PHYSICS_LIME_CORONA_JSON = 3, c.Loader.PHYSICS_PHASER_JSON = 4, c.Loader.TEXTURE_ATLAS_JSON_PYXEL = 5, c.Loader.prototype = { + setPreloadSprite: function(a, b) { + b = b || 0, this.preloadSprite = { + sprite: a, + direction: b, + width: a.width, + height: a.height, + rect: null + }, 0 === b ? this.preloadSprite.rect = new c.Rectangle(0, 0, 1, a.height) : this.preloadSprite.rect = new c.Rectangle(0, 0, a.width, 1), a.crop(this.preloadSprite.rect), a.visible = !0 + }, + resize: function() { + this.preloadSprite && this.preloadSprite.height !== this.preloadSprite.sprite.height && (this.preloadSprite.rect.height = this.preloadSprite.sprite.height) + }, + checkKeyExists: function(a, b) { + return this.getAssetIndex(a, b) > -1 + }, + getAssetIndex: function(a, b) { + for (var c = -1, d = 0; d < this._fileList.length; d++) { + var e = this._fileList[d]; + if (e.type === a && e.key === b && (c = d, !e.loaded && !e.loading)) break + } + return c + }, + getAsset: function(a, b) { + var c = this.getAssetIndex(a, b); + return c > -1 && { + index: c, + file: this._fileList[c] + } + }, + reset: function(a, b) { + void 0 === b && (b = !1), this.resetLocked || (a && (this.preloadSprite = null), this.isLoading = !1, this._processingHead = 0, this._fileList.length = 0, this._flightQueue.length = 0, this._fileLoadStarted = !1, this._totalFileCount = 0, this._totalPackCount = 0, this._loadedPackCount = 0, this._loadedFileCount = 0, b && (this.onLoadStart.removeAll(), this.onLoadComplete.removeAll(), this.onPackComplete.removeAll(), this.onFileStart.removeAll(), this.onFileComplete.removeAll(), this.onFileError.removeAll())) + }, + addToFileList: function(a, b, c, d, e, f) { + if (void 0 === e && (e = !1), void 0 === b || "" === b) return console.warn("Phaser.Loader: Invalid or no key given of type " + a), this; + if (void 0 === c || null === c) { + if (!f) return console.warn("Phaser.Loader: No URL given for file type: " + a + " key: " + b), this; + c = b + f + } + var g = { + type: a, + key: b, + path: this.path, + url: c, + syncPoint: this._withSyncPointDepth > 0, + data: null, + loading: !1, + loaded: !1, + error: !1 + }; + if (d) + for (var h in d) g[h] = d[h]; + var i = this.getAssetIndex(a, b); + if (e && i > -1) { + var j = this._fileList[i]; + j.loading || j.loaded ? (this._fileList.push(g), this._totalFileCount++) : this._fileList[i] = g + } else i === -1 && (this._fileList.push(g), this._totalFileCount++); + return this + }, + replaceInFileList: function(a, b, c, d) { + return this.addToFileList(a, b, c, d, !0) + }, + pack: function(a, b, c, d) { + if (void 0 === b && (b = null), void 0 === c && (c = null), void 0 === d && (d = null), !b && !c) return console.warn("Phaser.Loader.pack - Both url and data are null. One must be set."), this; + var e = { + type: "packfile", + key: a, + url: b, + path: this.path, + syncPoint: !0, + data: null, + loading: !1, + loaded: !1, + error: !1, + callbackContext: d + }; + c && ("string" == typeof c && (c = JSON.parse(c)), e.data = c || {}, e.loaded = !0); + for (var f = 0; f < this._fileList.length + 1; f++) { + var g = this._fileList[f]; + if (!g || !g.loaded && !g.loading && "packfile" !== g.type) { + this._fileList.splice(f, 0, e), this._totalPackCount++; + break + } + } + return this + }, + image: function(a, b, c) { + return this.addToFileList("image", a, b, void 0, c, ".png") + }, + images: function(a, b) { + if (Array.isArray(b)) + for (var c = 0; c < a.length; c++) this.image(a[c], b[c]); + else + for (var c = 0; c < a.length; c++) this.image(a[c]); + return this + }, + text: function(a, b, c) { + return this.addToFileList("text", a, b, void 0, c, ".txt") + }, + json: function(a, b, c) { + return this.addToFileList("json", a, b, void 0, c, ".json") + }, + shader: function(a, b, c) { + return this.addToFileList("shader", a, b, void 0, c, ".frag") + }, + xml: function(a, b, c) { + return this.addToFileList("xml", a, b, void 0, c, ".xml") + }, + script: function(a, b, c, d) { + return void 0 === c && (c = !1), c !== !1 && void 0 === d && (d = this), this.addToFileList("script", a, b, { + syncPoint: !0, + callback: c, + callbackContext: d + }, !1, ".js") + }, + binary: function(a, b, c, d) { + return void 0 === c && (c = !1), c !== !1 && void 0 === d && (d = c), this.addToFileList("binary", a, b, { + callback: c, + callbackContext: d + }, !1, ".bin") + }, + spritesheet: function(a, b, c, d, e, f, g) { + return void 0 === e && (e = -1), void 0 === f && (f = 0), void 0 === g && (g = 0), this.addToFileList("spritesheet", a, b, { + frameWidth: c, + frameHeight: d, + frameMax: e, + margin: f, + spacing: g + }, !1, ".png") + }, + audio: function(a, b, c) { + return this.game.sound.noAudio ? this : (void 0 === c && (c = !0), "string" == typeof b && (b = [b]), this.addToFileList("audio", a, b, { + buffer: null, + autoDecode: c + })) + }, + audioSprite: function(a, b, c, d, e) { + return this.game.sound.noAudio ? this : (void 0 === c && (c = null), void 0 === d && (d = null), void 0 === e && (e = !0), this.audio(a, b, e), c ? this.json(a + "-audioatlas", c) : d ? ("string" == typeof d && (d = JSON.parse(d)), this.cache.addJSON(a + "-audioatlas", "", d)) : console.warn("Phaser.Loader.audiosprite - You must specify either a jsonURL or provide a jsonData object"), this) + }, + audiosprite: function(a, b, c, d, e) { + return this.audioSprite(a, b, c, d, e) + }, + video: function(a, b, c, d) { + return void 0 === c && (c = this.game.device.firefox ? "loadeddata" : "canplaythrough"), void 0 === d && (d = !1), "string" == typeof b && (b = [b]), this.addToFileList("video", a, b, { + buffer: null, + asBlob: d, + loadEvent: c + }) + }, + tilemap: function(a, b, d, e) { + if (void 0 === b && (b = null), void 0 === d && (d = null), void 0 === e && (e = c.Tilemap.CSV), b || d || (b = e === c.Tilemap.CSV ? a + ".csv" : a + ".json"), d) { + switch (e) { + case c.Tilemap.CSV: + break; + case c.Tilemap.TILED_JSON: + "string" == typeof d && (d = JSON.parse(d)) + } + this.cache.addTilemap(a, null, d, e) + } else this.addToFileList("tilemap", a, b, { + format: e + }); + return this + }, + physics: function(a, b, d, e) { + return void 0 === b && (b = null), void 0 === d && (d = null), void 0 === e && (e = c.Physics.LIME_CORONA_JSON), b || d || (b = a + ".json"), d ? ("string" == typeof d && (d = JSON.parse(d)), this.cache.addPhysicsData(a, null, d, e)) : this.addToFileList("physics", a, b, { + format: e + }), this + }, + bitmapFont: function(a, b, c, d, e, f) { + if (void 0 !== b && null !== b || (b = a + ".png"), void 0 === c && (c = null), void 0 === d && (d = null), null === c && null === d && (c = a + ".xml"), void 0 === e && (e = 0), void 0 === f && (f = 0), c) this.addToFileList("bitmapfont", a, b, { + atlasURL: c, + xSpacing: e, + ySpacing: f + }); + else if ("string" == typeof d) { + var g, h; + try { + g = JSON.parse(d) + } catch (a) { + h = this.parseXml(d) + } + if (!h && !g) throw new Error("Phaser.Loader. Invalid Bitmap Font atlas given"); + this.addToFileList("bitmapfont", a, b, { + atlasURL: null, + atlasData: g || h, + atlasType: g ? "json" : "xml", + xSpacing: e, + ySpacing: f + }) + } + return this + }, + atlasJSONArray: function(a, b, d, e) { + return this.atlas(a, b, d, e, c.Loader.TEXTURE_ATLAS_JSON_ARRAY) + }, + atlasJSONHash: function(a, b, d, e) { + return this.atlas(a, b, d, e, c.Loader.TEXTURE_ATLAS_JSON_HASH) + }, + atlasXML: function(a, b, d, e) { + return void 0 === d && (d = null), void 0 === e && (e = null), d || e || (d = a + ".xml"), this.atlas(a, b, d, e, c.Loader.TEXTURE_ATLAS_XML_STARLING) + }, + atlas: function(a, b, d, e, f) { + if (void 0 !== b && null !== b || (b = a + ".png"), void 0 === d && (d = null), void 0 === e && (e = null), void 0 === f && (f = c.Loader.TEXTURE_ATLAS_JSON_ARRAY), d || e || (d = f === c.Loader.TEXTURE_ATLAS_XML_STARLING ? a + ".xml" : a + ".json"), d) this.addToFileList("textureatlas", a, b, { + atlasURL: d, + format: f + }); + else { + switch (f) { + case c.Loader.TEXTURE_ATLAS_JSON_ARRAY: + "string" == typeof e && (e = JSON.parse(e)); + break; + case c.Loader.TEXTURE_ATLAS_XML_STARLING: + if ("string" == typeof e) { + var g = this.parseXml(e); + if (!g) throw new Error("Phaser.Loader. Invalid Texture Atlas XML given"); + e = g + } + } + this.addToFileList("textureatlas", a, b, { + atlasURL: null, + atlasData: e, + format: f + }) + } + return this + }, + withSyncPoint: function(a, b) { + this._withSyncPointDepth++; + try { + a.call(b || this, this) + } finally { + this._withSyncPointDepth-- + } + return this + }, + addSyncPoint: function(a, b) { + var c = this.getAsset(a, b); + return c && (c.file.syncPoint = !0), this + }, + removeFile: function(a, b) { + var c = this.getAsset(a, b); + c && (c.loaded || c.loading || this._fileList.splice(c.index, 1)) + }, + removeAll: function() { + this._fileList.length = 0, this._flightQueue.length = 0 + }, + start: function() { + this.isLoading || (this.hasLoaded = !1, this.isLoading = !0, this.updateProgress(), this.processLoadQueue()) + }, + processLoadQueue: function() { + if (!this.isLoading) return console.warn("Phaser.Loader - active loading canceled / reset"), void this.finishedLoading(!0); + for (var a = 0; a < this._flightQueue.length; a++) { + var b = this._flightQueue[a]; + (b.loaded || b.error) && (this._flightQueue.splice(a, 1), a--, b.loading = !1, b.requestUrl = null, b.requestObject = null, b.error && this.onFileError.dispatch(b.key, b), "packfile" !== b.type ? (this._loadedFileCount++, this.onFileComplete.dispatch(this.progress, b.key, !b.error, this._loadedFileCount, this._totalFileCount)) : "packfile" === b.type && b.error && (this._loadedPackCount++, this.onPackComplete.dispatch(b.key, !b.error, this._loadedPackCount, this._totalPackCount))) + } + for (var d = !1, e = this.enableParallel ? c.Math.clamp(this.maxParallelDownloads, 1, 12) : 1, a = this._processingHead; a < this._fileList.length; a++) { + var b = this._fileList[a]; + if ("packfile" === b.type && !b.error && b.loaded && a === this._processingHead && (this.processPack(b), this._loadedPackCount++, this.onPackComplete.dispatch(b.key, !b.error, this._loadedPackCount, this._totalPackCount)), b.loaded || b.error ? a === this._processingHead && (this._processingHead = a + 1) : !b.loading && this._flightQueue.length < e && ("packfile" !== b.type || b.data ? d || (this._fileLoadStarted || (this._fileLoadStarted = !0, this.onLoadStart.dispatch()), this._flightQueue.push(b), b.loading = !0, this.onFileStart.dispatch(this.progress, b.key, b.url), this.loadFile(b)) : (this._flightQueue.push(b), b.loading = !0, this.loadFile(b))), !b.loaded && b.syncPoint && (d = !0), this._flightQueue.length >= e || d && this._loadedPackCount === this._totalPackCount) break + } + if (this.updateProgress(), this._processingHead >= this._fileList.length) this.finishedLoading(); + else if (!this._flightQueue.length) { + console.warn("Phaser.Loader - aborting: processing queue empty, loading may have stalled"); + var f = this; + setTimeout(function() { + f.finishedLoading(!0) + }, 2e3) + } + }, + finishedLoading: function(a) { + this.hasLoaded || (this.hasLoaded = !0, this.isLoading = !1, a || this._fileLoadStarted || (this._fileLoadStarted = !0, this.onLoadStart.dispatch()), this.onLoadComplete.dispatch(), this.game.state.loadComplete(), this.reset()) + }, + asyncComplete: function(a, b) { + void 0 === b && (b = ""), a.loaded = !0, a.error = !!b, b && (a.errorMessage = b, console.warn("Phaser.Loader - " + a.type + "[" + a.key + "]: " + b)), this.processLoadQueue() + }, + processPack: function(a) { + var b = a.data[a.key]; + if (!b) return void console.warn("Phaser.Loader - " + a.key + ": pack has data, but not for pack key"); + for (var d = 0; d < b.length; d++) { + var e = b[d]; + switch (e.type) { + case "image": + this.image(e.key, e.url, e.overwrite); + break; + case "text": + this.text(e.key, e.url, e.overwrite); + break; + case "json": + this.json(e.key, e.url, e.overwrite); + break; + case "xml": + this.xml(e.key, e.url, e.overwrite); + break; + case "script": + this.script(e.key, e.url, e.callback, a.callbackContext || this); + break; + case "binary": + this.binary(e.key, e.url, e.callback, a.callbackContext || this); + break; + case "spritesheet": + this.spritesheet(e.key, e.url, e.frameWidth, e.frameHeight, e.frameMax, e.margin, e.spacing); + break; + case "video": + this.video(e.key, e.urls); + break; + case "audio": + this.audio(e.key, e.urls, e.autoDecode); + break; + case "audiosprite": + this.audiosprite(e.key, e.urls, e.jsonURL, e.jsonData, e.autoDecode); + break; + case "tilemap": + this.tilemap(e.key, e.url, e.data, c.Tilemap[e.format]); + break; + case "physics": + this.physics(e.key, e.url, e.data, c.Loader[e.format]); + break; + case "bitmapFont": + this.bitmapFont(e.key, e.textureURL, e.atlasURL, e.atlasData, e.xSpacing, e.ySpacing); + break; + case "atlasJSONArray": + this.atlasJSONArray(e.key, e.textureURL, e.atlasURL, e.atlasData); + break; + case "atlasJSONHash": + this.atlasJSONHash(e.key, e.textureURL, e.atlasURL, e.atlasData); + break; + case "atlasXML": + this.atlasXML(e.key, e.textureURL, e.atlasURL, e.atlasData); + break; + case "atlas": + this.atlas(e.key, e.textureURL, e.atlasURL, e.atlasData, c.Loader[e.format]); + break; + case "shader": + this.shader(e.key, e.url, e.overwrite) + } + } + }, + transformUrl: function(a, b) { + return !!a && (a.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/) ? a : this.baseURL + b.path + a) + }, + loadFile: function(a) { + switch (a.type) { + case "packfile": + this.xhrLoad(a, this.transformUrl(a.url, a), "text", this.fileComplete); + break; + case "image": + case "spritesheet": + case "textureatlas": + case "bitmapfont": + this.loadImageTag(a); + break; + case "audio": + a.url = this.getAudioURL(a.url), a.url ? this.game.sound.usingWebAudio ? this.xhrLoad(a, this.transformUrl(a.url, a), "arraybuffer", this.fileComplete) : this.game.sound.usingAudioTag && this.loadAudioTag(a) : this.fileError(a, null, "No supported audio URL specified or device does not have audio playback support"); + break; + case "video": + a.url = this.getVideoURL(a.url), a.url ? a.asBlob ? this.xhrLoad(a, this.transformUrl(a.url, a), "blob", this.fileComplete) : this.loadVideoTag(a) : this.fileError(a, null, "No supported video URL specified or device does not have video playback support"); + break; + case "json": + this.xhrLoad(a, this.transformUrl(a.url, a), "text", this.jsonLoadComplete); + break; + case "xml": + this.xhrLoad(a, this.transformUrl(a.url, a), "text", this.xmlLoadComplete); + break; + case "tilemap": + a.format === c.Tilemap.TILED_JSON ? this.xhrLoad(a, this.transformUrl(a.url, a), "text", this.jsonLoadComplete) : a.format === c.Tilemap.CSV ? this.xhrLoad(a, this.transformUrl(a.url, a), "text", this.csvLoadComplete) : this.asyncComplete(a, "invalid Tilemap format: " + a.format); + break; + case "text": + case "script": + case "shader": + case "physics": + this.xhrLoad(a, this.transformUrl(a.url, a), "text", this.fileComplete); + break; + case "binary": + this.xhrLoad(a, this.transformUrl(a.url, a), "arraybuffer", this.fileComplete) + } + }, + loadImageTag: function(a) { + var b = this; + a.data = new Image, a.data.name = a.key, this.crossOrigin && (a.data.crossOrigin = this.crossOrigin), a.data.onload = function() { + a.data.onload && (a.data.onload = null, a.data.onerror = null, b.fileComplete(a)) + }, a.data.onerror = function() { + a.data.onload && (a.data.onload = null, a.data.onerror = null, b.fileError(a)) + }, a.data.src = this.transformUrl(a.url, a), a.data.complete && a.data.width && a.data.height && (a.data.onload = null, a.data.onerror = null, this.fileComplete(a)) + }, + loadVideoTag: function(a) { + var b = this; + a.data = document.createElement("video"), a.data.name = a.key, a.data.controls = !1, a.data.autoplay = !1; + var d = function() { + a.data.removeEventListener(a.loadEvent, d, !1), a.data.onerror = null, a.data.canplay = !0, c.GAMES[b.game.id].load.fileComplete(a) + }; + a.data.onerror = function() { + a.data.removeEventListener(a.loadEvent, d, !1), a.data.onerror = null, a.data.canplay = !1, b.fileError(a) + }, a.data.addEventListener(a.loadEvent, d, !1), a.data.src = this.transformUrl(a.url, a), a.data.load() + }, + loadAudioTag: function(a) { + var b = this; + if (this.game.sound.touchLocked) a.data = new Audio, a.data.name = a.key, a.data.preload = "auto", a.data.src = this.transformUrl(a.url, a), this.fileComplete(a); + else { + a.data = new Audio, a.data.name = a.key; + var c = function() { + a.data.removeEventListener("canplaythrough", c, !1), a.data.onerror = null, b.fileComplete(a) + }; + a.data.onerror = function() { + a.data.removeEventListener("canplaythrough", c, !1), a.data.onerror = null, b.fileError(a) + }, a.data.preload = "auto", a.data.src = this.transformUrl(a.url, a), a.data.addEventListener("canplaythrough", c, !1), a.data.load() + } + }, + xhrLoad: function(a, b, c, d, e) { + if (this.useXDomainRequest && window.XDomainRequest) return void this.xhrLoadWithXDR(a, b, c, d, e); + var f = new XMLHttpRequest; + f.open("GET", b, !0), f.responseType = c, this.headers.requestedWith !== !1 && f.setRequestHeader("X-Requested-With", this.headers.requestedWith), this.headers[a.type] && f.setRequestHeader("Accept", this.headers[a.type]), e = e || this.fileError; + var g = this; + f.onload = function() { + try { + return 4 === f.readyState && f.status >= 400 && f.status <= 599 ? e.call(g, a, f) : d.call(g, a, f) + } catch (b) { + g.hasLoaded ? window.console && console.error(b) : g.asyncComplete(a, b.message || "Exception") + } + }, f.onerror = function() { + try { + return e.call(g, a, f) + } catch (b) { + g.hasLoaded ? window.console && console.error(b) : g.asyncComplete(a, b.message || "Exception") + } + }, a.requestObject = f, a.requestUrl = b, f.send() + }, + xhrLoadWithXDR: function(a, b, c, d, e) { + this._warnedAboutXDomainRequest || this.game.device.ie && !(this.game.device.ieVersion >= 10) || (this._warnedAboutXDomainRequest = !0, console.warn("Phaser.Loader - using XDomainRequest outside of IE 9")); + var f = new window.XDomainRequest; + f.open("GET", b, !0), f.responseType = c, f.timeout = 3e3, e = e || this.fileError; + var g = this; + f.onerror = function() { + try { + return e.call(g, a, f) + } catch (b) { + g.asyncComplete(a, b.message || "Exception") + } + }, f.ontimeout = function() { + try { + return e.call(g, a, f) + } catch (b) { + g.asyncComplete(a, b.message || "Exception") + } + }, f.onprogress = function() {}, f.onload = function() { + try { + return 4 === f.readyState && f.status >= 400 && f.status <= 599 ? e.call(g, a, f) : d.call(g, a, f) + } catch (b) { + g.asyncComplete(a, b.message || "Exception") + } + }, a.requestObject = f, a.requestUrl = b, setTimeout(function() { + f.send() + }, 0) + }, + getVideoURL: function(a) { + for (var b = 0; b < a.length; b++) { + var c, d = a[b]; + if (d.uri) { + if (c = d.type, d = d.uri, this.game.device.canPlayVideo(c)) return d + } else { + if (0 === d.indexOf("blob:") || 0 === d.indexOf("data:")) return d; + d.indexOf("?") >= 0 && (d = d.substr(0, d.indexOf("?"))); + var e = d.substr((Math.max(0, d.lastIndexOf(".")) || 1 / 0) + 1); + if (c = e.toLowerCase(), this.game.device.canPlayVideo(c)) return a[b] + } + } + return null + }, + getAudioURL: function(a) { + if (this.game.sound.noAudio) return null; + for (var b = 0; b < a.length; b++) { + var c, d = a[b]; + if (d.uri) { + if (c = d.type, d = d.uri, this.game.device.canPlayAudio(c)) return d + } else { + if (0 === d.indexOf("blob:") || 0 === d.indexOf("data:")) return d; + d.indexOf("?") >= 0 && (d = d.substr(0, d.indexOf("?"))); + var e = d.substr((Math.max(0, d.lastIndexOf(".")) || 1 / 0) + 1); + if (c = e.toLowerCase(), this.game.device.canPlayAudio(c)) return a[b] + } + } + return null + }, + fileError: function(a, b, c) { + var d = a.requestUrl || this.transformUrl(a.url, a), + e = "error loading asset from URL " + d; + !c && b && (c = b.status), c && (e = e + " (" + c + ")"), this.asyncComplete(a, e) + }, + fileComplete: function(a, b) { + var d = !0; + switch (a.type) { + case "packfile": + var e = JSON.parse(b.responseText); + a.data = e || {}; + break; + case "image": + this.cache.addImage(a.key, a.url, a.data); + break; + case "spritesheet": + this.cache.addSpriteSheet(a.key, a.url, a.data, a.frameWidth, a.frameHeight, a.frameMax, a.margin, a.spacing); + break; + case "textureatlas": + if (null == a.atlasURL) this.cache.addTextureAtlas(a.key, a.url, a.data, a.atlasData, a.format); + else if (d = !1, a.format === c.Loader.TEXTURE_ATLAS_JSON_ARRAY || a.format === c.Loader.TEXTURE_ATLAS_JSON_HASH || a.format === c.Loader.TEXTURE_ATLAS_JSON_PYXEL) this.xhrLoad(a, this.transformUrl(a.atlasURL, a), "text", this.jsonLoadComplete); + else { + if (a.format !== c.Loader.TEXTURE_ATLAS_XML_STARLING) throw new Error("Phaser.Loader. Invalid Texture Atlas format: " + a.format); + this.xhrLoad(a, this.transformUrl(a.atlasURL, a), "text", this.xmlLoadComplete) + } + break; + case "bitmapfont": + a.atlasURL ? (d = !1, this.xhrLoad(a, this.transformUrl(a.atlasURL, a), "text", function(a, b) { + var c; + try { + c = JSON.parse(b.responseText) + } catch (a) {} + c ? (a.atlasType = "json", this.jsonLoadComplete(a, b)) : (a.atlasType = "xml", this.xmlLoadComplete(a, b)) + })) : this.cache.addBitmapFont(a.key, a.url, a.data, a.atlasData, a.atlasType, a.xSpacing, a.ySpacing); + break; + case "video": + if (a.asBlob) try { + a.data = b.response + } catch (b) { + throw new Error("Phaser.Loader. Unable to parse video file as Blob: " + a.key) + } + this.cache.addVideo(a.key, a.url, a.data, a.asBlob); + break; + case "audio": + this.game.sound.usingWebAudio ? (a.data = b.response, this.cache.addSound(a.key, a.url, a.data, !0, !1), a.autoDecode && this.game.sound.decode(a.key)) : this.cache.addSound(a.key, a.url, a.data, !1, !0); + break; + case "text": + a.data = b.responseText, this.cache.addText(a.key, a.url, a.data); + break; + case "shader": + a.data = b.responseText, this.cache.addShader(a.key, a.url, a.data); + break; + case "physics": + var e = JSON.parse(b.responseText); + this.cache.addPhysicsData(a.key, a.url, e, a.format); + break; + case "script": + a.data = document.createElement("script"), a.data.language = "javascript", a.data.type = "text/javascript", a.data.defer = !1, a.data.text = b.responseText, document.head.appendChild(a.data), a.callback && (a.data = a.callback.call(a.callbackContext, a.key, b.responseText)); + break; + case "binary": + a.callback ? a.data = a.callback.call(a.callbackContext, a.key, b.response) : a.data = b.response, this.cache.addBinary(a.key, a.data) + } + d && this.asyncComplete(a) + }, + jsonLoadComplete: function(a, b) { + var c = JSON.parse(b.responseText); + "tilemap" === a.type ? this.cache.addTilemap(a.key, a.url, c, a.format) : "bitmapfont" === a.type ? this.cache.addBitmapFont(a.key, a.url, a.data, c, a.atlasType, a.xSpacing, a.ySpacing) : "json" === a.type ? this.cache.addJSON(a.key, a.url, c) : this.cache.addTextureAtlas(a.key, a.url, a.data, c, a.format), this.asyncComplete(a) + }, + csvLoadComplete: function(a, b) { + var c = b.responseText; + this.cache.addTilemap(a.key, a.url, c, a.format), this.asyncComplete(a) + }, + xmlLoadComplete: function(a, b) { + var c = b.responseText, + d = this.parseXml(c); + if (!d) { + var e = b.responseType || b.contentType; + return console.warn("Phaser.Loader - " + a.key + ": invalid XML (" + e + ")"), void this.asyncComplete(a, "invalid XML") + } + "bitmapfont" === a.type ? this.cache.addBitmapFont(a.key, a.url, a.data, d, a.atlasType, a.xSpacing, a.ySpacing) : "textureatlas" === a.type ? this.cache.addTextureAtlas(a.key, a.url, a.data, d, a.format) : "xml" === a.type && this.cache.addXML(a.key, a.url, d), this.asyncComplete(a) + }, + parseXml: function(a) { + var b; + try { + if (window.DOMParser) { + var c = new DOMParser; + b = c.parseFromString(a, "text/xml") + } else b = new ActiveXObject("Microsoft.XMLDOM"), b.async = "false", b.loadXML(a) + } catch (a) { + b = null + } + return b && b.documentElement && !b.getElementsByTagName("parsererror").length ? b : null + }, + updateProgress: function() { + this.preloadSprite && (0 === this.preloadSprite.direction ? this.preloadSprite.rect.width = Math.floor(this.preloadSprite.width / 100 * this.progress) : this.preloadSprite.rect.height = Math.floor(this.preloadSprite.height / 100 * this.progress), this.preloadSprite.sprite ? this.preloadSprite.sprite.updateCrop() : this.preloadSprite = null) + }, + totalLoadedFiles: function() { + return this._loadedFileCount + }, + totalQueuedFiles: function() { + return this._totalFileCount - this._loadedFileCount + }, + totalLoadedPacks: function() { + return this._totalPackCount + }, + totalQueuedPacks: function() { + return this._totalPackCount - this._loadedPackCount + } + }, Object.defineProperty(c.Loader.prototype, "progressFloat", { + get: function() { + var a = this._loadedFileCount / this._totalFileCount * 100; + return c.Math.clamp(a || 0, 0, 100) + } + }), Object.defineProperty(c.Loader.prototype, "progress", { + get: function() { + return Math.round(this.progressFloat) + } + }), c.Loader.prototype.constructor = c.Loader, c.LoaderParser = { + bitmapFont: function(a, b, c, d) { + return this.xmlBitmapFont(a, b, c, d) + }, + xmlBitmapFont: function(a, b, c, d) { + var e = {}, + f = a.getElementsByTagName("info")[0], + g = a.getElementsByTagName("common")[0]; + e.font = f.getAttribute("face"), e.size = parseInt(f.getAttribute("size"), 10), e.lineHeight = parseInt(g.getAttribute("lineHeight"), 10) + d, e.chars = {}; + for (var h = a.getElementsByTagName("char"), i = 0; i < h.length; i++) { + var j = parseInt(h[i].getAttribute("id"), 10); + e.chars[j] = { + x: parseInt(h[i].getAttribute("x"), 10), + y: parseInt(h[i].getAttribute("y"), 10), + width: parseInt(h[i].getAttribute("width"), 10), + height: parseInt(h[i].getAttribute("height"), 10), + xOffset: parseInt(h[i].getAttribute("xoffset"), 10), + yOffset: parseInt(h[i].getAttribute("yoffset"), 10), + xAdvance: parseInt(h[i].getAttribute("xadvance"), 10) + c, + kerning: {} + } + } + var k = a.getElementsByTagName("kerning"); + for (i = 0; i < k.length; i++) { + var l = parseInt(k[i].getAttribute("first"), 10), + m = parseInt(k[i].getAttribute("second"), 10), + n = parseInt(k[i].getAttribute("amount"), 10); + e.chars[m].kerning[l] = n; + } + return this.finalizeBitmapFont(b, e) + }, + jsonBitmapFont: function(a, b, c, d) { + var e = { + font: a.font.info._face, + size: parseInt(a.font.info._size, 10), + lineHeight: parseInt(a.font.common._lineHeight, 10) + d, + chars: {} + }; + return a.font.chars.char.forEach(function(a) { + var b = parseInt(a._id, 10); + e.chars[b] = { + x: parseInt(a._x, 10), + y: parseInt(a._y, 10), + width: parseInt(a._width, 10), + height: parseInt(a._height, 10), + xOffset: parseInt(a._xoffset, 10), + yOffset: parseInt(a._yoffset, 10), + xAdvance: parseInt(a._xadvance, 10) + c, + kerning: {} + } + }), a.font.kernings && a.font.kernings.kerning && a.font.kernings.kerning.forEach(function(a) { + e.chars[a._second].kerning[a._first] = parseInt(a._amount, 10) + }), this.finalizeBitmapFont(b, e) + }, + finalizeBitmapFont: function(a, b) { + return Object.keys(b.chars).forEach(function(d) { + var e = b.chars[d]; + e.texture = new PIXI.Texture(a, new c.Rectangle(e.x, e.y, e.width, e.height)) + }), b + } + }, c.AudioSprite = function(a, b) { + this.game = a, this.key = b, this.config = this.game.cache.getJSON(b + "-audioatlas"), this.autoplayKey = null, this.autoplay = !1, this.sounds = {}; + for (var c in this.config.spritemap) { + var d = this.config.spritemap[c], + e = this.game.add.sound(this.key); + e.addMarker(c, d.start, d.end - d.start, null, d.loop), this.sounds[c] = e + } + this.config.autoplay && (this.autoplayKey = this.config.autoplay, this.play(this.autoplayKey), this.autoplay = this.sounds[this.autoplayKey]) + }, c.AudioSprite.prototype = { + play: function(a, b) { + return void 0 === b && (b = 1), this.sounds[a].play(a, null, b) + }, + stop: function(a) { + if (a) this.sounds[a].stop(); + else + for (var b in this.sounds) this.sounds[b].stop() + }, + get: function(a) { + return this.sounds[a] + } + }, c.AudioSprite.prototype.constructor = c.AudioSprite, c.Sound = function(a, b, d, e, f) { + void 0 === d && (d = 1), void 0 === e && (e = !1), void 0 === f && (f = a.sound.connectToMaster), this.game = a, this.name = b, this.key = b, this.loop = e, this.markers = {}, this.context = null, this.autoplay = !1, this.totalDuration = 0, this.startTime = 0, this.currentTime = 0, this.duration = 0, this.durationMS = 0, this.position = 0, this.stopTime = 0, this.paused = !1, this.pausedPosition = 0, this.pausedTime = 0, this.isPlaying = !1, this.currentMarker = "", this.fadeTween = null, this.pendingPlayback = !1, this.override = !1, this.allowMultiple = !1, this.usingWebAudio = this.game.sound.usingWebAudio, this.usingAudioTag = this.game.sound.usingAudioTag, this.externalNode = null, this.masterGainNode = null, this.gainNode = null, this._sound = null, this.usingWebAudio ? (this.context = this.game.sound.context, this.masterGainNode = this.game.sound.masterGain, void 0 === this.context.createGain ? this.gainNode = this.context.createGainNode() : this.gainNode = this.context.createGain(), this.gainNode.gain.value = d * this.game.sound.volume, f && this.gainNode.connect(this.masterGainNode)) : this.usingAudioTag && (this.game.cache.getSound(b) && this.game.cache.isSoundReady(b) ? (this._sound = this.game.cache.getSoundData(b), this.totalDuration = 0, this._sound.duration && (this.totalDuration = this._sound.duration)) : this.game.cache.onSoundUnlock.add(this.soundHasUnlocked, this)), this.onDecoded = new c.Signal, this.onPlay = new c.Signal, this.onPause = new c.Signal, this.onResume = new c.Signal, this.onLoop = new c.Signal, this.onStop = new c.Signal, this.onMute = new c.Signal, this.onMarkerComplete = new c.Signal, this.onFadeComplete = new c.Signal, this._volume = d, this._buffer = null, this._muted = !1, this._tempMarker = 0, this._tempPosition = 0, this._tempVolume = 0, this._tempPause = 0, this._muteVolume = 0, this._tempLoop = 0, this._paused = !1, this._onDecodedEventDispatched = !1 + }, c.Sound.prototype = { + soundHasUnlocked: function(a) { + a === this.key && (this._sound = this.game.cache.getSoundData(this.key), this.totalDuration = this._sound.duration) + }, + addMarker: function(a, b, c, d, e) { + void 0 !== c && null !== c || (c = 1), void 0 !== d && null !== d || (d = 1), void 0 === e && (e = !1), this.markers[a] = { + name: a, + start: b, + stop: b + c, + volume: d, + duration: c, + durationMS: 1e3 * c, + loop: e + } + }, + removeMarker: function(a) { + delete this.markers[a] + }, + onEndedHandler: function() { + this._sound.onended = null, this.isPlaying = !1, this.currentTime = this.durationMS, this.stop() + }, + update: function() { + return this.game.cache.checkSoundKey(this.key) ? (this.isDecoded && !this._onDecodedEventDispatched && (this.onDecoded.dispatch(this), this._onDecodedEventDispatched = !0), this.pendingPlayback && this.game.cache.isSoundReady(this.key) && (this.pendingPlayback = !1, this.play(this._tempMarker, this._tempPosition, this._tempVolume, this._tempLoop)), void(this.isPlaying && (this.currentTime = this.game.time.time - this.startTime, this.currentTime >= this.durationMS && (this.usingWebAudio ? this.loop ? (this.onLoop.dispatch(this), this.isPlaying = !1, "" === this.currentMarker ? (this.currentTime = 0, this.startTime = this.game.time.time, this.isPlaying = !0) : (this.onMarkerComplete.dispatch(this.currentMarker, this), this.play(this.currentMarker, 0, this.volume, !0, !0))) : "" !== this.currentMarker && this.stop() : this.loop ? (this.onLoop.dispatch(this), "" === this.currentMarker && (this.currentTime = 0, this.startTime = this.game.time.time), this.isPlaying = !1, this.play(this.currentMarker, 0, this.volume, !0, !0)) : this.stop())))) : void this.destroy() + }, + loopFull: function(a) { + return this.play(null, 0, a, !0) + }, + play: function(a, b, c, d, e) { + if (void 0 !== a && a !== !1 && null !== a || (a = ""), void 0 === e && (e = !0), this.isPlaying && !this.allowMultiple && !e && !this.override) return this; + if (this._sound && this.isPlaying && !this.allowMultiple && (this.override || e)) { + if (this.usingWebAudio) { + if (void 0 === this._sound.stop) this._sound.noteOff(0); + else try { + this._sound.stop(0) + } catch (a) {} + this.externalNode ? this._sound.disconnect(this.externalNode) : this.gainNode && this._sound.disconnect(this.gainNode) + } else this.usingAudioTag && (this._sound.pause(), this._sound.currentTime = 0); + this.isPlaying = !1 + } + if ("" === a && Object.keys(this.markers).length > 0) return this; + if ("" !== a) { + if (!this.markers[a]) return console.warn("Phaser.Sound.play: audio marker " + a + " doesn't exist"), this; + this.currentMarker = a, this.position = this.markers[a].start, this.volume = this.markers[a].volume, this.loop = this.markers[a].loop, this.duration = this.markers[a].duration, this.durationMS = this.markers[a].durationMS, "undefined" != typeof c && (this.volume = c), "undefined" != typeof d && (this.loop = d), this._tempMarker = a, this._tempPosition = this.position, this._tempVolume = this.volume, this._tempLoop = this.loop + } else b = b || 0, void 0 === c && (c = this._volume), void 0 === d && (d = this.loop), this.position = Math.max(0, b), this.volume = c, this.loop = d, this.duration = 0, this.durationMS = 0, this._tempMarker = a, this._tempPosition = b, this._tempVolume = c, this._tempLoop = d; + return this.usingWebAudio ? this.game.cache.isSoundDecoded(this.key) ? (this._sound = this.context.createBufferSource(), this.externalNode ? this._sound.connect(this.externalNode) : this._sound.connect(this.gainNode), this._buffer = this.game.cache.getSoundData(this.key), this._sound.buffer = this._buffer, this.loop && "" === a && (this._sound.loop = !0), this.loop || "" !== a || (this._sound.onended = this.onEndedHandler.bind(this)), this.totalDuration = this._sound.buffer.duration, 0 === this.duration && (this.duration = this.totalDuration, this.durationMS = Math.ceil(1e3 * this.totalDuration)), void 0 === this._sound.start ? this._sound.noteGrainOn(0, this.position, this.duration) : this.loop && "" === a ? this._sound.start(0, 0) : this._sound.start(0, this.position, this.duration), this.isPlaying = !0, this.startTime = this.game.time.time, this.currentTime = 0, this.stopTime = this.startTime + this.durationMS, this.onPlay.dispatch(this)) : (this.pendingPlayback = !0, this.game.cache.getSound(this.key) && this.game.cache.getSound(this.key).isDecoding === !1 && this.game.sound.decode(this.key, this)) : this.game.cache.getSound(this.key) && this.game.cache.getSound(this.key).locked ? (this.game.cache.reloadSound(this.key), this.pendingPlayback = !0) : this._sound && (this.game.device.cocoonJS || 4 === this._sound.readyState) ? (this._sound.play(), this.totalDuration = this._sound.duration, 0 === this.duration && (this.duration = this.totalDuration, this.durationMS = 1e3 * this.totalDuration), this._sound.currentTime = this.position, this._sound.muted = this._muted, this._muted || this.game.sound.mute ? this._sound.volume = 0 : this._sound.volume = this._volume, this.isPlaying = !0, this.startTime = this.game.time.time, this.currentTime = 0, this.stopTime = this.startTime + this.durationMS, this.onPlay.dispatch(this)) : this.pendingPlayback = !0, this + }, + restart: function(a, b, c, d) { + a = a || "", b = b || 0, c = c || 1, void 0 === d && (d = !1), this.play(a, b, c, d, !0) + }, + pause: function() { + this.isPlaying && this._sound && (this.paused = !0, this.pausedPosition = this.currentTime, this.pausedTime = this.game.time.time, this._tempPause = this._sound.currentTime, this.onPause.dispatch(this), this.stop()) + }, + resume: function() { + if (this.paused && this._sound) { + if (this.usingWebAudio) { + var a = Math.max(0, this.position + this.pausedPosition / 1e3); + this._sound = this.context.createBufferSource(), this._sound.buffer = this._buffer, this.externalNode ? this._sound.connect(this.externalNode) : this._sound.connect(this.gainNode), this.loop && (this._sound.loop = !0), this.loop || "" !== this.currentMarker || (this._sound.onended = this.onEndedHandler.bind(this)); + var b = this.duration - this.pausedPosition / 1e3; + void 0 === this._sound.start ? this._sound.noteGrainOn(0, a, b) : this.loop && this.game.device.chrome ? 42 === this.game.device.chromeVersion ? this._sound.start(0) : this._sound.start(0, a) : this._sound.start(0, a, b) + } else this._sound.currentTime = this._tempPause, this._sound.play(); + this.isPlaying = !0, this.paused = !1, this.startTime += this.game.time.time - this.pausedTime, this.onResume.dispatch(this) + } + }, + stop: function() { + if (this.isPlaying && this._sound) + if (this.usingWebAudio) { + if (void 0 === this._sound.stop) this._sound.noteOff(0); + else try { + this._sound.stop(0) + } catch (a) {} + this.externalNode ? this._sound.disconnect(this.externalNode) : this.gainNode && this._sound.disconnect(this.gainNode) + } else this.usingAudioTag && (this._sound.pause(), this._sound.currentTime = 0); + if (this.pendingPlayback = !1, this.isPlaying = !1, !this.paused) { + var a = this.currentMarker; + "" !== this.currentMarker && this.onMarkerComplete.dispatch(this.currentMarker, this), this.currentMarker = "", null !== this.fadeTween && this.fadeTween.stop(), this.onStop.dispatch(this, a) + } + }, + fadeIn: function(a, b, c) { + void 0 === b && (b = !1), void 0 === c && (c = this.currentMarker), this.paused || (this.play(c, 0, 0, b), this.fadeTo(a, 1)) + }, + fadeOut: function(a) { + this.fadeTo(a, 0) + }, + fadeTo: function(a, b) { + if (this.isPlaying && !this.paused && b !== this.volume) { + if (void 0 === a && (a = 1e3), void 0 === b) return void console.warn("Phaser.Sound.fadeTo: No Volume Specified."); + this.fadeTween = this.game.add.tween(this).to({ + volume: b + }, a, c.Easing.Linear.None, !0), this.fadeTween.onComplete.add(this.fadeComplete, this) + } + }, + fadeComplete: function() { + this.onFadeComplete.dispatch(this, this.volume), 0 === this.volume && this.stop() + }, + updateGlobalVolume: function(a) { + this.usingAudioTag && this._sound && (this._sound.volume = a * this._volume) + }, + destroy: function(a) { + void 0 === a && (a = !0), this.stop(), a ? this.game.sound.remove(this) : (this.markers = {}, this.context = null, this._buffer = null, this.externalNode = null, this.onDecoded.dispose(), this.onPlay.dispose(), this.onPause.dispose(), this.onResume.dispose(), this.onLoop.dispose(), this.onStop.dispose(), this.onMute.dispose(), this.onMarkerComplete.dispose()) + } + }, c.Sound.prototype.constructor = c.Sound, Object.defineProperty(c.Sound.prototype, "isDecoding", { + get: function() { + return this.game.cache.getSound(this.key).isDecoding + } + }), Object.defineProperty(c.Sound.prototype, "isDecoded", { + get: function() { + return this.game.cache.isSoundDecoded(this.key) + } + }), Object.defineProperty(c.Sound.prototype, "mute", { + get: function() { + return this._muted || this.game.sound.mute + }, + set: function(a) { + a = a || !1, a !== this._muted && (a ? (this._muted = !0, this._muteVolume = this._tempVolume, this.usingWebAudio ? this.gainNode.gain.value = 0 : this.usingAudioTag && this._sound && (this._sound.volume = 0)) : (this._muted = !1, this.usingWebAudio ? this.gainNode.gain.value = this._muteVolume : this.usingAudioTag && this._sound && (this._sound.volume = this._muteVolume)), this.onMute.dispatch(this)) + } + }), Object.defineProperty(c.Sound.prototype, "volume", { + get: function() { + return this._volume + }, + set: function(a) { + return this.game.device.firefox && this.usingAudioTag && (a = this.game.math.clamp(a, 0, 1)), this._muted ? void(this._muteVolume = a) : (this._tempVolume = a, this._volume = a, void(this.usingWebAudio ? this.gainNode.gain.value = a : this.usingAudioTag && this._sound && (this._sound.volume = a))) + } + }), c.SoundManager = function(a) { + this.game = a, this.onSoundDecode = new c.Signal, this.onVolumeChange = new c.Signal, this.onMute = new c.Signal, this.onUnMute = new c.Signal, this.context = null, this.usingWebAudio = !1, this.usingAudioTag = !1, this.noAudio = !1, this.connectToMaster = !0, this.touchLocked = !1, this.channels = 32, this.muteOnPause = !0, this._codeMuted = !1, this._muted = !1, this._unlockSource = null, this._volume = 1, this._sounds = [], this._watchList = new c.ArraySet, this._watching = !1, this._watchCallback = null, this._watchContext = null + }, c.SoundManager.prototype = { + boot: function() { + if (this.game.device.iOS && this.game.device.webAudio === !1 && (this.channels = 1), window.PhaserGlobal) { + if (window.PhaserGlobal.disableAudio === !0) return this.noAudio = !0, void(this.touchLocked = !1); + if (window.PhaserGlobal.disableWebAudio === !0) return this.usingAudioTag = !0, void(this.touchLocked = !1) + } + if (window.PhaserGlobal && window.PhaserGlobal.audioContext) this.context = window.PhaserGlobal.audioContext; + else if (window.AudioContext) try { + this.context = new window.AudioContext + } catch (a) { + this.context = null, this.usingWebAudio = !1, this.touchLocked = !1 + } else if (window.webkitAudioContext) try { + this.context = new window.webkitAudioContext + } catch (a) { + this.context = null, this.usingWebAudio = !1, this.touchLocked = !1 + } + if (null === this.context) { + if (void 0 === window.Audio) return void(this.noAudio = !0); + this.usingAudioTag = !0 + } else this.usingWebAudio = !0, void 0 === this.context.createGain ? this.masterGain = this.context.createGainNode() : this.masterGain = this.context.createGain(), this.masterGain.gain.value = 1, this.masterGain.connect(this.context.destination); + this.noAudio || (!this.game.device.cocoonJS && this.game.device.iOS || window.PhaserGlobal && window.PhaserGlobal.fakeiOSTouchLock) && this.setTouchLock() + }, + setTouchLock: function() { + this.noAudio || window.PhaserGlobal && window.PhaserGlobal.disableAudio === !0 || (this.game.device.iOSVersion > 8 ? this.game.input.touch.addTouchLockCallback(this.unlock, this, !0) : this.game.input.touch.addTouchLockCallback(this.unlock, this), this.touchLocked = !0) + }, + unlock: function() { + if (this.noAudio || !this.touchLocked || null !== this._unlockSource) return !0; + if (this.usingAudioTag) this.touchLocked = !1, this._unlockSource = null; + else if (this.usingWebAudio) { + var a = this.context.createBuffer(1, 1, 22050); + this._unlockSource = this.context.createBufferSource(), this._unlockSource.buffer = a, this._unlockSource.connect(this.context.destination), void 0 === this._unlockSource.start ? this._unlockSource.noteOn(0) : this._unlockSource.start(0) + } + return !0 + }, + stopAll: function() { + if (!this.noAudio) + for (var a = 0; a < this._sounds.length; a++) this._sounds[a] && this._sounds[a].stop() + }, + pauseAll: function() { + if (!this.noAudio) + for (var a = 0; a < this._sounds.length; a++) this._sounds[a] && this._sounds[a].pause() + }, + resumeAll: function() { + if (!this.noAudio) + for (var a = 0; a < this._sounds.length; a++) this._sounds[a] && this._sounds[a].resume() + }, + decode: function(a, b) { + b = b || null; + var c = this.game.cache.getSoundData(a); + if (c && this.game.cache.isSoundDecoded(a) === !1) { + this.game.cache.updateSound(a, "isDecoding", !0); + var d = this; + try { + this.context.decodeAudioData(c, function(c) { + c && (d.game.cache.decodedSound(a, c), d.onSoundDecode.dispatch(a, b)) + }) + } catch (a) {} + } + }, + setDecodedCallback: function(a, b, d) { + "string" == typeof a && (a = [a]), this._watchList.reset(); + for (var e = 0; e < a.length; e++) a[e] instanceof c.Sound ? this.game.cache.isSoundDecoded(a[e].key) || this._watchList.add(a[e].key) : this.game.cache.isSoundDecoded(a[e]) || this._watchList.add(a[e]); + 0 === this._watchList.total ? (this._watching = !1, b.call(d)) : (this._watching = !0, this._watchCallback = b, this._watchContext = d) + }, + update: function() { + if (!this.noAudio) { + !this.touchLocked || null === this._unlockSource || this._unlockSource.playbackState !== this._unlockSource.PLAYING_STATE && this._unlockSource.playbackState !== this._unlockSource.FINISHED_STATE || (this.touchLocked = !1, this._unlockSource = null); + for (var a = 0; a < this._sounds.length; a++) this._sounds[a].update(); + if (this._watching) { + for (var b = this._watchList.first; b;) this.game.cache.isSoundDecoded(b) && this._watchList.remove(b), b = this._watchList.next; + 0 === this._watchList.total && (this._watching = !1, this._watchCallback.call(this._watchContext)) + } + } + }, + add: function(a, b, d, e) { + void 0 === b && (b = 1), void 0 === d && (d = !1), void 0 === e && (e = this.connectToMaster); + var f = new c.Sound(this.game, a, b, d, e); + return this._sounds.push(f), f + }, + addSprite: function(a) { + var b = new c.AudioSprite(this.game, a); + return b + }, + remove: function(a) { + for (var b = this._sounds.length; b--;) + if (this._sounds[b] === a) return this._sounds[b].destroy(!1), this._sounds.splice(b, 1), !0; + return !1 + }, + removeByKey: function(a) { + for (var b = this._sounds.length, c = 0; b--;) this._sounds[b].key === a && (this._sounds[b].destroy(!1), this._sounds.splice(b, 1), c++); + return c + }, + play: function(a, b, c) { + if (!this.noAudio) { + var d = this.add(a, b, c); + return d.play(), d + } + }, + setMute: function() { + if (!this._muted) { + this._muted = !0, this.usingWebAudio && (this._muteVolume = this.masterGain.gain.value, this.masterGain.gain.value = 0); + for (var a = 0; a < this._sounds.length; a++) this._sounds[a].usingAudioTag && (this._sounds[a].mute = !0); + this.onMute.dispatch() + } + }, + unsetMute: function() { + if (this._muted && !this._codeMuted) { + this._muted = !1, this.usingWebAudio && (this.masterGain.gain.value = this._muteVolume); + for (var a = 0; a < this._sounds.length; a++) this._sounds[a].usingAudioTag && (this._sounds[a].mute = !1); + this.onUnMute.dispatch() + } + }, + destroy: function() { + this.stopAll(); + for (var a = 0; a < this._sounds.length; a++) this._sounds[a] && this._sounds[a].destroy(); + this._sounds = [], this.onSoundDecode.dispose(), this.context && (window.PhaserGlobal ? window.PhaserGlobal.audioContext = this.context : this.context.close && this.context.close()) + } + }, c.SoundManager.prototype.constructor = c.SoundManager, Object.defineProperty(c.SoundManager.prototype, "mute", { + get: function() { + return this._muted + }, + set: function(a) { + if (a = a || !1) { + if (this._muted) return; + this._codeMuted = !0, this.setMute() + } else { + if (!this._muted) return; + this._codeMuted = !1, this.unsetMute() + } + } + }), Object.defineProperty(c.SoundManager.prototype, "volume", { + get: function() { + return this._volume + }, + set: function(a) { + if (a < 0 ? a = 0 : a > 1 && (a = 1), this._volume !== a) { + if (this._volume = a, this.usingWebAudio) this.masterGain.gain.value = a; + else + for (var b = 0; b < this._sounds.length; b++) this._sounds[b].usingAudioTag && this._sounds[b].updateGlobalVolume(a); + this.onVolumeChange.dispatch(a) + } + } + }), c.ScaleManager = function(a, b, d) { + this.game = a, this.dom = c.DOM, this.grid = null, this.width = 0, this.height = 0, this.minWidth = null, this.maxWidth = null, this.minHeight = null, this.maxHeight = null, this.offset = new c.Point, this.forceLandscape = !1, this.forcePortrait = !1, this.incorrectOrientation = !1, this._pageAlignHorizontally = !1, this._pageAlignVertically = !1, this.onOrientationChange = new c.Signal, this.enterIncorrectOrientation = new c.Signal, this.leaveIncorrectOrientation = new c.Signal, this.hasPhaserSetFullScreen = !1, this.fullScreenTarget = null, this._createdFullScreenTarget = null, this.onFullScreenInit = new c.Signal, this.onFullScreenChange = new c.Signal, this.onFullScreenError = new c.Signal, this.screenOrientation = this.dom.getScreenOrientation(), this.scaleFactor = new c.Point(1, 1), this.scaleFactorInversed = new c.Point(1, 1), this.margin = { + left: 0, + top: 0, + right: 0, + bottom: 0, + x: 0, + y: 0 + }, this.bounds = new c.Rectangle, this.aspectRatio = 0, this.sourceAspectRatio = 0, this.event = null, this.windowConstraints = { + right: "layout", + bottom: "" + }, this.compatibility = { + supportsFullScreen: !1, + orientationFallback: null, + noMargins: !1, + scrollTo: null, + forceMinimumDocumentHeight: !1, + canExpandParent: !0, + clickTrampoline: "" + }, this._scaleMode = c.ScaleManager.NO_SCALE, this._fullScreenScaleMode = c.ScaleManager.NO_SCALE, this.parentIsWindow = !1, this.parentNode = null, this.parentScaleFactor = new c.Point(1, 1), this.trackParentInterval = 2e3, this.onSizeChange = new c.Signal, this.onResize = null, this.onResizeContext = null, this._pendingScaleMode = null, this._fullScreenRestore = null, this._gameSize = new c.Rectangle, this._userScaleFactor = new c.Point(1, 1), this._userScaleTrim = new c.Point(0, 0), this._lastUpdate = 0, this._updateThrottle = 0, this._updateThrottleReset = 100, this._parentBounds = new c.Rectangle, this._tempBounds = new c.Rectangle, this._lastReportedCanvasSize = new c.Rectangle, this._lastReportedGameSize = new c.Rectangle, this._booted = !1, a.config && this.parseConfig(a.config), this.setupScale(b, d) + }, c.ScaleManager.EXACT_FIT = 0, c.ScaleManager.NO_SCALE = 1, c.ScaleManager.SHOW_ALL = 2, c.ScaleManager.RESIZE = 3, c.ScaleManager.USER_SCALE = 4, c.ScaleManager.prototype = { + boot: function() { + var a = this.compatibility; + a.supportsFullScreen = this.game.device.fullscreen && !this.game.device.cocoonJS, this.game.device.iPad || this.game.device.webApp || this.game.device.desktop || (this.game.device.android && !this.game.device.chrome ? a.scrollTo = new c.Point(0, 1) : a.scrollTo = new c.Point(0, 0)), this.game.device.desktop ? (a.orientationFallback = "screen", a.clickTrampoline = "when-not-mouse") : (a.orientationFallback = "", a.clickTrampoline = ""); + var b = this; + this._orientationChange = function(a) { + return b.orientationChange(a) + }, this._windowResize = function(a) { + return b.windowResize(a) + }, window.addEventListener("orientationchange", this._orientationChange, !1), window.addEventListener("resize", this._windowResize, !1), this.compatibility.supportsFullScreen && (this._fullScreenChange = function(a) { + return b.fullScreenChange(a) + }, this._fullScreenError = function(a) { + return b.fullScreenError(a) + }, document.addEventListener("webkitfullscreenchange", this._fullScreenChange, !1), document.addEventListener("mozfullscreenchange", this._fullScreenChange, !1), document.addEventListener("MSFullscreenChange", this._fullScreenChange, !1), document.addEventListener("fullscreenchange", this._fullScreenChange, !1), document.addEventListener("webkitfullscreenerror", this._fullScreenError, !1), document.addEventListener("mozfullscreenerror", this._fullScreenError, !1), document.addEventListener("MSFullscreenError", this._fullScreenError, !1), document.addEventListener("fullscreenerror", this._fullScreenError, !1)), this.game.onResume.add(this._gameResumed, this), this.dom.getOffset(this.game.canvas, this.offset), this.bounds.setTo(this.offset.x, this.offset.y, this.width, this.height), this.setGameSize(this.game.width, this.game.height), this.screenOrientation = this.dom.getScreenOrientation(this.compatibility.orientationFallback), c.FlexGrid && (this.grid = new c.FlexGrid(this, this.width, this.height)), this._booted = !0, null !== this._pendingScaleMode && (this.scaleMode = this._pendingScaleMode, this._pendingScaleMode = null) + }, + parseConfig: function(a) { + void 0 !== a.scaleMode && (this._booted ? this.scaleMode = a.scaleMode : this._pendingScaleMode = a.scaleMode), void 0 !== a.fullScreenScaleMode && (this.fullScreenScaleMode = a.fullScreenScaleMode), a.fullScreenTarget && (this.fullScreenTarget = a.fullScreenTarget) + }, + setupScale: function(a, b) { + var d, e = new c.Rectangle; + "" !== this.game.parent && ("string" == typeof this.game.parent ? d = document.getElementById(this.game.parent) : this.game.parent && 1 === this.game.parent.nodeType && (d = this.game.parent)), d ? (this.parentNode = d, this.parentIsWindow = !1, this.getParentBounds(this._parentBounds), e.width = this._parentBounds.width, e.height = this._parentBounds.height, this.offset.set(this._parentBounds.x, this._parentBounds.y)) : (this.parentNode = null, this.parentIsWindow = !0, e.width = this.dom.visualBounds.width, e.height = this.dom.visualBounds.height, this.offset.set(0, 0)); + var f = 0, + g = 0; + "number" == typeof a ? f = a : (this.parentScaleFactor.x = parseInt(a, 10) / 100, f = e.width * this.parentScaleFactor.x), "number" == typeof b ? g = b : (this.parentScaleFactor.y = parseInt(b, 10) / 100, g = e.height * this.parentScaleFactor.y), f = Math.floor(f), g = Math.floor(g), this._gameSize.setTo(0, 0, f, g), this.updateDimensions(f, g, !1) + }, + _gameResumed: function() { + this.queueUpdate(!0) + }, + setGameSize: function(a, b) { + this._gameSize.setTo(0, 0, a, b), this.currentScaleMode !== c.ScaleManager.RESIZE && this.updateDimensions(a, b, !0), this.queueUpdate(!0) + }, + setUserScale: function(a, b, c, d) { + this._userScaleFactor.setTo(a, b), this._userScaleTrim.setTo(0 | c, 0 | d), this.queueUpdate(!0) + }, + setResizeCallback: function(a, b) { + this.onResize = a, this.onResizeContext = b + }, + signalSizeChange: function() { + if (!c.Rectangle.sameDimensions(this, this._lastReportedCanvasSize) || !c.Rectangle.sameDimensions(this.game, this._lastReportedGameSize)) { + var a = this.width, + b = this.height; + this._lastReportedCanvasSize.setTo(0, 0, a, b), this._lastReportedGameSize.setTo(0, 0, this.game.width, this.game.height), this.grid && this.grid.onResize(a, b), this.onSizeChange.dispatch(this, a, b), this.currentScaleMode === c.ScaleManager.RESIZE && (this.game.state.resize(a, b), this.game.load.resize(a, b)) + } + }, + setMinMax: function(a, b, c, d) { + this.minWidth = a, this.minHeight = b, "undefined" != typeof c && (this.maxWidth = c), "undefined" != typeof d && (this.maxHeight = d) + }, + preUpdate: function() { + if (!(this.game.time.time < this._lastUpdate + this._updateThrottle)) { + var a = this._updateThrottle; + this._updateThrottleReset = a >= 400 ? 0 : 100, this.dom.getOffset(this.game.canvas, this.offset); + var b = this._parentBounds.width, + d = this._parentBounds.height, + e = this.getParentBounds(this._parentBounds), + f = e.width !== b || e.height !== d, + g = this.updateOrientationState(); + (f || g) && (this.onResize && this.onResize.call(this.onResizeContext, this, e), this.updateLayout(), this.signalSizeChange()); + var h = 2 * this._updateThrottle; + this._updateThrottle < a && (h = Math.min(a, this._updateThrottleReset)), this._updateThrottle = c.Math.clamp(h, 25, this.trackParentInterval), this._lastUpdate = this.game.time.time + } + }, + pauseUpdate: function() { + this.preUpdate(), this._updateThrottle = this.trackParentInterval + }, + updateDimensions: function(a, b, c) { + this.width = a * this.parentScaleFactor.x, this.height = b * this.parentScaleFactor.y, this.game.width = this.width, this.game.height = this.height, this.sourceAspectRatio = this.width / this.height, this.updateScalingAndBounds(), c && (this.game.renderer.resize(this.width, this.height), this.game.camera.setSize(this.width, this.height), this.game.world.resize(this.width, this.height)) + }, + updateScalingAndBounds: function() { + this.scaleFactor.x = this.game.width / this.width, this.scaleFactor.y = this.game.height / this.height, this.scaleFactorInversed.x = this.width / this.game.width, this.scaleFactorInversed.y = this.height / this.game.height, this.aspectRatio = this.width / this.height, this.game.canvas && this.dom.getOffset(this.game.canvas, this.offset), this.bounds.setTo(this.offset.x, this.offset.y, this.width, this.height), this.game.input && this.game.input.scale && this.game.input.scale.setTo(this.scaleFactor.x, this.scaleFactor.y) + }, + forceOrientation: function(a, b) { + void 0 === b && (b = !1), this.forceLandscape = a, this.forcePortrait = b, this.queueUpdate(!0) + }, + classifyOrientation: function(a) { + return "portrait-primary" === a || "portrait-secondary" === a ? "portrait" : "landscape-primary" === a || "landscape-secondary" === a ? "landscape" : null + }, + updateOrientationState: function() { + var a = this.screenOrientation, + b = this.incorrectOrientation; + this.screenOrientation = this.dom.getScreenOrientation(this.compatibility.orientationFallback), this.incorrectOrientation = this.forceLandscape && !this.isLandscape || this.forcePortrait && !this.isPortrait; + var c = a !== this.screenOrientation, + d = b !== this.incorrectOrientation; + return d && (this.incorrectOrientation ? this.enterIncorrectOrientation.dispatch() : this.leaveIncorrectOrientation.dispatch()), (c || d) && this.onOrientationChange.dispatch(this, a, b), c || d + }, + orientationChange: function(a) { + this.event = a, this.queueUpdate(!0) + }, + windowResize: function(a) { + this.event = a, this.queueUpdate(!0) + }, + scrollTop: function() { + var a = this.compatibility.scrollTo; + a && window.scrollTo(a.x, a.y) + }, + refresh: function() { + this.scrollTop(), this.queueUpdate(!0) + }, + updateLayout: function() { + var a = this.currentScaleMode; + if (a === c.ScaleManager.RESIZE) return void this.reflowGame(); + if (this.scrollTop(), this.compatibility.forceMinimumDocumentHeight && (document.documentElement.style.minHeight = window.innerHeight + "px"), this.incorrectOrientation ? this.setMaximum() : a === c.ScaleManager.EXACT_FIT ? this.setExactFit() : a === c.ScaleManager.SHOW_ALL ? !this.isFullScreen && this.boundingParent && this.compatibility.canExpandParent ? (this.setShowAll(!0), this.resetCanvas(), this.setShowAll()) : this.setShowAll() : a === c.ScaleManager.NO_SCALE ? (this.width = this.game.width, this.height = this.game.height) : a === c.ScaleManager.USER_SCALE && (this.width = this.game.width * this._userScaleFactor.x - this._userScaleTrim.x, this.height = this.game.height * this._userScaleFactor.y - this._userScaleTrim.y), !this.compatibility.canExpandParent && (a === c.ScaleManager.SHOW_ALL || a === c.ScaleManager.USER_SCALE)) { + var b = this.getParentBounds(this._tempBounds); + this.width = Math.min(this.width, b.width), this.height = Math.min(this.height, b.height) + } + this.width = 0 | this.width, this.height = 0 | this.height, this.reflowCanvas() + }, + getParentBounds: function(a) { + var b = a || new c.Rectangle, + d = this.boundingParent, + e = this.dom.visualBounds, + f = this.dom.layoutBounds; + if (d) { + var g = d.getBoundingClientRect(), + h = d.offsetParent ? d.offsetParent.getBoundingClientRect() : d.getBoundingClientRect(); + b.setTo(g.left - h.left, g.top - h.top, g.width, g.height); + var i = this.windowConstraints; + if (i.right) { + var j = "layout" === i.right ? f : e; + b.right = Math.min(b.right, j.width) + } + if (i.bottom) { + var j = "layout" === i.bottom ? f : e; + b.bottom = Math.min(b.bottom, j.height) + } + } else b.setTo(0, 0, e.width, e.height); + return b.setTo(Math.round(b.x), Math.round(b.y), Math.round(b.width), Math.round(b.height)), b + }, + alignCanvas: function(a, b) { + var c = this.getParentBounds(this._tempBounds), + d = this.game.canvas, + e = this.margin; + if (a) { + e.left = e.right = 0; + var f = d.getBoundingClientRect(); + if (this.width < c.width && !this.incorrectOrientation) { + var g = f.left - c.x, + h = c.width / 2 - this.width / 2; + h = Math.max(h, 0); + var i = h - g; + e.left = Math.round(i) + } + d.style.marginLeft = e.left + "px", 0 !== e.left && (e.right = -(c.width - f.width - e.left), d.style.marginRight = e.right + "px") + } + if (b) { + e.top = e.bottom = 0; + var f = d.getBoundingClientRect(); + if (this.height < c.height && !this.incorrectOrientation) { + var g = f.top - c.y, + h = c.height / 2 - this.height / 2; + h = Math.max(h, 0); + var i = h - g; + e.top = Math.round(i) + } + d.style.marginTop = e.top + "px", 0 !== e.top && (e.bottom = -(c.height - f.height - e.top), d.style.marginBottom = e.bottom + "px") + } + e.x = e.left, e.y = e.top + }, + reflowGame: function() { + this.resetCanvas("", ""); + var a = this.getParentBounds(this._tempBounds); + this.updateDimensions(a.width, a.height, !0) + }, + reflowCanvas: function() { + this.incorrectOrientation || (this.width = c.Math.clamp(this.width, this.minWidth || 0, this.maxWidth || this.width), this.height = c.Math.clamp(this.height, this.minHeight || 0, this.maxHeight || this.height)), this.resetCanvas(), this.compatibility.noMargins || (this.isFullScreen && this._createdFullScreenTarget ? this.alignCanvas(!0, !0) : this.alignCanvas(this.pageAlignHorizontally, this.pageAlignVertically)), this.updateScalingAndBounds() + }, + resetCanvas: function(a, b) { + void 0 === a && (a = this.width + "px"), void 0 === b && (b = this.height + "px"); + var c = this.game.canvas; + this.compatibility.noMargins || (c.style.marginLeft = "", c.style.marginTop = "", c.style.marginRight = "", c.style.marginBottom = ""), c.style.width = a, c.style.height = b + }, + queueUpdate: function(a) { + a && (this._parentBounds.width = 0, this._parentBounds.height = 0), this._updateThrottle = this._updateThrottleReset + }, + reset: function(a) { + a && this.grid && this.grid.reset() + }, + setMaximum: function() { + this.width = this.dom.visualBounds.width, this.height = this.dom.visualBounds.height + }, + setShowAll: function(a) { + var b, c = this.getParentBounds(this._tempBounds), + d = c.width, + e = c.height; + b = a ? Math.max(e / this.game.height, d / this.game.width) : Math.min(e / this.game.height, d / this.game.width), this.width = Math.round(this.game.width * b), this.height = Math.round(this.game.height * b) + }, + setExactFit: function() { + var a = this.getParentBounds(this._tempBounds); + this.width = a.width, this.height = a.height, this.isFullScreen || (this.maxWidth && (this.width = Math.min(this.width, this.maxWidth)), this.maxHeight && (this.height = Math.min(this.height, this.maxHeight))) + }, + createFullScreenTarget: function() { + var a = document.createElement("div"); + return a.style.margin = "0", a.style.padding = "0", a.style.background = "#000", a + }, + startFullScreen: function(a, b) { + if (this.isFullScreen) return !1; + if (!this.compatibility.supportsFullScreen) { + var d = this; + return void setTimeout(function() { + d.fullScreenError() + }, 10) + } + if ("when-not-mouse" === this.compatibility.clickTrampoline) { + var e = this.game.input; + if (e.activePointer && e.activePointer !== e.mousePointer && (b || b !== !1)) return void e.activePointer.addClickTrampoline("startFullScreen", this.startFullScreen, this, [a, !1]) + } + void 0 !== a && this.game.renderType === c.CANVAS && (this.game.stage.smoothed = a); + var f = this.fullScreenTarget; + f || (this.cleanupCreatedTarget(), this._createdFullScreenTarget = this.createFullScreenTarget(), f = this._createdFullScreenTarget); + var g = { + targetElement: f + }; + if (this.hasPhaserSetFullScreen = !0, this.onFullScreenInit.dispatch(this, g), this._createdFullScreenTarget) { + var h = this.game.canvas, + i = h.parentNode; + i.insertBefore(f, h), f.appendChild(h) + } + return this.game.device.fullscreenKeyboard ? f[this.game.device.requestFullscreen](Element.ALLOW_KEYBOARD_INPUT) : f[this.game.device.requestFullscreen](), !0 + }, + stopFullScreen: function() { + return !(!this.isFullScreen || !this.compatibility.supportsFullScreen) && (this.hasPhaserSetFullScreen = !1, document[this.game.device.cancelFullscreen](), !0) + }, + cleanupCreatedTarget: function() { + var a = this._createdFullScreenTarget; + if (a && a.parentNode) { + var b = a.parentNode; + b.insertBefore(this.game.canvas, a), b.removeChild(a) + } + this._createdFullScreenTarget = null + }, + prepScreenMode: function(a) { + var b = !!this._createdFullScreenTarget, + d = this._createdFullScreenTarget || this.fullScreenTarget; + a ? (b || this.fullScreenScaleMode === c.ScaleManager.EXACT_FIT) && d !== this.game.canvas && (this._fullScreenRestore = { + targetWidth: d.style.width, + targetHeight: d.style.height + }, d.style.width = "100%", d.style.height = "100%") : (this._fullScreenRestore && (d.style.width = this._fullScreenRestore.targetWidth, d.style.height = this._fullScreenRestore.targetHeight, this._fullScreenRestore = null), this.updateDimensions(this._gameSize.width, this._gameSize.height, !0), this.resetCanvas()) + }, + fullScreenChange: function(a) { + this.event = a, this.isFullScreen ? (this.prepScreenMode(!0), this.updateLayout(), this.queueUpdate(!0)) : (this.prepScreenMode(!1), this.cleanupCreatedTarget(), this.updateLayout(), this.queueUpdate(!0)), this.onFullScreenChange.dispatch(this, this.width, this.height) + }, + fullScreenError: function(a) { + this.event = a, this.cleanupCreatedTarget(), console.warn("Phaser.ScaleManager: requestFullscreen failed or device does not support the Fullscreen API"), this.onFullScreenError.dispatch(this) + }, + scaleSprite: function(a, b, c, d) { + if (void 0 === b && (b = this.width), void 0 === c && (c = this.height), void 0 === d && (d = !1), !a || !a.scale) return a; + if (a.scale.x = 1, a.scale.y = 1, a.width <= 0 || a.height <= 0 || b <= 0 || c <= 0) return a; + var e = b, + f = a.height * b / a.width, + g = a.width * c / a.height, + h = c, + i = g > b; + return i = i ? d : !d, i ? (a.width = Math.floor(e), a.height = Math.floor(f)) : (a.width = Math.floor(g), a.height = Math.floor(h)), a + }, + destroy: function() { + this.game.onResume.remove(this._gameResumed, this), window.removeEventListener("orientationchange", this._orientationChange, !1), window.removeEventListener("resize", this._windowResize, !1), this.compatibility.supportsFullScreen && (document.removeEventListener("webkitfullscreenchange", this._fullScreenChange, !1), document.removeEventListener("mozfullscreenchange", this._fullScreenChange, !1), document.removeEventListener("MSFullscreenChange", this._fullScreenChange, !1), document.removeEventListener("fullscreenchange", this._fullScreenChange, !1), document.removeEventListener("webkitfullscreenerror", this._fullScreenError, !1), document.removeEventListener("mozfullscreenerror", this._fullScreenError, !1), document.removeEventListener("MSFullscreenError", this._fullScreenError, !1), document.removeEventListener("fullscreenerror", this._fullScreenError, !1)) + } + }, c.ScaleManager.prototype.constructor = c.ScaleManager, Object.defineProperty(c.ScaleManager.prototype, "boundingParent", { + get: function() { + if (this.parentIsWindow || this.isFullScreen && this.hasPhaserSetFullScreen && !this._createdFullScreenTarget) return null; + var a = this.game.canvas && this.game.canvas.parentNode; + return a || null + } + }), Object.defineProperty(c.ScaleManager.prototype, "scaleMode", { + get: function() { + return this._scaleMode + }, + set: function(a) { + return a !== this._scaleMode && (this.isFullScreen || (this.updateDimensions(this._gameSize.width, this._gameSize.height, !0), this.queueUpdate(!0)), this._scaleMode = a), this._scaleMode + } + }), Object.defineProperty(c.ScaleManager.prototype, "fullScreenScaleMode", { + get: function() { + return this._fullScreenScaleMode + }, + set: function(a) { + return a !== this._fullScreenScaleMode && (this.isFullScreen ? (this.prepScreenMode(!1), this._fullScreenScaleMode = a, this.prepScreenMode(!0), this.queueUpdate(!0)) : this._fullScreenScaleMode = a), this._fullScreenScaleMode + } + }), Object.defineProperty(c.ScaleManager.prototype, "currentScaleMode", { + get: function() { + return this.isFullScreen ? this._fullScreenScaleMode : this._scaleMode + } + }), Object.defineProperty(c.ScaleManager.prototype, "pageAlignHorizontally", { + get: function() { + return this._pageAlignHorizontally + }, + set: function(a) { + a !== this._pageAlignHorizontally && (this._pageAlignHorizontally = a, this.queueUpdate(!0)) + } + }), Object.defineProperty(c.ScaleManager.prototype, "pageAlignVertically", { + get: function() { + return this._pageAlignVertically + }, + set: function(a) { + a !== this._pageAlignVertically && (this._pageAlignVertically = a, this.queueUpdate(!0)) + } + }), Object.defineProperty(c.ScaleManager.prototype, "isFullScreen", { + get: function() { + return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) + } + }), Object.defineProperty(c.ScaleManager.prototype, "isPortrait", { + get: function() { + return "portrait" === this.classifyOrientation(this.screenOrientation) + } + }), Object.defineProperty(c.ScaleManager.prototype, "isLandscape", { + get: function() { + return "landscape" === this.classifyOrientation(this.screenOrientation) + } + }), Object.defineProperty(c.ScaleManager.prototype, "isGamePortrait", { + get: function() { + return this.height > this.width + } + }), Object.defineProperty(c.ScaleManager.prototype, "isGameLandscape", { + get: function() { + return this.width > this.height + } + }), c.Utils.Debug = function(a) { + this.game = a, this.sprite = null, this.bmd = null, this.canvas = null, this.context = null, this.font = "14px Courier", this.columnWidth = 100, this.lineHeight = 16, this.renderShadow = !0, this.currentX = 0, this.currentY = 0, this.currentAlpha = 1, this.dirty = !1 + }, c.Utils.Debug.prototype = { + boot: function() { + this.game.renderType === c.CANVAS ? this.context = this.game.context : (this.bmd = new c.BitmapData(this.game, "__DEBUG", this.game.width, this.game.height, (!0)), this.sprite = this.game.make.image(0, 0, this.bmd), this.game.stage.addChild(this.sprite), this.game.scale.onSizeChange.add(this.resize, this), this.canvas = PIXI.CanvasPool.create(this, this.game.width, this.game.height), this.context = this.canvas.getContext("2d")) + }, + resize: function(a, b, c) { + this.bmd.resize(b, c), this.canvas.width = b, this.canvas.height = c + }, + preUpdate: function() { + this.dirty && this.sprite && (this.bmd.clear(), this.bmd.draw(this.canvas, 0, 0), this.context.clearRect(0, 0, this.game.width, this.game.height), this.dirty = !1) + }, + reset: function() { + this.context && this.context.clearRect(0, 0, this.game.width, this.game.height), this.sprite && this.bmd.clear() + }, + start: function(a, b, c, d) { + "number" != typeof a && (a = 0), "number" != typeof b && (b = 0), c = c || "rgb(255,255,255)", void 0 === d && (d = 0), this.currentX = a, this.currentY = b, this.currentColor = c, this.columnWidth = d, this.dirty = !0, this.context.save(), this.context.setTransform(1, 0, 0, 1, 0, 0), this.context.strokeStyle = c, this.context.fillStyle = c, this.context.font = this.font, this.context.globalAlpha = this.currentAlpha + }, + stop: function() { + this.context.restore() + }, + line: function() { + for (var a = this.currentX, b = 0; b < arguments.length; b++) this.renderShadow && (this.context.fillStyle = "rgb(0,0,0)", this.context.fillText(arguments[b], a + 1, this.currentY + 1), this.context.fillStyle = this.currentColor), this.context.fillText(arguments[b], a, this.currentY), a += this.columnWidth; + this.currentY += this.lineHeight + }, + soundInfo: function(a, b, c, d) { + this.start(b, c, d), this.line("Sound: " + a.key + " Locked: " + a.game.sound.touchLocked), this.line("Is Ready?: " + this.game.cache.isSoundReady(a.key) + " Pending Playback: " + a.pendingPlayback), this.line("Decoded: " + a.isDecoded + " Decoding: " + a.isDecoding), this.line("Total Duration: " + a.totalDuration + " Playing: " + a.isPlaying), this.line("Time: " + a.currentTime), this.line("Volume: " + a.volume + " Muted: " + a.mute), this.line("WebAudio: " + a.usingWebAudio + " Audio: " + a.usingAudioTag), "" !== a.currentMarker && (this.line("Marker: " + a.currentMarker + " Duration: " + a.duration + " (ms: " + a.durationMS + ")"), this.line("Start: " + a.markers[a.currentMarker].start + " Stop: " + a.markers[a.currentMarker].stop), this.line("Position: " + a.position)), this.stop() + }, + cameraInfo: function(a, b, c, d) { + this.start(b, c, d), this.line("Camera (" + a.width + " x " + a.height + ")"), this.line("X: " + a.x + " Y: " + a.y), a.bounds && this.line("Bounds x: " + a.bounds.x + " Y: " + a.bounds.y + " w: " + a.bounds.width + " h: " + a.bounds.height), this.line("View x: " + a.view.x + " Y: " + a.view.y + " w: " + a.view.width + " h: " + a.view.height), this.line("Total in view: " + a.totalInView), this.stop() + }, + timer: function(a, b, c, d) { + this.start(b, c, d), this.line("Timer (running: " + a.running + " expired: " + a.expired + ")"), this.line("Next Tick: " + a.next + " Duration: " + a.duration), this.line("Paused: " + a.paused + " Length: " + a.length), this.stop() + }, + pointer: function(a, b, c, d, e) { + null != a && (void 0 === b && (b = !1), c = c || "rgba(0,255,0,0.5)", d = d || "rgba(255,0,0,0.5)", b === !0 && a.isUp === !0 || (this.start(a.x, a.y - 100, e), this.context.beginPath(), this.context.arc(a.x, a.y, a.circle.radius, 0, 2 * Math.PI), a.active ? this.context.fillStyle = c : this.context.fillStyle = d, this.context.fill(), this.context.closePath(), this.context.beginPath(), this.context.moveTo(a.positionDown.x, a.positionDown.y), this.context.lineTo(a.position.x, a.position.y), this.context.lineWidth = 2, this.context.stroke(), this.context.closePath(), this.line("ID: " + a.id + " Active: " + a.active), this.line("World X: " + a.worldX + " World Y: " + a.worldY), this.line("Screen X: " + a.x + " Screen Y: " + a.y + " In: " + a.withinGame), this.line("Duration: " + a.duration + " ms"), this.line("is Down: " + a.isDown + " is Up: " + a.isUp), this.stop())) + }, + spriteInputInfo: function(a, b, c, d) { + this.start(b, c, d), this.line("Sprite Input: (" + a.width + " x " + a.height + ")"), this.line("x: " + a.input.pointerX().toFixed(1) + " y: " + a.input.pointerY().toFixed(1)), this.line("over: " + a.input.pointerOver() + " duration: " + a.input.overDuration().toFixed(0)), this.line("down: " + a.input.pointerDown() + " duration: " + a.input.downDuration().toFixed(0)), this.line("just over: " + a.input.justOver() + " just out: " + a.input.justOut()), this.stop() + }, + key: function(a, b, c, d) { + this.start(b, c, d, 150), this.line("Key:", a.keyCode, "isDown:", a.isDown), this.line("justDown:", a.justDown, "justUp:", a.justUp), this.line("Time Down:", a.timeDown.toFixed(0), "duration:", a.duration.toFixed(0)), this.stop() + }, + inputInfo: function(a, b, c) { + this.start(a, b, c), this.line("Input"), this.line("X: " + this.game.input.x + " Y: " + this.game.input.y), this.line("World X: " + this.game.input.worldX + " World Y: " + this.game.input.worldY), this.line("Scale X: " + this.game.input.scale.x.toFixed(1) + " Scale Y: " + this.game.input.scale.x.toFixed(1)), this.line("Screen X: " + this.game.input.activePointer.screenX + " Screen Y: " + this.game.input.activePointer.screenY), this.stop() + }, + spriteBounds: function(a, b, c) { + var d = a.getBounds(); + d.x += this.game.camera.x, d.y += this.game.camera.y, this.rectangle(d, b, c) + }, + ropeSegments: function(a, b, c) { + var d = a.segments, + e = this; + d.forEach(function(a) { + e.rectangle(a, b, c) + }, this) + }, + spriteInfo: function(a, b, c, d) { + this.start(b, c, d), this.line("Sprite: (" + a.width + " x " + a.height + ") anchor: " + a.anchor.x + " x " + a.anchor.y), this.line("x: " + a.x.toFixed(1) + " y: " + a.y.toFixed(1)), this.line("angle: " + a.angle.toFixed(1) + " rotation: " + a.rotation.toFixed(1)), this.line("visible: " + a.visible + " in camera: " + a.inCamera), this.line("bounds x: " + a._bounds.x.toFixed(1) + " y: " + a._bounds.y.toFixed(1) + " w: " + a._bounds.width.toFixed(1) + " h: " + a._bounds.height.toFixed(1)), this.stop() + }, + spriteCoords: function(a, b, c, d) { + this.start(b, c, d, 100), a.name && this.line(a.name), this.line("x:", a.x.toFixed(2), "y:", a.y.toFixed(2)), this.line("pos x:", a.position.x.toFixed(2), "pos y:", a.position.y.toFixed(2)), this.line("world x:", a.world.x.toFixed(2), "world y:", a.world.y.toFixed(2)), this.stop() + }, + lineInfo: function(a, b, c, d) { + this.start(b, c, d, 80), this.line("start.x:", a.start.x.toFixed(2), "start.y:", a.start.y.toFixed(2)), this.line("end.x:", a.end.x.toFixed(2), "end.y:", a.end.y.toFixed(2)), this.line("length:", a.length.toFixed(2), "angle:", a.angle), this.stop() + }, + pixel: function(a, b, c, d) { + d = d || 2, this.start(), this.context.fillStyle = c, this.context.fillRect(a, b, d, d), this.stop() + }, + geom: function(a, b, d, e) { + void 0 === d && (d = !0), void 0 === e && (e = 0), b = b || "rgba(0,255,0,0.4)", this.start(), this.context.fillStyle = b, this.context.strokeStyle = b, a instanceof c.Rectangle || 1 === e ? d ? this.context.fillRect(a.x - this.game.camera.x, a.y - this.game.camera.y, a.width, a.height) : this.context.strokeRect(a.x - this.game.camera.x, a.y - this.game.camera.y, a.width, a.height) : a instanceof c.Circle || 2 === e ? (this.context.beginPath(), this.context.arc(a.x - this.game.camera.x, a.y - this.game.camera.y, a.radius, 0, 2 * Math.PI, !1), this.context.closePath(), d ? this.context.fill() : this.context.stroke()) : a instanceof c.Point || 3 === e ? this.context.fillRect(a.x - this.game.camera.x, a.y - this.game.camera.y, 4, 4) : (a instanceof c.Line || 4 === e) && (this.context.lineWidth = 1, this.context.beginPath(), this.context.moveTo(a.start.x + .5 - this.game.camera.x, a.start.y + .5 - this.game.camera.y), this.context.lineTo(a.end.x + .5 - this.game.camera.x, a.end.y + .5 - this.game.camera.y), this.context.closePath(), this.context.stroke()), this.stop() + }, + rectangle: function(a, b, c) { + void 0 === c && (c = !0), b = b || "rgba(0, 255, 0, 0.4)", this.start(), c ? (this.context.fillStyle = b, this.context.fillRect(a.x - this.game.camera.x, a.y - this.game.camera.y, a.width, a.height)) : (this.context.strokeStyle = b, this.context.strokeRect(a.x - this.game.camera.x, a.y - this.game.camera.y, a.width, a.height)), this.stop() + }, + text: function(a, b, c, d, e) { + d = d || "rgb(255,255,255)", e = e || "16px Courier", this.start(), this.context.font = e, this.renderShadow && (this.context.fillStyle = "rgb(0,0,0)", this.context.fillText(a, b + 1, c + 1)), this.context.fillStyle = d, this.context.fillText(a, b, c), this.stop() + }, + quadTree: function(a, b) { + b = b || "rgba(255,0,0,0.3)", this.start(); + var c = a.bounds; + if (0 === a.nodes.length) { + this.context.strokeStyle = b, this.context.strokeRect(c.x, c.y, c.width, c.height), this.text("size: " + a.objects.length, c.x + 4, c.y + 16, "rgb(0,200,0)", "12px Courier"), this.context.strokeStyle = "rgb(0,255,0)"; + for (var d = 0; d < a.objects.length; d++) this.context.strokeRect(a.objects[d].x, a.objects[d].y, a.objects[d].width, a.objects[d].height) + } else + for (var d = 0; d < a.nodes.length; d++) this.quadTree(a.nodes[d]); + this.stop() + }, + body: function(a, b, d) { + a.body && (this.start(), a.body.type === c.Physics.ARCADE ? c.Physics.Arcade.Body.render(this.context, a.body, b, d) : a.body.type === c.Physics.NINJA ? c.Physics.Ninja.Body.render(this.context, a.body, b, d) : a.body.type === c.Physics.BOX2D && c.Physics.Box2D.renderBody(this.context, a.body, b), this.stop()) + }, + bodyInfo: function(a, b, d, e) { + a.body && (this.start(b, d, e, 210), a.body.type === c.Physics.ARCADE ? c.Physics.Arcade.Body.renderBodyInfo(this, a.body) : a.body.type === c.Physics.BOX2D && this.game.physics.box2d.renderBodyInfo(this, a.body), this.stop()) + }, + box2dWorld: function() { + this.start(), this.context.translate(-this.game.camera.view.x, -this.game.camera.view.y, 0), this.game.physics.box2d.renderDebugDraw(this.context), this.stop() + }, + box2dBody: function(a, b) { + this.start(), c.Physics.Box2D.renderBody(this.context, a, b), this.stop() + }, + displayList: function(a) { + if (void 0 === a && (a = this.game.world), a.hasOwnProperty("renderOrderID") ? console.log("[" + a.renderOrderID + "]", a) : console.log("[]", a), a.children && a.children.length > 0) + for (var b = 0; b < a.children.length; b++) this.game.debug.displayList(a.children[b]) + }, + destroy: function() { + PIXI.CanvasPool.remove(this) + } + }, c.Utils.Debug.prototype.constructor = c.Utils.Debug, c.DOM = { + getOffset: function(a, b) { + b = b || new c.Point; + var d = a.getBoundingClientRect(), + e = c.DOM.scrollY, + f = c.DOM.scrollX, + g = document.documentElement.clientTop, + h = document.documentElement.clientLeft; + return b.x = d.left + f - h, b.y = d.top + e - g, b + }, + getBounds: function(a, b) { + return void 0 === b && (b = 0), a = a && !a.nodeType ? a[0] : a, !(!a || 1 !== a.nodeType) && this.calibrate(a.getBoundingClientRect(), b) + }, + calibrate: function(a, b) { + b = +b || 0; + var c = { + width: 0, + height: 0, + left: 0, + right: 0, + top: 0, + bottom: 0 + }; + return c.width = (c.right = a.right + b) - (c.left = a.left - b), c.height = (c.bottom = a.bottom + b) - (c.top = a.top - b), c + }, + getAspectRatio: function(a) { + a = null == a ? this.visualBounds : 1 === a.nodeType ? this.getBounds(a) : a; + var b = a.width, + c = a.height; + return "function" == typeof b && (b = b.call(a)), "function" == typeof c && (c = c.call(a)), b / c + }, + inLayoutViewport: function(a, b) { + var c = this.getBounds(a, b); + return !!c && c.bottom >= 0 && c.right >= 0 && c.top <= this.layoutBounds.width && c.left <= this.layoutBounds.height + }, + getScreenOrientation: function(a) { + var b = window.screen, + c = b.orientation || b.mozOrientation || b.msOrientation; + if (c && "string" == typeof c.type) return c.type; + if ("string" == typeof c) return c; + var d = "portrait-primary", + e = "landscape-primary"; + if ("screen" === a) return b.height > b.width ? d : e; + if ("viewport" === a) return this.visualBounds.height > this.visualBounds.width ? d : e; + if ("window.orientation" === a && "number" == typeof window.orientation) return 0 === window.orientation || 180 === window.orientation ? d : e; + if (window.matchMedia) { + if (window.matchMedia("(orientation: portrait)").matches) return d; + if (window.matchMedia("(orientation: landscape)").matches) return e + } + return this.visualBounds.height > this.visualBounds.width ? d : e + }, + visualBounds: new c.Rectangle, + layoutBounds: new c.Rectangle, + documentBounds: new c.Rectangle + }, c.Device.whenReady(function(a) { + var b = window && "pageXOffset" in window ? function() { + return window.pageXOffset + } : function() { + return document.documentElement.scrollLeft + }, + d = window && "pageYOffset" in window ? function() { + return window.pageYOffset + } : function() { + return document.documentElement.scrollTop + }; + Object.defineProperty(c.DOM, "scrollX", { + get: b + }), Object.defineProperty(c.DOM, "scrollY", { + get: d + }), Object.defineProperty(c.DOM.visualBounds, "x", { + get: b + }), Object.defineProperty(c.DOM.visualBounds, "y", { + get: d + }), Object.defineProperty(c.DOM.layoutBounds, "x", { + value: 0 + }), Object.defineProperty(c.DOM.layoutBounds, "y", { + value: 0 + }); + var e = a.desktop && document.documentElement.clientWidth <= window.innerWidth && document.documentElement.clientHeight <= window.innerHeight; + if (e) { + var f = function() { + return Math.max(window.innerWidth, document.documentElement.clientWidth) + }, + g = function() { + return Math.max(window.innerHeight, document.documentElement.clientHeight) + }; + Object.defineProperty(c.DOM.visualBounds, "width", { + get: f + }), Object.defineProperty(c.DOM.visualBounds, "height", { + get: g + }), Object.defineProperty(c.DOM.layoutBounds, "width", { + get: f + }), Object.defineProperty(c.DOM.layoutBounds, "height", { + get: g + }) + } else Object.defineProperty(c.DOM.visualBounds, "width", { + get: function() { + return window.innerWidth + } + }), Object.defineProperty(c.DOM.visualBounds, "height", { + get: function() { + return window.innerHeight + } + }), Object.defineProperty(c.DOM.layoutBounds, "width", { + get: function() { + var a = document.documentElement.clientWidth, + b = window.innerWidth; + return a < b ? b : a + } + }), Object.defineProperty(c.DOM.layoutBounds, "height", { + get: function() { + var a = document.documentElement.clientHeight, + b = window.innerHeight; + return a < b ? b : a + } + }); + Object.defineProperty(c.DOM.documentBounds, "x", { + value: 0 + }), Object.defineProperty(c.DOM.documentBounds, "y", { + value: 0 + }), Object.defineProperty(c.DOM.documentBounds, "width", { + get: function() { + var a = document.documentElement; + return Math.max(a.clientWidth, a.offsetWidth, a.scrollWidth) + } + }), Object.defineProperty(c.DOM.documentBounds, "height", { + get: function() { + var a = document.documentElement; + return Math.max(a.clientHeight, a.offsetHeight, a.scrollHeight) + } + }) + }, null, !0), c.ArraySet = function(a) { + this.position = 0, this.list = a || [] + }, c.ArraySet.prototype = { + add: function(a) { + return this.exists(a) || this.list.push(a), a + }, + getIndex: function(a) { + return this.list.indexOf(a) + }, + getByKey: function(a, b) { + for (var c = this.list.length; c--;) + if (this.list[c][a] === b) return this.list[c]; + return null + }, + exists: function(a) { + return this.list.indexOf(a) > -1 + }, + reset: function() { + this.list.length = 0 + }, + remove: function(a) { + var b = this.list.indexOf(a); + if (b > -1) return this.list.splice(b, 1), a + }, + setAll: function(a, b) { + for (var c = this.list.length; c--;) this.list[c] && (this.list[c][a] = b) + }, + callAll: function(a) { + for (var b = Array.prototype.slice.call(arguments, 1), c = this.list.length; c--;) this.list[c] && this.list[c][a] && this.list[c][a].apply(this.list[c], b) + }, + removeAll: function(a) { + void 0 === a && (a = !1); + for (var b = this.list.length; b--;) + if (this.list[b]) { + var c = this.remove(this.list[b]); + a && c.destroy() + } this.position = 0, this.list = [] + } + }, Object.defineProperty(c.ArraySet.prototype, "total", { + get: function() { + return this.list.length + } + }), Object.defineProperty(c.ArraySet.prototype, "first", { + get: function() { + return this.position = 0, this.list.length > 0 ? this.list[0] : null + } + }), Object.defineProperty(c.ArraySet.prototype, "next", { + get: function() { + return this.position < this.list.length ? (this.position++, this.list[this.position]) : null + } + }), c.ArraySet.prototype.constructor = c.ArraySet, c.ArrayUtils = { + getRandomItem: function(a, b, c) { + if (null === a) return null; + void 0 === b && (b = 0), void 0 === c && (c = a.length); + var d = b + Math.floor(Math.random() * c); + return void 0 === a[d] ? null : a[d] + }, + removeRandomItem: function(a, b, c) { + if (null == a) return null; + void 0 === b && (b = 0), void 0 === c && (c = a.length); + var d = b + Math.floor(Math.random() * c); + if (d < a.length) { + var e = a.splice(d, 1); + return void 0 === e[0] ? null : e[0] + } + return null + }, + shuffle: function(a) { + for (var b = a.length - 1; b > 0; b--) { + var c = Math.floor(Math.random() * (b + 1)), + d = a[b]; + a[b] = a[c], a[c] = d + } + return a + }, + transposeMatrix: function(a) { + for (var b = a.length, c = a[0].length, d = new Array(c), e = 0; e < c; e++) { + d[e] = new Array(b); + for (var f = b - 1; f > -1; f--) d[e][f] = a[f][e] + } + return d + }, + rotateMatrix: function(a, b) { + if ("string" != typeof b && (b = (b % 360 + 360) % 360), 90 === b || b === -270 || "rotateLeft" === b) a = c.ArrayUtils.transposeMatrix(a), a = a.reverse(); + else if (b === -90 || 270 === b || "rotateRight" === b) a = a.reverse(), a = c.ArrayUtils.transposeMatrix(a); + else if (180 === Math.abs(b) || "rotate180" === b) { + for (var d = 0; d < a.length; d++) a[d].reverse(); + a = a.reverse() + } + return a + }, + findClosest: function(a, b) { + if (!b.length) return NaN; + if (1 === b.length || a < b[0]) return b[0]; + for (var c = 1; b[c] < a;) c++; + var d = b[c - 1], + e = c < b.length ? b[c] : Number.POSITIVE_INFINITY; + return e - a <= a - d ? e : d + }, + rotateRight: function(a) { + var b = a.pop(); + return a.unshift(b), b + }, + rotateLeft: function(a) { + var b = a.shift(); + return a.push(b), b + }, + rotate: function(a) { + var b = a.shift(); + return a.push(b), b + }, + numberArray: function(a, b) { + for (var c = [], d = a; d <= b; d++) c.push(d); + return c + }, + numberArrayStep: function(a, b, d) { + void 0 !== a && null !== a || (a = 0), void 0 !== b && null !== b || (b = a, a = 0), void 0 === d && (d = 1); + for (var e = [], f = Math.max(c.Math.roundAwayFromZero((b - a) / (d || 1)), 0), g = 0; g < f; g++) e.push(a), a += d; + return e + } + }, c.LinkedList = function() { + this.next = null, this.prev = null, this.first = null, this.last = null, this.total = 0 + }, c.LinkedList.prototype = { + add: function(a) { + return 0 === this.total && null === this.first && null === this.last ? (this.first = a, this.last = a, this.next = a, a.prev = this, this.total++, a) : (this.last.next = a, a.prev = this.last, this.last = a, this.total++, a) + }, + reset: function() { + this.first = null, this.last = null, this.next = null, this.prev = null, this.total = 0 + }, + remove: function(a) { + return 1 === this.total ? (this.reset(), void(a.next = a.prev = null)) : (a === this.first ? this.first = this.first.next : a === this.last && (this.last = this.last.prev), a.prev && (a.prev.next = a.next), a.next && (a.next.prev = a.prev), a.next = a.prev = null, null === this.first && (this.last = null), void this.total--) + }, + callAll: function(a) { + if (this.first && this.last) { + var b = this.first; + do b && b[a] && b[a].call(b), b = b.next; while (b !== this.last.next) + } + } + }, c.LinkedList.prototype.constructor = c.LinkedList, c.Create = function(a) { + this.game = a, this.bmd = null, this.canvas = null, this.ctx = null, this.palettes = [{ + 0: "#000", + 1: "#9D9D9D", + 2: "#FFF", + 3: "#BE2633", + 4: "#E06F8B", + 5: "#493C2B", + 6: "#A46422", + 7: "#EB8931", + 8: "#F7E26B", + 9: "#2F484E", + A: "#44891A", + B: "#A3CE27", + C: "#1B2632", + D: "#005784", + E: "#31A2F2", + F: "#B2DCEF" + }, { + 0: "#000", + 1: "#191028", + 2: "#46af45", + 3: "#a1d685", + 4: "#453e78", + 5: "#7664fe", + 6: "#833129", + 7: "#9ec2e8", + 8: "#dc534b", + 9: "#e18d79", + A: "#d6b97b", + B: "#e9d8a1", + C: "#216c4b", + D: "#d365c8", + E: "#afaab9", + F: "#f5f4eb" + }, { + 0: "#000", + 1: "#2234d1", + 2: "#0c7e45", + 3: "#44aacc", + 4: "#8a3622", + 5: "#5c2e78", + 6: "#aa5c3d", + 7: "#b5b5b5", + 8: "#5e606e", + 9: "#4c81fb", + A: "#6cd947", + B: "#7be2f9", + C: "#eb8a60", + D: "#e23d69", + E: "#ffd93f", + F: "#fff" + }, { + 0: "#000", + 1: "#fff", + 2: "#8b4131", + 3: "#7bbdc5", + 4: "#8b41ac", + 5: "#6aac41", + 6: "#3931a4", + 7: "#d5de73", + 8: "#945a20", + 9: "#5a4100", + A: "#bd736a", + B: "#525252", + C: "#838383", + D: "#acee8b", + E: "#7b73de", + F: "#acacac" + }, { + 0: "#000", + 1: "#191028", + 2: "#46af45", + 3: "#a1d685", + 4: "#453e78", + 5: "#7664fe", + 6: "#833129", + 7: "#9ec2e8", + 8: "#dc534b", + 9: "#e18d79", + A: "#d6b97b", + B: "#e9d8a1", + C: "#216c4b", + D: "#d365c8", + E: "#afaab9", + F: "#fff" + }] + }, c.Create.PALETTE_ARNE = 0, c.Create.PALETTE_JMP = 1, c.Create.PALETTE_CGA = 2, c.Create.PALETTE_C64 = 3, c.Create.PALETTE_JAPANESE_MACHINE = 4, c.Create.prototype = { + texture: function(a, b, c, d, e) { + void 0 === c && (c = 8), void 0 === d && (d = c), void 0 === e && (e = 0); + var f = b[0].length * c, + g = b.length * d; + null === this.bmd && (this.bmd = this.game.make.bitmapData(), this.canvas = this.bmd.canvas, this.ctx = this.bmd.context), this.bmd.resize(f, g), this.bmd.clear(); + for (var h = 0; h < b.length; h++) + for (var i = b[h], j = 0; j < i.length; j++) { + var k = i[j]; + "." !== k && " " !== k && (this.ctx.fillStyle = this.palettes[e][k], this.ctx.fillRect(j * c, h * d, c, d)) + } + return this.bmd.generateTexture(a) + }, + grid: function(a, b, c, d, e, f) { + null === this.bmd && (this.bmd = this.game.make.bitmapData(), this.canvas = this.bmd.canvas, this.ctx = this.bmd.context), this.bmd.resize(b, c), this.ctx.fillStyle = f; + for (var g = 0; g < c; g += e) this.ctx.fillRect(0, g, b, 1); + for (var h = 0; h < b; h += d) this.ctx.fillRect(h, 0, 1, c); + return this.bmd.generateTexture(a) + } + }, c.Create.prototype.constructor = c.Create, c.FlexGrid = function(a, b, d) { + this.game = a.game, this.manager = a, this.width = b, this.height = d, this.boundsCustom = new c.Rectangle(0, 0, b, d), this.boundsFluid = new c.Rectangle(0, 0, b, d), this.boundsFull = new c.Rectangle(0, 0, b, d), this.boundsNone = new c.Rectangle(0, 0, b, d), this.positionCustom = new c.Point(0, 0), this.positionFluid = new c.Point(0, 0), this.positionFull = new c.Point(0, 0), this.positionNone = new c.Point(0, 0), this.scaleCustom = new c.Point(1, 1), this.scaleFluid = new c.Point(1, 1), this.scaleFluidInversed = new c.Point(1, 1), this.scaleFull = new c.Point(1, 1), this.scaleNone = new c.Point(1, 1), this.customWidth = 0, this.customHeight = 0, this.customOffsetX = 0, this.customOffsetY = 0, this.ratioH = b / d, this.ratioV = d / b, this.multiplier = 0, this.layers = [] + }, c.FlexGrid.prototype = { + setSize: function(a, b) { + this.width = a, this.height = b, this.ratioH = a / b, this.ratioV = b / a, this.scaleNone = new c.Point(1, 1), this.boundsNone.width = this.width, this.boundsNone.height = this.height, this.refresh() + }, + createCustomLayer: function(a, b, d, e) { + void 0 === e && (e = !0), this.customWidth = a, this.customHeight = b, this.boundsCustom.width = a, this.boundsCustom.height = b; + var f = new c.FlexLayer(this, this.positionCustom, this.boundsCustom, this.scaleCustom); + return e && this.game.world.add(f), this.layers.push(f), "undefined" != typeof d && null !== typeof d && f.addMultiple(d), f + }, + createFluidLayer: function(a, b) { + void 0 === b && (b = !0); + var d = new c.FlexLayer(this, this.positionFluid, this.boundsFluid, this.scaleFluid); + return b && this.game.world.add(d), this.layers.push(d), "undefined" != typeof a && null !== typeof a && d.addMultiple(a), d + }, + createFullLayer: function(a) { + var b = new c.FlexLayer(this, this.positionFull, this.boundsFull, this.scaleFluid); + return this.game.world.add(b), this.layers.push(b), "undefined" != typeof a && b.addMultiple(a), b + }, + createFixedLayer: function(a) { + var b = new c.FlexLayer(this, this.positionNone, this.boundsNone, this.scaleNone); + return this.game.world.add(b), this.layers.push(b), "undefined" != typeof a && b.addMultiple(a), b + }, + reset: function() { + for (var a = this.layers.length; a--;) this.layers[a].persist || (this.layers[a].position = null, this.layers[a].scale = null, this.layers.slice(a, 1)) + }, + onResize: function(a, b) { + this.ratioH = a / b, this.ratioV = b / a, this.refresh(a, b) + }, + refresh: function() { + this.multiplier = Math.min(this.manager.height / this.height, this.manager.width / this.width), this.boundsFluid.width = Math.round(this.width * this.multiplier), this.boundsFluid.height = Math.round(this.height * this.multiplier), this.scaleFluid.set(this.boundsFluid.width / this.width, this.boundsFluid.height / this.height), this.scaleFluidInversed.set(this.width / this.boundsFluid.width, this.height / this.boundsFluid.height), this.scaleFull.set(this.boundsFull.width / this.width, this.boundsFull.height / this.height), this.boundsFull.width = Math.round(this.manager.width * this.scaleFluidInversed.x), this.boundsFull.height = Math.round(this.manager.height * this.scaleFluidInversed.y), this.boundsFluid.centerOn(this.manager.bounds.centerX, this.manager.bounds.centerY), this.boundsNone.centerOn(this.manager.bounds.centerX, this.manager.bounds.centerY), this.positionFluid.set(this.boundsFluid.x, this.boundsFluid.y), this.positionNone.set(this.boundsNone.x, this.boundsNone.y) + }, + fitSprite: function(a) { + this.manager.scaleSprite(a), a.x = this.manager.bounds.centerX, a.y = this.manager.bounds.centerY + }, + debug: function() { + this.game.debug.text(this.boundsFluid.width + " x " + this.boundsFluid.height, this.boundsFluid.x + 4, this.boundsFluid.y + 16), this.game.debug.geom(this.boundsFluid, "rgba(255,0,0,0.9", !1) + } + }, c.FlexGrid.prototype.constructor = c.FlexGrid, c.FlexLayer = function(a, b, d, e) { + c.Group.call(this, a.game, null, "__flexLayer" + a.game.rnd.uuid(), !1), this.manager = a.manager, this.grid = a, this.persist = !1, this.position = b, this.bounds = d, this.scale = e, this.topLeft = d.topLeft, this.topMiddle = new c.Point(d.halfWidth, 0), this.topRight = d.topRight, this.bottomLeft = d.bottomLeft, this.bottomMiddle = new c.Point(d.halfWidth, d.bottom), this.bottomRight = d.bottomRight + }, c.FlexLayer.prototype = Object.create(c.Group.prototype), c.FlexLayer.prototype.constructor = c.FlexLayer, c.FlexLayer.prototype.resize = function() {}, c.FlexLayer.prototype.debug = function() { + this.game.debug.text(this.bounds.width + " x " + this.bounds.height, this.bounds.x + 4, this.bounds.y + 16), this.game.debug.geom(this.bounds, "rgba(0,0,255,0.9", !1), this.game.debug.geom(this.topLeft, "rgba(255,255,255,0.9"), this.game.debug.geom(this.topMiddle, "rgba(255,255,255,0.9"), this.game.debug.geom(this.topRight, "rgba(255,255,255,0.9") + }, c.Color = { + packPixel: function(a, b, d, e) { + return c.Device.LITTLE_ENDIAN ? (e << 24 | d << 16 | b << 8 | a) >>> 0 : (a << 24 | b << 16 | d << 8 | e) >>> 0 + }, + unpackPixel: function(a, b, d, e) { + return void 0 !== b && null !== b || (b = c.Color.createColor()), void 0 !== d && null !== d || (d = !1), void 0 !== e && null !== e || (e = !1), c.Device.LITTLE_ENDIAN ? (b.a = (4278190080 & a) >>> 24, b.b = (16711680 & a) >>> 16, b.g = (65280 & a) >>> 8, b.r = 255 & a) : (b.r = (4278190080 & a) >>> 24, b.g = (16711680 & a) >>> 16, b.b = (65280 & a) >>> 8, b.a = 255 & a), b.color = a, b.rgba = "rgba(" + b.r + "," + b.g + "," + b.b + "," + b.a / 255 + ")", d && c.Color.RGBtoHSL(b.r, b.g, b.b, b), e && c.Color.RGBtoHSV(b.r, b.g, b.b, b), b + }, + fromRGBA: function(a, b) { + return b || (b = c.Color.createColor()), b.r = (4278190080 & a) >>> 24, b.g = (16711680 & a) >>> 16, b.b = (65280 & a) >>> 8, b.a = 255 & a, b.rgba = "rgba(" + b.r + "," + b.g + "," + b.b + "," + b.a + ")", b + }, + toRGBA: function(a, b, c, d) { + return a << 24 | b << 16 | c << 8 | d + }, + toABGR: function(a, b, c, d) { + return (d << 24 | c << 16 | b << 8 | a) >>> 0 + }, + RGBtoHSL: function(a, b, d, e) { + e || (e = c.Color.createColor(a, b, d, 1)), a /= 255, b /= 255, d /= 255; + var f = Math.min(a, b, d), + g = Math.max(a, b, d); + if (e.h = 0, e.s = 0, e.l = (g + f) / 2, g !== f) { + var h = g - f; + e.s = e.l > .5 ? h / (2 - g - f) : h / (g + f), g === a ? e.h = (b - d) / h + (b < d ? 6 : 0) : g === b ? e.h = (d - a) / h + 2 : g === d && (e.h = (a - b) / h + 4), e.h /= 6 + } + return e + }, + HSLtoRGB: function(a, b, d, e) { + if (e ? (e.r = d, e.g = d, e.b = d) : e = c.Color.createColor(d, d, d), 0 !== b) { + var f = d < .5 ? d * (1 + b) : d + b - d * b, + g = 2 * d - f; + e.r = c.Color.hueToColor(g, f, a + 1 / 3), e.g = c.Color.hueToColor(g, f, a), e.b = c.Color.hueToColor(g, f, a - 1 / 3) + } + return e.r = Math.floor(255 * e.r | 0), e.g = Math.floor(255 * e.g | 0), e.b = Math.floor(255 * e.b | 0), c.Color.updateColor(e), e + }, + RGBtoHSV: function(a, b, d, e) { + e || (e = c.Color.createColor(a, b, d, 255)), a /= 255, b /= 255, d /= 255; + var f = Math.min(a, b, d), + g = Math.max(a, b, d), + h = g - f; + return e.h = 0, e.s = 0 === g ? 0 : h / g, e.v = g, g !== f && (g === a ? e.h = (b - d) / h + (b < d ? 6 : 0) : g === b ? e.h = (d - a) / h + 2 : g === d && (e.h = (a - b) / h + 4), e.h /= 6), e + }, + HSVtoRGB: function(a, b, d, e) { + void 0 === e && (e = c.Color.createColor(0, 0, 0, 1, a, b, 0, d)); + var f, g, h, i = Math.floor(6 * a), + j = 6 * a - i, + k = d * (1 - b), + l = d * (1 - j * b), + m = d * (1 - (1 - j) * b); + switch (i % 6) { + case 0: + f = d, g = m, h = k; + break; + case 1: + f = l, g = d, h = k; + break; + case 2: + f = k, g = d, h = m; + break; + case 3: + f = k, g = l, h = d; + break; + case 4: + f = m, g = k, h = d; + break; + case 5: + f = d, g = k, h = l + } + return e.r = Math.floor(255 * f), e.g = Math.floor(255 * g), e.b = Math.floor(255 * h), c.Color.updateColor(e), e + }, + hueToColor: function(a, b, c) { + return c < 0 && (c += 1), c > 1 && (c -= 1), c < 1 / 6 ? a + 6 * (b - a) * c : c < .5 ? b : c < 2 / 3 ? a + (b - a) * (2 / 3 - c) * 6 : a + }, + createColor: function(a, b, d, e, f, g, h, i) { + var j = { + r: a || 0, + g: b || 0, + b: d || 0, + a: e || 1, + h: f || 0, + s: g || 0, + l: h || 0, + v: i || 0, + color: 0, + color32: 0, + rgba: "" + }; + return c.Color.updateColor(j) + }, + updateColor: function(a) { + return a.rgba = "rgba(" + a.r.toString() + "," + a.g.toString() + "," + a.b.toString() + "," + a.a.toString() + ")", a.color = c.Color.getColor(a.r, a.g, a.b), a.color32 = c.Color.getColor32(255 * a.a, a.r, a.g, a.b), a + }, + getColor32: function(a, b, c, d) { + return a << 24 | b << 16 | c << 8 | d + }, + getColor: function(a, b, c) { + return a << 16 | b << 8 | c + }, + RGBtoString: function(a, b, d, e, f) { + return void 0 === e && (e = 255), void 0 === f && (f = "#"), "#" === f ? "#" + ((1 << 24) + (a << 16) + (b << 8) + d).toString(16).slice(1) : "0x" + c.Color.componentToHex(e) + c.Color.componentToHex(a) + c.Color.componentToHex(b) + c.Color.componentToHex(d) + }, + hexToRGB: function(a) { + var b = c.Color.hexToColor(a); + if (b) return c.Color.getColor32(b.a, b.r, b.g, b.b); + }, + hexToColor: function(a, b) { + a = a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i, function(a, b, c, d) { + return b + b + c + c + d + d + }); + var d = /^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a); + if (d) { + var e = parseInt(d[1], 16), + f = parseInt(d[2], 16), + g = parseInt(d[3], 16); + b ? (b.r = e, b.g = f, b.b = g) : b = c.Color.createColor(e, f, g) + } + return b + }, + webToColor: function(a, b) { + b || (b = c.Color.createColor()); + var d = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a); + return d && (b.r = parseInt(d[1], 10), b.g = parseInt(d[2], 10), b.b = parseInt(d[3], 10), b.a = void 0 !== d[4] ? parseFloat(d[4]) : 1, c.Color.updateColor(b)), b + }, + valueToColor: function(a, b) { + if (b || (b = c.Color.createColor()), "string" == typeof a) return 0 === a.indexOf("rgb") ? c.Color.webToColor(a, b) : (b.a = 1, c.Color.hexToColor(a, b)); + if ("number" == typeof a) { + var d = c.Color.getRGB(a); + return b.r = d.r, b.g = d.g, b.b = d.b, b.a = d.a / 255, b + } + return b + }, + componentToHex: function(a) { + var b = a.toString(16); + return 1 === b.length ? "0" + b : b + }, + HSVColorWheel: function(a, b) { + void 0 === a && (a = 1), void 0 === b && (b = 1); + for (var d = [], e = 0; e <= 359; e++) d.push(c.Color.HSVtoRGB(e / 359, a, b)); + return d + }, + HSLColorWheel: function(a, b) { + void 0 === a && (a = .5), void 0 === b && (b = .5); + for (var d = [], e = 0; e <= 359; e++) d.push(c.Color.HSLtoRGB(e / 359, a, b)); + return d + }, + interpolateColor: function(a, b, d, e, f) { + void 0 === f && (f = 255); + var g = c.Color.getRGB(a), + h = c.Color.getRGB(b), + i = (h.red - g.red) * e / d + g.red, + j = (h.green - g.green) * e / d + g.green, + k = (h.blue - g.blue) * e / d + g.blue; + return c.Color.getColor32(f, i, j, k) + }, + interpolateColorWithRGB: function(a, b, d, e, f, g) { + var h = c.Color.getRGB(a), + i = (b - h.red) * g / f + h.red, + j = (d - h.green) * g / f + h.green, + k = (e - h.blue) * g / f + h.blue; + return c.Color.getColor(i, j, k) + }, + interpolateRGB: function(a, b, d, e, f, g, h, i) { + var j = (e - a) * i / h + a, + k = (f - b) * i / h + b, + l = (g - d) * i / h + d; + return c.Color.getColor(j, k, l) + }, + getRandomColor: function(a, b, d) { + if (void 0 === a && (a = 0), void 0 === b && (b = 255), void 0 === d && (d = 255), b > 255 || a > b) return c.Color.getColor(255, 255, 255); + var e = a + Math.round(Math.random() * (b - a)), + f = a + Math.round(Math.random() * (b - a)), + g = a + Math.round(Math.random() * (b - a)); + return c.Color.getColor32(d, e, f, g) + }, + getRGB: function(a) { + return a > 16777215 ? { + alpha: a >>> 24, + red: a >> 16 & 255, + green: a >> 8 & 255, + blue: 255 & a, + a: a >>> 24, + r: a >> 16 & 255, + g: a >> 8 & 255, + b: 255 & a + } : { + alpha: 255, + red: a >> 16 & 255, + green: a >> 8 & 255, + blue: 255 & a, + a: 255, + r: a >> 16 & 255, + g: a >> 8 & 255, + b: 255 & a + } + }, + getWebRGB: function(a) { + if ("object" == typeof a) return "rgba(" + a.r.toString() + "," + a.g.toString() + "," + a.b.toString() + "," + (a.a / 255).toString() + ")"; + var b = c.Color.getRGB(a); + return "rgba(" + b.r.toString() + "," + b.g.toString() + "," + b.b.toString() + "," + (b.a / 255).toString() + ")" + }, + getAlpha: function(a) { + return a >>> 24 + }, + getAlphaFloat: function(a) { + return (a >>> 24) / 255 + }, + getRed: function(a) { + return a >> 16 & 255 + }, + getGreen: function(a) { + return a >> 8 & 255 + }, + getBlue: function(a) { + return 255 & a + }, + blendNormal: function(a) { + return a + }, + blendLighten: function(a, b) { + return b > a ? b : a + }, + blendDarken: function(a, b) { + return b > a ? a : b + }, + blendMultiply: function(a, b) { + return a * b / 255 + }, + blendAverage: function(a, b) { + return (a + b) / 2 + }, + blendAdd: function(a, b) { + return Math.min(255, a + b) + }, + blendSubtract: function(a, b) { + return Math.max(0, a + b - 255) + }, + blendDifference: function(a, b) { + return Math.abs(a - b) + }, + blendNegation: function(a, b) { + return 255 - Math.abs(255 - a - b) + }, + blendScreen: function(a, b) { + return 255 - ((255 - a) * (255 - b) >> 8) + }, + blendExclusion: function(a, b) { + return a + b - 2 * a * b / 255 + }, + blendOverlay: function(a, b) { + return b < 128 ? 2 * a * b / 255 : 255 - 2 * (255 - a) * (255 - b) / 255 + }, + blendSoftLight: function(a, b) { + return b < 128 ? 2 * ((a >> 1) + 64) * (b / 255) : 255 - 2 * (255 - ((a >> 1) + 64)) * (255 - b) / 255 + }, + blendHardLight: function(a, b) { + return c.Color.blendOverlay(b, a) + }, + blendColorDodge: function(a, b) { + return 255 === b ? b : Math.min(255, (a << 8) / (255 - b)) + }, + blendColorBurn: function(a, b) { + return 0 === b ? b : Math.max(0, 255 - (255 - a << 8) / b) + }, + blendLinearDodge: function(a, b) { + return c.Color.blendAdd(a, b) + }, + blendLinearBurn: function(a, b) { + return c.Color.blendSubtract(a, b) + }, + blendLinearLight: function(a, b) { + return b < 128 ? c.Color.blendLinearBurn(a, 2 * b) : c.Color.blendLinearDodge(a, 2 * (b - 128)) + }, + blendVividLight: function(a, b) { + return b < 128 ? c.Color.blendColorBurn(a, 2 * b) : c.Color.blendColorDodge(a, 2 * (b - 128)) + }, + blendPinLight: function(a, b) { + return b < 128 ? c.Color.blendDarken(a, 2 * b) : c.Color.blendLighten(a, 2 * (b - 128)) + }, + blendHardMix: function(a, b) { + return c.Color.blendVividLight(a, b) < 128 ? 0 : 255 + }, + blendReflect: function(a, b) { + return 255 === b ? b : Math.min(255, a * a / (255 - b)) + }, + blendGlow: function(a, b) { + return c.Color.blendReflect(b, a) + }, + blendPhoenix: function(a, b) { + return Math.min(a, b) - Math.max(a, b) + 255 + } + }, c.Physics = function(a, b) { + b = b || {}, this.game = a, this.config = b, this.arcade = null, this.p2 = null, this.ninja = null, this.box2d = null, this.chipmunk = null, this.matter = null, this.parseConfig() + }, c.Physics.ARCADE = 0, c.Physics.P2JS = 1, c.Physics.NINJA = 2, c.Physics.BOX2D = 3, c.Physics.CHIPMUNK = 4, c.Physics.MATTERJS = 5, c.Physics.prototype = { + parseConfig: function() { + this.config.hasOwnProperty("arcade") && this.config.arcade !== !0 || !c.Physics.hasOwnProperty("Arcade") || (this.arcade = new c.Physics.Arcade(this.game)), this.config.hasOwnProperty("ninja") && this.config.ninja === !0 && c.Physics.hasOwnProperty("Ninja") && (this.ninja = new c.Physics.Ninja(this.game)), this.config.hasOwnProperty("p2") && this.config.p2 === !0 && c.Physics.hasOwnProperty("P2") && (this.p2 = new c.Physics.P2(this.game, this.config)), this.config.hasOwnProperty("box2d") && this.config.box2d === !0 && c.Physics.hasOwnProperty("BOX2D") && (this.box2d = new c.Physics.BOX2D(this.game, this.config)), this.config.hasOwnProperty("matter") && this.config.matter === !0 && c.Physics.hasOwnProperty("Matter") && (this.matter = new c.Physics.Matter(this.game, this.config)) + }, + startSystem: function(a) { + a === c.Physics.ARCADE ? this.arcade = new c.Physics.Arcade(this.game) : a === c.Physics.P2JS ? null === this.p2 ? this.p2 = new c.Physics.P2(this.game, this.config) : this.p2.reset() : a === c.Physics.NINJA ? this.ninja = new c.Physics.Ninja(this.game) : a === c.Physics.BOX2D ? null === this.box2d ? this.box2d = new c.Physics.Box2D(this.game, this.config) : this.box2d.reset() : a === c.Physics.MATTERJS && (null === this.matter ? this.matter = new c.Physics.Matter(this.game, this.config) : this.matter.reset()) + }, + enable: function(a, b, d) { + void 0 === b && (b = c.Physics.ARCADE), void 0 === d && (d = !1), b === c.Physics.ARCADE ? this.arcade.enable(a) : b === c.Physics.P2JS && this.p2 ? this.p2.enable(a, d) : b === c.Physics.NINJA && this.ninja ? this.ninja.enableAABB(a) : b === c.Physics.BOX2D && this.box2d ? this.box2d.enable(a) : b === c.Physics.MATTERJS && this.matter ? this.matter.enable(a) : console.warn(a.key + " is attempting to enable a physics body using an unknown physics system.") + }, + preUpdate: function() { + this.p2 && this.p2.preUpdate(), this.box2d && this.box2d.preUpdate(), this.matter && this.matter.preUpdate() + }, + update: function() { + this.p2 && this.p2.update(), this.box2d && this.box2d.update(), this.matter && this.matter.update() + }, + setBoundsToWorld: function() { + this.arcade && this.arcade.setBoundsToWorld(), this.ninja && this.ninja.setBoundsToWorld(), this.p2 && this.p2.setBoundsToWorld(), this.box2d && this.box2d.setBoundsToWorld(), this.matter && this.matter.setBoundsToWorld() + }, + clear: function() { + this.p2 && this.p2.clear(), this.box2d && this.box2d.clear(), this.matter && this.matter.clear() + }, + reset: function() { + this.p2 && this.p2.reset(), this.box2d && this.box2d.reset(), this.matter && this.matter.reset() + }, + destroy: function() { + this.p2 && this.p2.destroy(), this.box2d && this.box2d.destroy(), this.matter && this.matter.destroy(), this.arcade = null, this.ninja = null, this.p2 = null, this.box2d = null, this.matter = null + } + }, c.Physics.prototype.constructor = c.Physics, c.Physics.Arcade = function(a) { + this.game = a, this.gravity = new c.Point, this.bounds = new c.Rectangle(0, 0, a.world.width, a.world.height), this.checkCollision = { + up: !0, + down: !0, + left: !0, + right: !0 + }, this.maxObjects = 10, this.maxLevels = 4, this.OVERLAP_BIAS = 4, this.forceX = !1, this.sortDirection = c.Physics.Arcade.LEFT_RIGHT, this.skipQuadTree = !0, this.isPaused = !1, this.quadTree = new c.QuadTree(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels), this._total = 0, this.setBoundsToWorld() + }, c.Physics.Arcade.prototype.constructor = c.Physics.Arcade, c.Physics.Arcade.SORT_NONE = 0, c.Physics.Arcade.LEFT_RIGHT = 1, c.Physics.Arcade.RIGHT_LEFT = 2, c.Physics.Arcade.TOP_BOTTOM = 3, c.Physics.Arcade.BOTTOM_TOP = 4, c.Physics.Arcade.prototype = { + setBounds: function(a, b, c, d) { + this.bounds.setTo(a, b, c, d) + }, + setBoundsToWorld: function() { + this.bounds.copyFrom(this.game.world.bounds) + }, + enable: function(a, b) { + void 0 === b && (b = !0); + var d = 1; + if (Array.isArray(a)) + for (d = a.length; d--;) a[d] instanceof c.Group ? this.enable(a[d].children, b) : (this.enableBody(a[d]), b && a[d].hasOwnProperty("children") && a[d].children.length > 0 && this.enable(a[d], !0)); + else a instanceof c.Group ? this.enable(a.children, b) : (this.enableBody(a), b && a.hasOwnProperty("children") && a.children.length > 0 && this.enable(a.children, !0)) + }, + enableBody: function(a) { + a.hasOwnProperty("body") && null === a.body && (a.body = new c.Physics.Arcade.Body(a), a.parent && a.parent instanceof c.Group && a.parent.addToHash(a)) + }, + updateMotion: function(a) { + var b = this.computeVelocity(0, a, a.angularVelocity, a.angularAcceleration, a.angularDrag, a.maxAngular) - a.angularVelocity; + a.angularVelocity += b, a.rotation += a.angularVelocity * this.game.time.physicsElapsed, a.velocity.x = this.computeVelocity(1, a, a.velocity.x, a.acceleration.x, a.drag.x, a.maxVelocity.x), a.velocity.y = this.computeVelocity(2, a, a.velocity.y, a.acceleration.y, a.drag.y, a.maxVelocity.y) + }, + computeVelocity: function(a, b, c, d, e, f) { + return void 0 === f && (f = 1e4), 1 === a && b.allowGravity ? c += (this.gravity.x + b.gravity.x) * this.game.time.physicsElapsed : 2 === a && b.allowGravity && (c += (this.gravity.y + b.gravity.y) * this.game.time.physicsElapsed), d ? c += d * this.game.time.physicsElapsed : e && (e *= this.game.time.physicsElapsed, c - e > 0 ? c -= e : c + e < 0 ? c += e : c = 0), c > f ? c = f : c < -f && (c = -f), c + }, + overlap: function(a, b, c, d, e) { + if (c = c || null, d = d || null, e = e || c, this._total = 0, !Array.isArray(a) && Array.isArray(b)) + for (var f = 0; f < b.length; f++) this.collideHandler(a, b[f], c, d, e, !0); + else if (Array.isArray(a) && !Array.isArray(b)) + for (var f = 0; f < a.length; f++) this.collideHandler(a[f], b, c, d, e, !0); + else if (Array.isArray(a) && Array.isArray(b)) + for (var f = 0; f < a.length; f++) + for (var g = 0; g < b.length; g++) this.collideHandler(a[f], b[g], c, d, e, !0); + else this.collideHandler(a, b, c, d, e, !0); + return this._total > 0 + }, + collide: function(a, b, c, d, e) { + if (c = c || null, d = d || null, e = e || c, this._total = 0, !Array.isArray(a) && Array.isArray(b)) + for (var f = 0; f < b.length; f++) this.collideHandler(a, b[f], c, d, e, !1); + else if (Array.isArray(a) && !Array.isArray(b)) + for (var f = 0; f < a.length; f++) this.collideHandler(a[f], b, c, d, e, !1); + else if (Array.isArray(a) && Array.isArray(b)) + for (var f = 0; f < a.length; f++) + for (var g = 0; g < b.length; g++) this.collideHandler(a[f], b[g], c, d, e, !1); + else this.collideHandler(a, b, c, d, e, !1); + return this._total > 0 + }, + sortLeftRight: function(a, b) { + return a.body && b.body ? a.body.x - b.body.x : 0 + }, + sortRightLeft: function(a, b) { + return a.body && b.body ? b.body.x - a.body.x : 0 + }, + sortTopBottom: function(a, b) { + return a.body && b.body ? a.body.y - b.body.y : 0 + }, + sortBottomTop: function(a, b) { + return a.body && b.body ? b.body.y - a.body.y : 0 + }, + sort: function(a, b) { + null !== a.physicsSortDirection ? b = a.physicsSortDirection : void 0 === b && (b = this.sortDirection), b === c.Physics.Arcade.LEFT_RIGHT ? a.hash.sort(this.sortLeftRight) : b === c.Physics.Arcade.RIGHT_LEFT ? a.hash.sort(this.sortRightLeft) : b === c.Physics.Arcade.TOP_BOTTOM ? a.hash.sort(this.sortTopBottom) : b === c.Physics.Arcade.BOTTOM_TOP && a.hash.sort(this.sortBottomTop) + }, + collideHandler: function(a, b, d, e, f, g) { + return void 0 === b && a.physicsType === c.GROUP ? (this.sort(a), void this.collideGroupVsSelf(a, d, e, f, g)) : void(a && b && a.exists && b.exists && (this.sortDirection !== c.Physics.Arcade.SORT_NONE && (a.physicsType === c.GROUP && this.sort(a), b.physicsType === c.GROUP && this.sort(b)), a.physicsType === c.SPRITE ? b.physicsType === c.SPRITE ? this.collideSpriteVsSprite(a, b, d, e, f, g) : b.physicsType === c.GROUP ? this.collideSpriteVsGroup(a, b, d, e, f, g) : b.physicsType === c.TILEMAPLAYER && this.collideSpriteVsTilemapLayer(a, b, d, e, f, g) : a.physicsType === c.GROUP ? b.physicsType === c.SPRITE ? this.collideSpriteVsGroup(b, a, d, e, f, g) : b.physicsType === c.GROUP ? this.collideGroupVsGroup(a, b, d, e, f, g) : b.physicsType === c.TILEMAPLAYER && this.collideGroupVsTilemapLayer(a, b, d, e, f, g) : a.physicsType === c.TILEMAPLAYER && (b.physicsType === c.SPRITE ? this.collideSpriteVsTilemapLayer(b, a, d, e, f, g) : b.physicsType === c.GROUP && this.collideGroupVsTilemapLayer(b, a, d, e, f, g)))) + }, + collideSpriteVsSprite: function(a, b, c, d, e, f) { + return !(!a.body || !b.body) && (this.separate(a.body, b.body, d, e, f) && (c && c.call(e, a, b), this._total++), !0) + }, + collideSpriteVsGroup: function(a, b, d, e, f, g) { + if (0 !== b.length && a.body) + if (this.skipQuadTree || a.body.skipQuadTree) + for (var h = {}, i = 0; i < b.hash.length; i++) { + var j = b.hash[i]; + if (j && j.exists && j.body) { + if (h = j.body.getBounds(h), this.sortDirection === c.Physics.Arcade.LEFT_RIGHT) { + if (a.body.right < h.x) break; + if (h.right < a.body.x) continue + } else if (this.sortDirection === c.Physics.Arcade.RIGHT_LEFT) { + if (a.body.x > h.right) break; + if (h.x > a.body.right) continue + } else if (this.sortDirection === c.Physics.Arcade.TOP_BOTTOM) { + if (a.body.bottom < h.y) break; + if (h.bottom < a.body.y) continue + } else if (this.sortDirection === c.Physics.Arcade.BOTTOM_TOP) { + if (a.body.y > h.bottom) break; + if (h.y > a.body.bottom) continue + } + this.collideSpriteVsSprite(a, j, d, e, f, g) + } + } else { + this.quadTree.clear(), this.quadTree.reset(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels), this.quadTree.populate(b); + for (var k = this.quadTree.retrieve(a), i = 0; i < k.length; i++) this.separate(a.body, k[i], e, f, g) && (d && d.call(f, a, k[i].sprite), this._total++) + } + }, + collideGroupVsSelf: function(a, b, d, e, f) { + if (0 !== a.length) + for (var g = 0; g < a.hash.length; g++) { + var h = {}, + i = a.hash[g]; + if (i && i.exists && i.body) { + h = i.body.getBounds(h); + for (var j = g + 1; j < a.hash.length; j++) { + var k = {}, + l = a.hash[j]; + if (l && l.exists && l.body) { + if (k = l.body.getBounds(k), this.sortDirection === c.Physics.Arcade.LEFT_RIGHT) { + if (h.right < k.x) break; + if (k.right < h.x) continue + } else if (this.sortDirection === c.Physics.Arcade.RIGHT_LEFT) { + if (h.x > k.right) continue; + if (k.x > h.right) break + } else if (this.sortDirection === c.Physics.Arcade.TOP_BOTTOM) { + if (h.bottom < k.y) continue; + if (k.bottom < h.y) break + } else if (this.sortDirection === c.Physics.Arcade.BOTTOM_TOP) { + if (h.y > k.bottom) continue; + if (k.y > i.body.bottom) break + } + this.collideSpriteVsSprite(i, l, b, d, e, f) + } + } + } + } + }, + collideGroupVsGroup: function(a, b, d, e, f, g) { + if (0 !== a.length && 0 !== b.length) + for (var h = 0; h < a.children.length; h++) a.children[h].exists && (a.children[h].physicsType === c.GROUP ? this.collideGroupVsGroup(a.children[h], b, d, e, f, g) : this.collideSpriteVsGroup(a.children[h], b, d, e, f, g)) + }, + separate: function(a, b, c, d, e) { + if (!a.enable || !b.enable || a.checkCollision.none || b.checkCollision.none || !this.intersects(a, b)) return !1; + if (c && c.call(d, a.sprite, b.sprite) === !1) return !1; + if (a.isCircle && b.isCircle) return this.separateCircle(a, b, e); + if (a.isCircle !== b.isCircle) { + var f = a.isCircle ? b : a, + g = a.isCircle ? a : b, + h = { + x: f.x, + y: f.y, + right: f.right, + bottom: f.bottom + }, + i = { + x: g.x + g.radius, + y: g.y + g.radius + }; + if ((i.y < h.y || i.y > h.bottom) && (i.x < h.x || i.x > h.right)) return this.separateCircle(a, b, e) + } + var j = !1, + k = !1; + this.forceX || Math.abs(this.gravity.y + a.gravity.y) < Math.abs(this.gravity.x + a.gravity.x) ? (j = this.separateX(a, b, e), this.intersects(a, b) && (k = this.separateY(a, b, e))) : (k = this.separateY(a, b, e), this.intersects(a, b) && (j = this.separateX(a, b, e))); + var l = j || k; + return l && (e ? (a.onOverlap && a.onOverlap.dispatch(a.sprite, b.sprite), b.onOverlap && b.onOverlap.dispatch(b.sprite, a.sprite)) : (a.onCollide && a.onCollide.dispatch(a.sprite, b.sprite), b.onCollide && b.onCollide.dispatch(b.sprite, a.sprite))), l + }, + intersects: function(a, b) { + return a !== b && (a.isCircle ? b.isCircle ? c.Math.distance(a.center.x, a.center.y, b.center.x, b.center.y) <= a.radius + b.radius : this.circleBodyIntersects(a, b) : b.isCircle ? this.circleBodyIntersects(b, a) : !(a.right <= b.position.x) && (!(a.bottom <= b.position.y) && (!(a.position.x >= b.right) && !(a.position.y >= b.bottom)))) + }, + circleBodyIntersects: function(a, b) { + var d = c.Math.clamp(a.center.x, b.left, b.right), + e = c.Math.clamp(a.center.y, b.top, b.bottom), + f = (a.center.x - d) * (a.center.x - d), + g = (a.center.y - e) * (a.center.y - e); + return f + g <= a.radius * a.radius + }, + separateCircle: function(a, b, d) { + this.getOverlapX(a, b), this.getOverlapY(a, b); + var e = b.center.x - a.center.x, + f = b.center.y - a.center.y, + g = Math.atan2(f, e), + h = 0; + if (a.isCircle !== b.isCircle) { + var i = { + x: b.isCircle ? a.position.x : b.position.x, + y: b.isCircle ? a.position.y : b.position.y, + right: b.isCircle ? a.right : b.right, + bottom: b.isCircle ? a.bottom : b.bottom + }, + j = { + x: a.isCircle ? a.position.x + a.radius : b.position.x + b.radius, + y: a.isCircle ? a.position.y + a.radius : b.position.y + b.radius, + radius: a.isCircle ? a.radius : b.radius + }; + j.y < i.y ? j.x < i.x ? h = c.Math.distance(j.x, j.y, i.x, i.y) - j.radius : j.x > i.right && (h = c.Math.distance(j.x, j.y, i.right, i.y) - j.radius) : j.y > i.bottom && (j.x < i.x ? h = c.Math.distance(j.x, j.y, i.x, i.bottom) - j.radius : j.x > i.right && (h = c.Math.distance(j.x, j.y, i.right, i.bottom) - j.radius)), h *= -1 + } else h = a.radius + b.radius - c.Math.distance(a.center.x, a.center.y, b.center.x, b.center.y); + if (d || 0 === h || a.immovable && b.immovable || a.customSeparateX || b.customSeparateX) return 0 !== h && (a.onOverlap && a.onOverlap.dispatch(a.sprite, b.sprite), b.onOverlap && b.onOverlap.dispatch(b.sprite, a.sprite)), 0 !== h; + var k = { + x: a.velocity.x * Math.cos(g) + a.velocity.y * Math.sin(g), + y: a.velocity.x * Math.sin(g) - a.velocity.y * Math.cos(g) + }, + l = { + x: b.velocity.x * Math.cos(g) + b.velocity.y * Math.sin(g), + y: b.velocity.x * Math.sin(g) - b.velocity.y * Math.cos(g) + }, + m = ((a.mass - b.mass) * k.x + 2 * b.mass * l.x) / (a.mass + b.mass), + n = (2 * a.mass * k.x + (b.mass - a.mass) * l.x) / (a.mass + b.mass); + return a.immovable || (a.velocity.x = (m * Math.cos(g) - k.y * Math.sin(g)) * a.bounce.x, a.velocity.y = (k.y * Math.cos(g) + m * Math.sin(g)) * a.bounce.y), b.immovable || (b.velocity.x = (n * Math.cos(g) - l.y * Math.sin(g)) * b.bounce.x, b.velocity.y = (l.y * Math.cos(g) + n * Math.sin(g)) * b.bounce.y), Math.abs(g) < Math.PI / 2 ? a.velocity.x > 0 && !a.immovable && b.velocity.x > a.velocity.x ? a.velocity.x *= -1 : b.velocity.x < 0 && !b.immovable && a.velocity.x < b.velocity.x ? b.velocity.x *= -1 : a.velocity.y > 0 && !a.immovable && b.velocity.y > a.velocity.y ? a.velocity.y *= -1 : b.velocity.y < 0 && !b.immovable && a.velocity.y < b.velocity.y && (b.velocity.y *= -1) : Math.abs(g) > Math.PI / 2 && (a.velocity.x < 0 && !a.immovable && b.velocity.x < a.velocity.x ? a.velocity.x *= -1 : b.velocity.x > 0 && !b.immovable && a.velocity.x > b.velocity.x ? b.velocity.x *= -1 : a.velocity.y < 0 && !a.immovable && b.velocity.y < a.velocity.y ? a.velocity.y *= -1 : b.velocity.y > 0 && !b.immovable && a.velocity.x > b.velocity.y && (b.velocity.y *= -1)), a.immovable || (a.x += a.velocity.x * this.game.time.physicsElapsed - h * Math.cos(g), a.y += a.velocity.y * this.game.time.physicsElapsed - h * Math.sin(g)), b.immovable || (b.x += b.velocity.x * this.game.time.physicsElapsed + h * Math.cos(g), b.y += b.velocity.y * this.game.time.physicsElapsed + h * Math.sin(g)), a.onCollide && a.onCollide.dispatch(a.sprite, b.sprite), b.onCollide && b.onCollide.dispatch(b.sprite, a.sprite), !0 + }, + getOverlapX: function(a, b, c) { + var d = 0, + e = a.deltaAbsX() + b.deltaAbsX() + this.OVERLAP_BIAS; + return 0 === a.deltaX() && 0 === b.deltaX() ? (a.embedded = !0, b.embedded = !0) : a.deltaX() > b.deltaX() ? (d = a.right - b.x, d > e && !c || a.checkCollision.right === !1 || b.checkCollision.left === !1 ? d = 0 : (a.touching.none = !1, a.touching.right = !0, b.touching.none = !1, b.touching.left = !0)) : a.deltaX() < b.deltaX() && (d = a.x - b.width - b.x, -d > e && !c || a.checkCollision.left === !1 || b.checkCollision.right === !1 ? d = 0 : (a.touching.none = !1, a.touching.left = !0, b.touching.none = !1, b.touching.right = !0)), a.overlapX = d, b.overlapX = d, d + }, + getOverlapY: function(a, b, c) { + var d = 0, + e = a.deltaAbsY() + b.deltaAbsY() + this.OVERLAP_BIAS; + return 0 === a.deltaY() && 0 === b.deltaY() ? (a.embedded = !0, b.embedded = !0) : a.deltaY() > b.deltaY() ? (d = a.bottom - b.y, d > e && !c || a.checkCollision.down === !1 || b.checkCollision.up === !1 ? d = 0 : (a.touching.none = !1, a.touching.down = !0, b.touching.none = !1, b.touching.up = !0)) : a.deltaY() < b.deltaY() && (d = a.y - b.bottom, -d > e && !c || a.checkCollision.up === !1 || b.checkCollision.down === !1 ? d = 0 : (a.touching.none = !1, a.touching.up = !0, b.touching.none = !1, b.touching.down = !0)), a.overlapY = d, b.overlapY = d, d + }, + separateX: function(a, b, c) { + var d = this.getOverlapX(a, b, c); + if (c || 0 === d || a.immovable && b.immovable || a.customSeparateX || b.customSeparateX) return 0 !== d || a.embedded && b.embedded; + var e = a.velocity.x, + f = b.velocity.x; + if (a.immovable || b.immovable) a.immovable ? (b.x += d, b.velocity.x = e - f * b.bounce.x, a.moves && (b.y += (a.y - a.prev.y) * a.friction.y)) : (a.x -= d, a.velocity.x = f - e * a.bounce.x, b.moves && (a.y += (b.y - b.prev.y) * b.friction.y)); + else { + d *= .5, a.x -= d, b.x += d; + var g = Math.sqrt(f * f * b.mass / a.mass) * (f > 0 ? 1 : -1), + h = Math.sqrt(e * e * a.mass / b.mass) * (e > 0 ? 1 : -1), + i = .5 * (g + h); + g -= i, h -= i, a.velocity.x = i + g * a.bounce.x, b.velocity.x = i + h * b.bounce.x + } + return !0 + }, + separateY: function(a, b, c) { + var d = this.getOverlapY(a, b, c); + if (c || 0 === d || a.immovable && b.immovable || a.customSeparateY || b.customSeparateY) return 0 !== d || a.embedded && b.embedded; + var e = a.velocity.y, + f = b.velocity.y; + if (a.immovable || b.immovable) a.immovable ? (b.y += d, b.velocity.y = e - f * b.bounce.y, a.moves && (b.x += (a.x - a.prev.x) * a.friction.x)) : (a.y -= d, a.velocity.y = f - e * a.bounce.y, b.moves && (a.x += (b.x - b.prev.x) * b.friction.x)); + else { + d *= .5, a.y -= d, b.y += d; + var g = Math.sqrt(f * f * b.mass / a.mass) * (f > 0 ? 1 : -1), + h = Math.sqrt(e * e * a.mass / b.mass) * (e > 0 ? 1 : -1), + i = .5 * (g + h); + g -= i, h -= i, a.velocity.y = i + g * a.bounce.y, b.velocity.y = i + h * b.bounce.y + } + return !0 + }, + getObjectsUnderPointer: function(a, b, c, d) { + if (0 !== b.length && a.exists) return this.getObjectsAtLocation(a.x, a.y, b, c, d, a) + }, + getObjectsAtLocation: function(a, b, d, e, f, g) { + this.quadTree.clear(), this.quadTree.reset(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels), this.quadTree.populate(d); + for (var h = new c.Rectangle(a, b, 1, 1), i = [], j = this.quadTree.retrieve(h), k = 0; k < j.length; k++) j[k].hitTest(a, b) && (e && e.call(f, g, j[k].sprite), i.push(j[k].sprite)); + return i + }, + moveToObject: function(a, b, c, d) { + void 0 === c && (c = 60), void 0 === d && (d = 0); + var e = Math.atan2(b.y - a.y, b.x - a.x); + return d > 0 && (c = this.distanceBetween(a, b) / (d / 1e3)), a.body.velocity.x = Math.cos(e) * c, a.body.velocity.y = Math.sin(e) * c, e + }, + moveToPointer: function(a, b, c, d) { + void 0 === b && (b = 60), c = c || this.game.input.activePointer, void 0 === d && (d = 0); + var e = this.angleToPointer(a, c); + return d > 0 && (b = this.distanceToPointer(a, c) / (d / 1e3)), a.body.velocity.x = Math.cos(e) * b, a.body.velocity.y = Math.sin(e) * b, e + }, + moveToXY: function(a, b, c, d, e) { + void 0 === d && (d = 60), void 0 === e && (e = 0); + var f = Math.atan2(c - a.y, b - a.x); + return e > 0 && (d = this.distanceToXY(a, b, c) / (e / 1e3)), a.body.velocity.x = Math.cos(f) * d, a.body.velocity.y = Math.sin(f) * d, f + }, + velocityFromAngle: function(a, b, d) { + return void 0 === b && (b = 60), d = d || new c.Point, d.setTo(Math.cos(this.game.math.degToRad(a)) * b, Math.sin(this.game.math.degToRad(a)) * b) + }, + velocityFromRotation: function(a, b, d) { + return void 0 === b && (b = 60), d = d || new c.Point, d.setTo(Math.cos(a) * b, Math.sin(a) * b) + }, + accelerationFromRotation: function(a, b, d) { + return void 0 === b && (b = 60), d = d || new c.Point, d.setTo(Math.cos(a) * b, Math.sin(a) * b) + }, + accelerateToObject: function(a, b, c, d, e) { + void 0 === c && (c = 60), void 0 === d && (d = 1e3), void 0 === e && (e = 1e3); + var f = this.angleBetween(a, b); + return a.body.acceleration.setTo(Math.cos(f) * c, Math.sin(f) * c), a.body.maxVelocity.setTo(d, e), f + }, + accelerateToPointer: function(a, b, c, d, e) { + void 0 === c && (c = 60), void 0 === b && (b = this.game.input.activePointer), void 0 === d && (d = 1e3), void 0 === e && (e = 1e3); + var f = this.angleToPointer(a, b); + return a.body.acceleration.setTo(Math.cos(f) * c, Math.sin(f) * c), a.body.maxVelocity.setTo(d, e), f + }, + accelerateToXY: function(a, b, c, d, e, f) { + void 0 === d && (d = 60), void 0 === e && (e = 1e3), void 0 === f && (f = 1e3); + var g = this.angleToXY(a, b, c); + return a.body.acceleration.setTo(Math.cos(g) * d, Math.sin(g) * d), a.body.maxVelocity.setTo(e, f), g + }, + distanceBetween: function(a, b, c) { + void 0 === c && (c = !1); + var d = c ? a.world.x - b.world.x : a.x - b.x, + e = c ? a.world.y - b.world.y : a.y - b.y; + return Math.sqrt(d * d + e * e) + }, + distanceToXY: function(a, b, c, d) { + void 0 === d && (d = !1); + var e = d ? a.world.x - b : a.x - b, + f = d ? a.world.y - c : a.y - c; + return Math.sqrt(e * e + f * f) + }, + distanceToPointer: function(a, b, c) { + void 0 === b && (b = this.game.input.activePointer), void 0 === c && (c = !1); + var d = c ? a.world.x - b.worldX : a.x - b.worldX, + e = c ? a.world.y - b.worldY : a.y - b.worldY; + return Math.sqrt(d * d + e * e) + }, + angleBetween: function(a, b, c) { + return void 0 === c && (c = !1), c ? Math.atan2(b.world.y - a.world.y, b.world.x - a.world.x) : Math.atan2(b.y - a.y, b.x - a.x) + }, + angleBetweenCenters: function(a, b) { + var c = b.centerX - a.centerX, + d = b.centerY - a.centerY; + return Math.atan2(d, c) + }, + angleToXY: function(a, b, c, d) { + return void 0 === d && (d = !1), d ? Math.atan2(c - a.world.y, b - a.world.x) : Math.atan2(c - a.y, b - a.x) + }, + angleToPointer: function(a, b, c) { + return void 0 === b && (b = this.game.input.activePointer), void 0 === c && (c = !1), c ? Math.atan2(b.worldY - a.world.y, b.worldX - a.world.x) : Math.atan2(b.worldY - a.y, b.worldX - a.x) + }, + worldAngleToPointer: function(a, b) { + return this.angleToPointer(a, b, !0) + } + }, c.Physics.Arcade.Body = function(a) { + this.sprite = a, this.game = a.game, this.type = c.Physics.ARCADE, this.enable = !0, this.isCircle = !1, this.radius = 0, this.offset = new c.Point, this.position = new c.Point(a.x, a.y), this.prev = new c.Point(this.position.x, this.position.y), this.allowRotation = !0, this.rotation = a.angle, this.preRotation = a.angle, this.width = a.width, this.height = a.height, this.sourceWidth = a.width, this.sourceHeight = a.height, a.texture && (this.sourceWidth = a.texture.frame.width, this.sourceHeight = a.texture.frame.height), this.halfWidth = Math.abs(a.width / 2), this.halfHeight = Math.abs(a.height / 2), this.center = new c.Point(a.x + this.halfWidth, a.y + this.halfHeight), this.velocity = new c.Point, this.newVelocity = new c.Point, this.deltaMax = new c.Point, this.acceleration = new c.Point, this.drag = new c.Point, this.allowGravity = !0, this.gravity = new c.Point, this.bounce = new c.Point, this.worldBounce = null, this.onWorldBounds = null, this.onCollide = null, this.onOverlap = null, this.maxVelocity = new c.Point(1e4, 1e4), this.friction = new c.Point(1, 0), this.angularVelocity = 0, this.angularAcceleration = 0, this.angularDrag = 0, this.maxAngular = 1e3, this.mass = 1, this.angle = 0, this.speed = 0, this.facing = c.NONE, this.immovable = !1, this.moves = !0, this.customSeparateX = !1, this.customSeparateY = !1, this.overlapX = 0, this.overlapY = 0, this.overlapR = 0, this.embedded = !1, this.collideWorldBounds = !1, this.checkCollision = { + none: !1, + any: !0, + up: !0, + down: !0, + left: !0, + right: !0 + }, this.touching = { + none: !0, + up: !1, + down: !1, + left: !1, + right: !1 + }, this.wasTouching = { + none: !0, + up: !1, + down: !1, + left: !1, + right: !1 + }, this.blocked = { + up: !1, + down: !1, + left: !1, + right: !1 + }, this.tilePadding = new c.Point, this.dirty = !1, this.skipQuadTree = !1, this.syncBounds = !1, this.isMoving = !1, this.stopVelocityOnCollide = !0, this.moveTimer = 0, this.moveDistance = 0, this.moveDuration = 0, this.moveTarget = null, this.moveEnd = null, this.onMoveComplete = new c.Signal, this.movementCallback = null, this.movementCallbackContext = null, this._reset = !0, this._sx = a.scale.x, this._sy = a.scale.y, this._dx = 0, this._dy = 0 + }, c.Physics.Arcade.Body.prototype = { + updateBounds: function() { + if (this.syncBounds) { + var a = this.sprite.getBounds(); + a.ceilAll(), a.width === this.width && a.height === this.height || (this.width = a.width, this.height = a.height, this._reset = !0) + } else { + var b = Math.abs(this.sprite.scale.x), + c = Math.abs(this.sprite.scale.y); + b === this._sx && c === this._sy || (this.width = this.sourceWidth * b, this.height = this.sourceHeight * c, this._sx = b, this._sy = c, this._reset = !0) + } + this._reset && (this.halfWidth = Math.floor(this.width / 2), this.halfHeight = Math.floor(this.height / 2), this.center.setTo(this.position.x + this.halfWidth, this.position.y + this.halfHeight)) + }, + preUpdate: function() { + this.enable && !this.game.physics.arcade.isPaused && (this.dirty = !0, this.wasTouching.none = this.touching.none, this.wasTouching.up = this.touching.up, this.wasTouching.down = this.touching.down, this.wasTouching.left = this.touching.left, this.wasTouching.right = this.touching.right, this.touching.none = !0, this.touching.up = !1, this.touching.down = !1, this.touching.left = !1, this.touching.right = !1, this.blocked.up = !1, this.blocked.down = !1, this.blocked.left = !1, this.blocked.right = !1, this.embedded = !1, this.updateBounds(), this.position.x = this.sprite.world.x - this.sprite.anchor.x * this.sprite.width + this.sprite.scale.x * this.offset.x, this.position.x -= this.sprite.scale.x < 0 ? this.width : 0, this.position.y = this.sprite.world.y - this.sprite.anchor.y * this.sprite.height + this.sprite.scale.y * this.offset.y, this.position.y -= this.sprite.scale.y < 0 ? this.height : 0, this.rotation = this.sprite.angle, this.preRotation = this.rotation, (this._reset || this.sprite.fresh) && (this.prev.x = this.position.x, this.prev.y = this.position.y), this.moves && (this.game.physics.arcade.updateMotion(this), this.newVelocity.set(this.velocity.x * this.game.time.physicsElapsed, this.velocity.y * this.game.time.physicsElapsed), this.position.x += this.newVelocity.x, this.position.y += this.newVelocity.y, this.position.x === this.prev.x && this.position.y === this.prev.y || (this.angle = Math.atan2(this.velocity.y, this.velocity.x)), this.speed = Math.sqrt(this.velocity.x * this.velocity.x + this.velocity.y * this.velocity.y), this.collideWorldBounds && this.checkWorldBounds() && this.onWorldBounds && this.onWorldBounds.dispatch(this.sprite, this.blocked.up, this.blocked.down, this.blocked.left, this.blocked.right)), this._dx = this.deltaX(), this._dy = this.deltaY(), this._reset = !1) + }, + updateMovement: function() { + var a = 0, + b = 0 !== this.overlapX || 0 !== this.overlapY; + if (this.moveDuration > 0 ? (this.moveTimer += this.game.time.elapsedMS, a = this.moveTimer / this.moveDuration) : (this.moveTarget.end.set(this.position.x, this.position.y), a = this.moveTarget.length / this.moveDistance), this.movementCallback) var c = this.movementCallback.call(this.movementCallbackContext, this, this.velocity, a); + return !(b || a >= 1 || void 0 !== c && c !== !0) || (this.stopMovement(a >= 1 || this.stopVelocityOnCollide && b), !1) + }, + stopMovement: function(a) { + this.isMoving && (this.isMoving = !1, a && this.velocity.set(0), this.onMoveComplete.dispatch(this.sprite, 0 !== this.overlapX || 0 !== this.overlapY)) + }, + postUpdate: function() { + this.enable && this.dirty && (this.isMoving && this.updateMovement(), this.dirty = !1, this.deltaX() < 0 ? this.facing = c.LEFT : this.deltaX() > 0 && (this.facing = c.RIGHT), this.deltaY() < 0 ? this.facing = c.UP : this.deltaY() > 0 && (this.facing = c.DOWN), this.moves && (this._dx = this.deltaX(), this._dy = this.deltaY(), 0 !== this.deltaMax.x && 0 !== this._dx && (this._dx < 0 && this._dx < -this.deltaMax.x ? this._dx = -this.deltaMax.x : this._dx > 0 && this._dx > this.deltaMax.x && (this._dx = this.deltaMax.x)), 0 !== this.deltaMax.y && 0 !== this._dy && (this._dy < 0 && this._dy < -this.deltaMax.y ? this._dy = -this.deltaMax.y : this._dy > 0 && this._dy > this.deltaMax.y && (this._dy = this.deltaMax.y)), this.sprite.position.x += this._dx, this.sprite.position.y += this._dy, this._reset = !0), this.center.setTo(this.position.x + this.halfWidth, this.position.y + this.halfHeight), this.allowRotation && (this.sprite.angle += this.deltaZ()), this.prev.x = this.position.x, this.prev.y = this.position.y) + }, + checkWorldBounds: function() { + var a = this.position, + b = this.game.physics.arcade.bounds, + c = this.game.physics.arcade.checkCollision, + d = this.worldBounce ? -this.worldBounce.x : -this.bounce.x, + e = this.worldBounce ? -this.worldBounce.y : -this.bounce.y; + if (this.isCircle) { + var f = { + x: this.center.x - this.radius, + y: this.center.y - this.radius, + right: this.center.x + this.radius, + bottom: this.center.y + this.radius + }; + f.x < b.x && c.left ? (a.x = b.x - this.halfWidth + this.radius, this.velocity.x *= d, this.blocked.left = !0) : f.right > b.right && c.right && (a.x = b.right - this.halfWidth - this.radius, this.velocity.x *= d, this.blocked.right = !0), f.y < b.y && c.up ? (a.y = b.y - this.halfHeight + this.radius, this.velocity.y *= e, this.blocked.up = !0) : f.bottom > b.bottom && c.down && (a.y = b.bottom - this.halfHeight - this.radius, this.velocity.y *= e, this.blocked.down = !0) + } else a.x < b.x && c.left ? (a.x = b.x, this.velocity.x *= d, this.blocked.left = !0) : this.right > b.right && c.right && (a.x = b.right - this.width, this.velocity.x *= d, this.blocked.right = !0), a.y < b.y && c.up ? (a.y = b.y, this.velocity.y *= e, this.blocked.up = !0) : this.bottom > b.bottom && c.down && (a.y = b.bottom - this.height, this.velocity.y *= e, this.blocked.down = !0); + return this.blocked.up || this.blocked.down || this.blocked.left || this.blocked.right + }, + moveFrom: function(a, b, c) { + if (void 0 === b && (b = this.speed), 0 === b) return !1; + var d; + return void 0 === c ? (d = this.angle, c = this.game.math.radToDeg(d)) : d = this.game.math.degToRad(c), this.moveTimer = 0, this.moveDuration = a, 0 === c || 180 === c ? this.velocity.set(Math.cos(d) * b, 0) : 90 === c || 270 === c ? this.velocity.set(0, Math.sin(d) * b) : this.velocity.set(Math.cos(d) * b, Math.sin(d) * b), this.isMoving = !0, !0 + }, + moveTo: function(a, b, d) { + var e = b / (a / 1e3); + if (0 === e) return !1; + var f; + return void 0 === d ? (f = this.angle, d = this.game.math.radToDeg(f)) : f = this.game.math.degToRad(d), b = Math.abs(b), this.moveDuration = 0, this.moveDistance = b, null === this.moveTarget && (this.moveTarget = new c.Line, this.moveEnd = new c.Point), this.moveTarget.fromAngle(this.x, this.y, f, b), this.moveEnd.set(this.moveTarget.end.x, this.moveTarget.end.y), this.moveTarget.setTo(this.x, this.y, this.x, this.y), 0 === d || 180 === d ? this.velocity.set(Math.cos(f) * e, 0) : 90 === d || 270 === d ? this.velocity.set(0, Math.sin(f) * e) : this.velocity.set(Math.cos(f) * e, Math.sin(f) * e), + this.isMoving = !0, !0 + }, + setSize: function(a, b, c, d) { + void 0 === c && (c = this.offset.x), void 0 === d && (d = this.offset.y), this.sourceWidth = a, this.sourceHeight = b, this.width = this.sourceWidth * this._sx, this.height = this.sourceHeight * this._sy, this.halfWidth = Math.floor(this.width / 2), this.halfHeight = Math.floor(this.height / 2), this.offset.setTo(c, d), this.center.setTo(this.position.x + this.halfWidth, this.position.y + this.halfHeight), this.isCircle = !1, this.radius = 0 + }, + setCircle: function(a, b, c) { + void 0 === b && (b = this.offset.x), void 0 === c && (c = this.offset.y), a > 0 ? (this.isCircle = !0, this.radius = a, this.sourceWidth = 2 * a, this.sourceHeight = 2 * a, this.width = this.sourceWidth * this._sx, this.height = this.sourceHeight * this._sy, this.halfWidth = Math.floor(this.width / 2), this.halfHeight = Math.floor(this.height / 2), this.offset.setTo(b, c), this.center.setTo(this.position.x + this.halfWidth, this.position.y + this.halfHeight)) : this.isCircle = !1 + }, + reset: function(a, b) { + this.velocity.set(0), this.acceleration.set(0), this.speed = 0, this.angularVelocity = 0, this.angularAcceleration = 0, this.position.x = a - this.sprite.anchor.x * this.sprite.width + this.sprite.scale.x * this.offset.x, this.position.x -= this.sprite.scale.x < 0 ? this.width : 0, this.position.y = b - this.sprite.anchor.y * this.sprite.height + this.sprite.scale.y * this.offset.y, this.position.y -= this.sprite.scale.y < 0 ? this.height : 0, this.prev.x = this.position.x, this.prev.y = this.position.y, this.rotation = this.sprite.angle, this.preRotation = this.rotation, this._sx = this.sprite.scale.x, this._sy = this.sprite.scale.y, this.center.setTo(this.position.x + this.halfWidth, this.position.y + this.halfHeight) + }, + getBounds: function(a) { + return this.isCircle ? (a.x = this.center.x - this.radius, a.y = this.center.y - this.radius, a.right = this.center.x + this.radius, a.bottom = this.center.y + this.radius) : (a.x = this.x, a.y = this.y, a.right = this.right, a.bottom = this.bottom), a + }, + hitTest: function(a, b) { + return this.isCircle ? c.Circle.contains(this, a, b) : c.Rectangle.contains(this, a, b) + }, + onFloor: function() { + return this.blocked.down + }, + onCeiling: function() { + return this.blocked.up + }, + onWall: function() { + return this.blocked.left || this.blocked.right + }, + deltaAbsX: function() { + return this.deltaX() > 0 ? this.deltaX() : -this.deltaX() + }, + deltaAbsY: function() { + return this.deltaY() > 0 ? this.deltaY() : -this.deltaY() + }, + deltaX: function() { + return this.position.x - this.prev.x + }, + deltaY: function() { + return this.position.y - this.prev.y + }, + deltaZ: function() { + return this.rotation - this.preRotation + }, + destroy: function() { + this.sprite.parent && this.sprite.parent instanceof c.Group && this.sprite.parent.removeFromHash(this.sprite), this.sprite.body = null, this.sprite = null + } + }, Object.defineProperty(c.Physics.Arcade.Body.prototype, "left", { + get: function() { + return this.position.x + } + }), Object.defineProperty(c.Physics.Arcade.Body.prototype, "right", { + get: function() { + return this.position.x + this.width + } + }), Object.defineProperty(c.Physics.Arcade.Body.prototype, "top", { + get: function() { + return this.position.y + } + }), Object.defineProperty(c.Physics.Arcade.Body.prototype, "bottom", { + get: function() { + return this.position.y + this.height + } + }), Object.defineProperty(c.Physics.Arcade.Body.prototype, "x", { + get: function() { + return this.position.x + }, + set: function(a) { + this.position.x = a + } + }), Object.defineProperty(c.Physics.Arcade.Body.prototype, "y", { + get: function() { + return this.position.y + }, + set: function(a) { + this.position.y = a + } + }), c.Physics.Arcade.Body.render = function(a, b, c, d) { + void 0 === d && (d = !0), c = c || "rgba(0,255,0,0.4)", a.fillStyle = c, a.strokeStyle = c, b.isCircle ? (a.beginPath(), a.arc(b.center.x - b.game.camera.x, b.center.y - b.game.camera.y, b.radius, 0, 2 * Math.PI), d ? a.fill() : a.stroke()) : d ? a.fillRect(b.position.x - b.game.camera.x, b.position.y - b.game.camera.y, b.width, b.height) : a.strokeRect(b.position.x - b.game.camera.x, b.position.y - b.game.camera.y, b.width, b.height) + }, c.Physics.Arcade.Body.renderBodyInfo = function(a, b) { + a.line("x: " + b.x.toFixed(2), "y: " + b.y.toFixed(2), "width: " + b.width, "height: " + b.height), a.line("velocity x: " + b.velocity.x.toFixed(2), "y: " + b.velocity.y.toFixed(2), "deltaX: " + b._dx.toFixed(2), "deltaY: " + b._dy.toFixed(2)), a.line("acceleration x: " + b.acceleration.x.toFixed(2), "y: " + b.acceleration.y.toFixed(2), "speed: " + b.speed.toFixed(2), "angle: " + b.angle.toFixed(2)), a.line("gravity x: " + b.gravity.x, "y: " + b.gravity.y, "bounce x: " + b.bounce.x.toFixed(2), "y: " + b.bounce.y.toFixed(2)), a.line("touching left: " + b.touching.left, "right: " + b.touching.right, "up: " + b.touching.up, "down: " + b.touching.down), a.line("blocked left: " + b.blocked.left, "right: " + b.blocked.right, "up: " + b.blocked.up, "down: " + b.blocked.down) + }, c.Physics.Arcade.Body.prototype.constructor = c.Physics.Arcade.Body, c.Physics.Arcade.TilemapCollision = function() {}, c.Physics.Arcade.TilemapCollision.prototype = { + TILE_BIAS: 16, + collideSpriteVsTilemapLayer: function(a, b, c, d, e, f) { + if (a.body) { + var g = b.getTiles(a.body.position.x - a.body.tilePadding.x, a.body.position.y - a.body.tilePadding.y, a.body.width + a.body.tilePadding.x, a.body.height + a.body.tilePadding.y, !1, !1); + if (0 !== g.length) + for (var h = 0; h < g.length; h++) d ? d.call(e, a, g[h]) && this.separateTile(h, a.body, g[h], b, f) && (this._total++, c && c.call(e, a, g[h])) : this.separateTile(h, a.body, g[h], b, f) && (this._total++, c && c.call(e, a, g[h])) + } + }, + collideGroupVsTilemapLayer: function(a, b, c, d, e, f) { + if (0 !== a.length) + for (var g = 0; g < a.children.length; g++) a.children[g].exists && this.collideSpriteVsTilemapLayer(a.children[g], b, c, d, e, f) + }, + separateTile: function(a, b, c, d, e) { + if (!b.enable) return !1; + var f = d.fixedToCamera ? 0 : d.position.x, + g = d.fixedToCamera ? 0 : d.position.y; + if (!c.intersects(b.position.x - f, b.position.y - g, b.right - f, b.bottom - g)) return !1; + if (e) return !0; + if (c.collisionCallback && !c.collisionCallback.call(c.collisionCallbackContext, b.sprite, c)) return !1; + if ("undefined" != typeof c.layer.callbacks && c.layer.callbacks[c.index] && !c.layer.callbacks[c.index].callback.call(c.layer.callbacks[c.index].callbackContext, b.sprite, c)) return !1; + if (!(c.faceLeft || c.faceRight || c.faceTop || c.faceBottom)) return !1; + var h = 0, + i = 0, + j = 0, + k = 1; + if (b.deltaAbsX() > b.deltaAbsY() ? j = -1 : b.deltaAbsX() < b.deltaAbsY() && (k = -1), 0 !== b.deltaX() && 0 !== b.deltaY() && (c.faceLeft || c.faceRight) && (c.faceTop || c.faceBottom) && (j = Math.min(Math.abs(b.position.x - f - c.right), Math.abs(b.right - f - c.left)), k = Math.min(Math.abs(b.position.y - g - c.bottom), Math.abs(b.bottom - g - c.top))), j < k) { + if ((c.faceLeft || c.faceRight) && (h = this.tileCheckX(b, c, d), 0 !== h && !c.intersects(b.position.x - f, b.position.y - g, b.right - f, b.bottom - g))) return !0; + (c.faceTop || c.faceBottom) && (i = this.tileCheckY(b, c, d)) + } else { + if ((c.faceTop || c.faceBottom) && (i = this.tileCheckY(b, c, d), 0 !== i && !c.intersects(b.position.x - f, b.position.y - g, b.right - f, b.bottom - g))) return !0; + (c.faceLeft || c.faceRight) && (h = this.tileCheckX(b, c, d)) + } + return 0 !== h || 0 !== i + }, + tileCheckX: function(a, b, c) { + var d = 0, + e = c.fixedToCamera ? 0 : c.position.x; + return a.deltaX() < 0 && !a.blocked.left && b.collideRight && a.checkCollision.left ? b.faceRight && a.x - e < b.right && (d = a.x - e - b.right, d < -this.TILE_BIAS && (d = 0)) : a.deltaX() > 0 && !a.blocked.right && b.collideLeft && a.checkCollision.right && b.faceLeft && a.right - e > b.left && (d = a.right - e - b.left, d > this.TILE_BIAS && (d = 0)), 0 !== d && (a.customSeparateX ? a.overlapX = d : this.processTileSeparationX(a, d)), d + }, + tileCheckY: function(a, b, c) { + var d = 0, + e = c.fixedToCamera ? 0 : c.position.y; + return a.deltaY() < 0 && !a.blocked.up && b.collideDown && a.checkCollision.up ? b.faceBottom && a.y - e < b.bottom && (d = a.y - e - b.bottom, d < -this.TILE_BIAS && (d = 0)) : a.deltaY() > 0 && !a.blocked.down && b.collideUp && a.checkCollision.down && b.faceTop && a.bottom - e > b.top && (d = a.bottom - e - b.top, d > this.TILE_BIAS && (d = 0)), 0 !== d && (a.customSeparateY ? a.overlapY = d : this.processTileSeparationY(a, d)), d + }, + processTileSeparationX: function(a, b) { + b < 0 ? a.blocked.left = !0 : b > 0 && (a.blocked.right = !0), a.position.x -= b, 0 === a.bounce.x ? a.velocity.x = 0 : a.velocity.x = -a.velocity.x * a.bounce.x + }, + processTileSeparationY: function(a, b) { + b < 0 ? a.blocked.up = !0 : b > 0 && (a.blocked.down = !0), a.position.y -= b, 0 === a.bounce.y ? a.velocity.y = 0 : a.velocity.y = -a.velocity.y * a.bounce.y + } + }, c.Utils.mixinPrototype(c.Physics.Arcade.prototype, c.Physics.Arcade.TilemapCollision.prototype), p2.Body.prototype.parent = null, p2.Spring.prototype.parent = null, c.Physics.P2 = function(a, b) { + this.game = a, void 0 === b ? b = { + gravity: [0, 0], + broadphase: new p2.SAPBroadphase + } : (b.hasOwnProperty("gravity") || (b.gravity = [0, 0]), b.hasOwnProperty("broadphase") || (b.broadphase = new p2.SAPBroadphase)), this.config = b, this.world = new p2.World(this.config), this.frameRate = 1 / 60, this.useElapsedTime = !1, this.paused = !1, this.materials = [], this.gravity = new c.Physics.P2.InversePointProxy(this, this.world.gravity), this.walls = { + left: null, + right: null, + top: null, + bottom: null + }, this.onBodyAdded = new c.Signal, this.onBodyRemoved = new c.Signal, this.onSpringAdded = new c.Signal, this.onSpringRemoved = new c.Signal, this.onConstraintAdded = new c.Signal, this.onConstraintRemoved = new c.Signal, this.onContactMaterialAdded = new c.Signal, this.onContactMaterialRemoved = new c.Signal, this.postBroadphaseCallback = null, this.callbackContext = null, this.onBeginContact = new c.Signal, this.onEndContact = new c.Signal, b.hasOwnProperty("mpx") && b.hasOwnProperty("pxm") && b.hasOwnProperty("mpxi") && b.hasOwnProperty("pxmi") && (this.mpx = b.mpx, this.mpxi = b.mpxi, this.pxm = b.pxm, this.pxmi = b.pxmi), this.world.on("beginContact", this.beginContactHandler, this), this.world.on("endContact", this.endContactHandler, this), this.collisionGroups = [], this.nothingCollisionGroup = new c.Physics.P2.CollisionGroup(1), this.boundsCollisionGroup = new c.Physics.P2.CollisionGroup(2), this.everythingCollisionGroup = new c.Physics.P2.CollisionGroup(2147483648), this.boundsCollidesWith = [], this._toRemove = [], this._collisionGroupID = 2, this._boundsLeft = !0, this._boundsRight = !0, this._boundsTop = !0, this._boundsBottom = !0, this._boundsOwnGroup = !1, this.setBoundsToWorld(!0, !0, !0, !0, !1) + }, c.Physics.P2.prototype = { + removeBodyNextStep: function(a) { + this._toRemove.push(a) + }, + preUpdate: function() { + for (var a = this._toRemove.length; a--;) this.removeBody(this._toRemove[a]); + this._toRemove.length = 0 + }, + enable: function(a, b, d) { + void 0 === b && (b = !1), void 0 === d && (d = !0); + var e = 1; + if (Array.isArray(a)) + for (e = a.length; e--;) a[e] instanceof c.Group ? this.enable(a[e].children, b, d) : (this.enableBody(a[e], b), d && a[e].hasOwnProperty("children") && a[e].children.length > 0 && this.enable(a[e], b, !0)); + else a instanceof c.Group ? this.enable(a.children, b, d) : (this.enableBody(a, b), d && a.hasOwnProperty("children") && a.children.length > 0 && this.enable(a.children, b, !0)) + }, + enableBody: function(a, b) { + a.hasOwnProperty("body") && null === a.body && (a.body = new c.Physics.P2.Body(this.game, a, a.x, a.y, 1), a.body.debug = b, "undefined" != typeof a.anchor && a.anchor.set(.5)) + }, + setImpactEvents: function(a) { + a ? this.world.on("impact", this.impactHandler, this) : this.world.off("impact", this.impactHandler, this) + }, + setPostBroadphaseCallback: function(a, b) { + this.postBroadphaseCallback = a, this.callbackContext = b, null !== a ? this.world.on("postBroadphase", this.postBroadphaseHandler, this) : this.world.off("postBroadphase", this.postBroadphaseHandler, this) + }, + postBroadphaseHandler: function(a) { + if (this.postBroadphaseCallback && 0 !== a.pairs.length) + for (var b = a.pairs.length - 2; b >= 0; b -= 2) a.pairs[b].parent && a.pairs[b + 1].parent && !this.postBroadphaseCallback.call(this.callbackContext, a.pairs[b].parent, a.pairs[b + 1].parent) && a.pairs.splice(b, 2) + }, + impactHandler: function(a) { + if (a.bodyA.parent && a.bodyB.parent) { + var b = a.bodyA.parent, + c = a.bodyB.parent; + b._bodyCallbacks[a.bodyB.id] && b._bodyCallbacks[a.bodyB.id].call(b._bodyCallbackContext[a.bodyB.id], b, c, a.shapeA, a.shapeB), c._bodyCallbacks[a.bodyA.id] && c._bodyCallbacks[a.bodyA.id].call(c._bodyCallbackContext[a.bodyA.id], c, b, a.shapeB, a.shapeA), b._groupCallbacks[a.shapeB.collisionGroup] && b._groupCallbacks[a.shapeB.collisionGroup].call(b._groupCallbackContext[a.shapeB.collisionGroup], b, c, a.shapeA, a.shapeB), c._groupCallbacks[a.shapeA.collisionGroup] && c._groupCallbacks[a.shapeA.collisionGroup].call(c._groupCallbackContext[a.shapeA.collisionGroup], c, b, a.shapeB, a.shapeA) + } + }, + beginContactHandler: function(a) { + a.bodyA && a.bodyB && (this.onBeginContact.dispatch(a.bodyA, a.bodyB, a.shapeA, a.shapeB, a.contactEquations), a.bodyA.parent && a.bodyA.parent.onBeginContact.dispatch(a.bodyB.parent, a.bodyB, a.shapeA, a.shapeB, a.contactEquations), a.bodyB.parent && a.bodyB.parent.onBeginContact.dispatch(a.bodyA.parent, a.bodyA, a.shapeB, a.shapeA, a.contactEquations)) + }, + endContactHandler: function(a) { + a.bodyA && a.bodyB && (this.onEndContact.dispatch(a.bodyA, a.bodyB, a.shapeA, a.shapeB), a.bodyA.parent && a.bodyA.parent.onEndContact.dispatch(a.bodyB.parent, a.bodyB, a.shapeA, a.shapeB), a.bodyB.parent && a.bodyB.parent.onEndContact.dispatch(a.bodyA.parent, a.bodyA, a.shapeB, a.shapeA)) + }, + setBoundsToWorld: function(a, b, c, d, e) { + this.setBounds(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, a, b, c, d, e) + }, + setWorldMaterial: function(a, b, c, d, e) { + void 0 === b && (b = !0), void 0 === c && (c = !0), void 0 === d && (d = !0), void 0 === e && (e = !0), b && this.walls.left && (this.walls.left.shapes[0].material = a), c && this.walls.right && (this.walls.right.shapes[0].material = a), d && this.walls.top && (this.walls.top.shapes[0].material = a), e && this.walls.bottom && (this.walls.bottom.shapes[0].material = a) + }, + updateBoundsCollisionGroup: function(a) { + void 0 === a && (a = !0); + var b = a ? this.boundsCollisionGroup.mask : this.everythingCollisionGroup.mask; + this.walls.left && (this.walls.left.shapes[0].collisionGroup = b), this.walls.right && (this.walls.right.shapes[0].collisionGroup = b), this.walls.top && (this.walls.top.shapes[0].collisionGroup = b), this.walls.bottom && (this.walls.bottom.shapes[0].collisionGroup = b), this._boundsOwnGroup = a + }, + setBounds: function(a, b, c, d, e, f, g, h, i) { + void 0 === e && (e = this._boundsLeft), void 0 === f && (f = this._boundsRight), void 0 === g && (g = this._boundsTop), void 0 === h && (h = this._boundsBottom), void 0 === i && (i = this._boundsOwnGroup), this.setupWall(e, "left", a, b, 1.5707963267948966, i), this.setupWall(f, "right", a + c, b, -1.5707963267948966, i), this.setupWall(g, "top", a, b, -3.141592653589793, i), this.setupWall(h, "bottom", a, b + d, 0, i), this._boundsLeft = e, this._boundsRight = f, this._boundsTop = g, this._boundsBottom = h, this._boundsOwnGroup = i + }, + setupWall: function(a, b, c, d, e, f) { + a ? (this.walls[b] ? this.walls[b].position = [this.pxmi(c), this.pxmi(d)] : (this.walls[b] = new p2.Body({ + mass: 0, + position: [this.pxmi(c), this.pxmi(d)], + angle: e + }), this.walls[b].addShape(new p2.Plane), this.world.addBody(this.walls[b])), f && (this.walls[b].shapes[0].collisionGroup = this.boundsCollisionGroup.mask)) : this.walls[b] && (this.world.removeBody(this.walls[b]), this.walls[b] = null) + }, + pause: function() { + this.paused = !0 + }, + resume: function() { + this.paused = !1 + }, + update: function() { + this.paused || (this.useElapsedTime ? this.world.step(this.game.time.physicsElapsed) : this.world.step(this.frameRate)) + }, + reset: function() { + this.world.on("beginContact", this.beginContactHandler, this), this.world.on("endContact", this.endContactHandler, this), this.nothingCollisionGroup = new c.Physics.P2.CollisionGroup(1), this.boundsCollisionGroup = new c.Physics.P2.CollisionGroup(2), this.everythingCollisionGroup = new c.Physics.P2.CollisionGroup(2147483648), this._collisionGroupID = 2, this.setBoundsToWorld(!0, !0, !0, !0, !1) + }, + clear: function() { + this.world.time = 0, this.world.fixedStepTime = 0, this.world.solver && this.world.solver.equations.length && this.world.solver.removeAllEquations(); + for (var a = this.world.constraints, b = a.length - 1; b >= 0; b--) this.world.removeConstraint(a[b]); + for (var c = this.world.bodies, b = c.length - 1; b >= 0; b--) this.world.removeBody(c[b]); + for (var d = this.world.springs, b = d.length - 1; b >= 0; b--) this.world.removeSpring(d[b]); + for (var e = this.world.contactMaterials, b = e.length - 1; b >= 0; b--) this.world.removeContactMaterial(e[b]); + this.world.off("beginContact", this.beginContactHandler, this), this.world.off("endContact", this.endContactHandler, this), this.postBroadphaseCallback = null, this.callbackContext = null, this.impactCallback = null, this.collisionGroups = [], this._toRemove = [], this.boundsCollidesWith = [], this.walls = { + left: null, + right: null, + top: null, + bottom: null + } + }, + destroy: function() { + this.clear(), this.game = null + }, + addBody: function(a) { + return !a.data.world && (this.world.addBody(a.data), this.onBodyAdded.dispatch(a), !0) + }, + removeBody: function(a) { + return a.data.world === this.world && (this.world.removeBody(a.data), this.onBodyRemoved.dispatch(a)), a + }, + addSpring: function(a) { + return a instanceof c.Physics.P2.Spring || a instanceof c.Physics.P2.RotationalSpring ? this.world.addSpring(a.data) : this.world.addSpring(a), this.onSpringAdded.dispatch(a), a + }, + removeSpring: function(a) { + return a instanceof c.Physics.P2.Spring || a instanceof c.Physics.P2.RotationalSpring ? this.world.removeSpring(a.data) : this.world.removeSpring(a), this.onSpringRemoved.dispatch(a), a + }, + createDistanceConstraint: function(a, b, d, e, f, g) { + return a = this.getBody(a), b = this.getBody(b), a && b ? this.addConstraint(new c.Physics.P2.DistanceConstraint(this, a, b, d, e, f, g)) : void console.warn("Cannot create Constraint, invalid body objects given") + }, + createGearConstraint: function(a, b, d, e) { + return a = this.getBody(a), b = this.getBody(b), a && b ? this.addConstraint(new c.Physics.P2.GearConstraint(this, a, b, d, e)) : void console.warn("Cannot create Constraint, invalid body objects given") + }, + createRevoluteConstraint: function(a, b, d, e, f, g) { + return a = this.getBody(a), d = this.getBody(d), a && d ? this.addConstraint(new c.Physics.P2.RevoluteConstraint(this, a, b, d, e, f, g)) : void console.warn("Cannot create Constraint, invalid body objects given") + }, + createLockConstraint: function(a, b, d, e, f) { + return a = this.getBody(a), b = this.getBody(b), a && b ? this.addConstraint(new c.Physics.P2.LockConstraint(this, a, b, d, e, f)) : void console.warn("Cannot create Constraint, invalid body objects given") + }, + createPrismaticConstraint: function(a, b, d, e, f, g, h) { + return a = this.getBody(a), b = this.getBody(b), a && b ? this.addConstraint(new c.Physics.P2.PrismaticConstraint(this, a, b, d, e, f, g, h)) : void console.warn("Cannot create Constraint, invalid body objects given") + }, + addConstraint: function(a) { + return this.world.addConstraint(a), this.onConstraintAdded.dispatch(a), a + }, + removeConstraint: function(a) { + return this.world.removeConstraint(a), this.onConstraintRemoved.dispatch(a), a + }, + addContactMaterial: function(a) { + return this.world.addContactMaterial(a), this.onContactMaterialAdded.dispatch(a), a + }, + removeContactMaterial: function(a) { + return this.world.removeContactMaterial(a), this.onContactMaterialRemoved.dispatch(a), a + }, + getContactMaterial: function(a, b) { + return this.world.getContactMaterial(a, b) + }, + setMaterial: function(a, b) { + for (var c = b.length; c--;) b[c].setMaterial(a) + }, + createMaterial: function(a, b) { + a = a || ""; + var d = new c.Physics.P2.Material(a); + return this.materials.push(d), "undefined" != typeof b && b.setMaterial(d), d + }, + createContactMaterial: function(a, b, d) { + void 0 === a && (a = this.createMaterial()), void 0 === b && (b = this.createMaterial()); + var e = new c.Physics.P2.ContactMaterial(a, b, d); + return this.addContactMaterial(e) + }, + getBodies: function() { + for (var a = [], b = this.world.bodies.length; b--;) a.push(this.world.bodies[b].parent); + return a + }, + getBody: function(a) { + return a instanceof p2.Body ? a : a instanceof c.Physics.P2.Body ? a.data : a.body && a.body.type === c.Physics.P2JS ? a.body.data : null + }, + getSprings: function() { + for (var a = [], b = this.world.springs.length; b--;) a.push(this.world.springs[b].parent); + return a + }, + getConstraints: function() { + for (var a = [], b = this.world.constraints.length; b--;) a.push(this.world.constraints[b]); + return a + }, + hitTest: function(a, b, d, e) { + void 0 === b && (b = this.world.bodies), void 0 === d && (d = 5), void 0 === e && (e = !1); + for (var f = [this.pxmi(a.x), this.pxmi(a.y)], g = [], h = b.length; h--;) b[h] instanceof c.Physics.P2.Body && (!e || b[h].data.type !== p2.Body.STATIC) ? g.push(b[h].data) : b[h] instanceof p2.Body && b[h].parent && (!e || b[h].type !== p2.Body.STATIC) ? g.push(b[h]) : b[h] instanceof c.Sprite && b[h].hasOwnProperty("body") && (!e || b[h].body.data.type !== p2.Body.STATIC) && g.push(b[h].body.data); + return this.world.hitTest(f, g, d) + }, + toJSON: function() { + return this.world.toJSON() + }, + createCollisionGroup: function(a) { + var b = Math.pow(2, this._collisionGroupID); + this.walls.left && (this.walls.left.shapes[0].collisionMask = this.walls.left.shapes[0].collisionMask | b), this.walls.right && (this.walls.right.shapes[0].collisionMask = this.walls.right.shapes[0].collisionMask | b), this.walls.top && (this.walls.top.shapes[0].collisionMask = this.walls.top.shapes[0].collisionMask | b), this.walls.bottom && (this.walls.bottom.shapes[0].collisionMask = this.walls.bottom.shapes[0].collisionMask | b), this._collisionGroupID++; + var d = new c.Physics.P2.CollisionGroup(b); + return this.collisionGroups.push(d), a && this.setCollisionGroup(a, d), d + }, + setCollisionGroup: function(a, b) { + if (a instanceof c.Group) + for (var d = 0; d < a.total; d++) a.children[d].body && a.children[d].body.type === c.Physics.P2JS && a.children[d].body.setCollisionGroup(b); + else a.body.setCollisionGroup(b) + }, + createSpring: function(a, b, d, e, f, g, h, i, j) { + return a = this.getBody(a), b = this.getBody(b), a && b ? this.addSpring(new c.Physics.P2.Spring(this, a, b, d, e, f, g, h, i, j)) : void console.warn("Cannot create Spring, invalid body objects given") + }, + createRotationalSpring: function(a, b, d, e, f) { + return a = this.getBody(a), b = this.getBody(b), a && b ? this.addSpring(new c.Physics.P2.RotationalSpring(this, a, b, d, e, f)) : void console.warn("Cannot create Rotational Spring, invalid body objects given") + }, + createBody: function(a, b, d, e, f, g) { + void 0 === e && (e = !1); + var h = new c.Physics.P2.Body(this.game, null, a, b, d); + if (g) { + var i = h.addPolygon(f, g); + if (!i) return !1 + } + return e && this.world.addBody(h.data), h + }, + createParticle: function(a, b, d, e, f, g) { + void 0 === e && (e = !1); + var h = new c.Physics.P2.Body(this.game, null, a, b, d); + if (g) { + var i = h.addPolygon(f, g); + if (!i) return !1 + } + return e && this.world.addBody(h.data), h + }, + convertCollisionObjects: function(a, b, c) { + void 0 === c && (c = !0); + for (var d = [], e = 0, f = a.collision[b].length; e < f; e++) { + var g = a.collision[b][e], + h = this.createBody(g.x, g.y, 0, c, {}, g.polyline); + h && d.push(h) + } + return d + }, + clearTilemapLayerBodies: function(a, b) { + b = a.getLayer(b); + for (var c = a.layers[b].bodies.length; c--;) a.layers[b].bodies[c].destroy(); + a.layers[b].bodies.length = 0 + }, + convertTilemap: function(a, b, c, d) { + b = a.getLayer(b), void 0 === c && (c = !0), void 0 === d && (d = !0), this.clearTilemapLayerBodies(a, b); + for (var e = 0, f = 0, g = 0, h = 0, i = a.layers[b].height; h < i; h++) { + e = 0; + for (var j = 0, k = a.layers[b].width; j < k; j++) { + var l = a.layers[b].data[h][j]; + if (l && l.index > -1 && l.collides) + if (d) { + var m = a.getTileRight(b, j, h); + if (0 === e && (f = l.x * l.width, g = l.y * l.height, e = l.width), m && m.collides) e += l.width; + else { + var n = this.createBody(f, g, 0, !1); + n.addRectangle(e, l.height, e / 2, l.height / 2, 0), c && this.addBody(n), a.layers[b].bodies.push(n), e = 0 + } + } else { + var n = this.createBody(l.x * l.width, l.y * l.height, 0, !1); + n.addRectangle(l.width, l.height, l.width / 2, l.height / 2, 0), c && this.addBody(n), a.layers[b].bodies.push(n) + } + } + } + return a.layers[b].bodies + }, + mpx: function(a) { + return a *= 20 + }, + pxm: function(a) { + return .05 * a + }, + mpxi: function(a) { + return a *= -20 + }, + pxmi: function(a) { + return a * -.05 + } + }, Object.defineProperty(c.Physics.P2.prototype, "friction", { + get: function() { + return this.world.defaultContactMaterial.friction + }, + set: function(a) { + this.world.defaultContactMaterial.friction = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "restitution", { + get: function() { + return this.world.defaultContactMaterial.restitution + }, + set: function(a) { + this.world.defaultContactMaterial.restitution = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "contactMaterial", { + get: function() { + return this.world.defaultContactMaterial + }, + set: function(a) { + this.world.defaultContactMaterial = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "applySpringForces", { + get: function() { + return this.world.applySpringForces + }, + set: function(a) { + this.world.applySpringForces = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "applyDamping", { + get: function() { + return this.world.applyDamping + }, + set: function(a) { + this.world.applyDamping = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "applyGravity", { + get: function() { + return this.world.applyGravity + }, + set: function(a) { + this.world.applyGravity = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "solveConstraints", { + get: function() { + return this.world.solveConstraints + }, + set: function(a) { + this.world.solveConstraints = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "time", { + get: function() { + return this.world.time + } + }), Object.defineProperty(c.Physics.P2.prototype, "emitImpactEvent", { + get: function() { + return this.world.emitImpactEvent + }, + set: function(a) { + this.world.emitImpactEvent = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "sleepMode", { + get: function() { + return this.world.sleepMode + }, + set: function(a) { + this.world.sleepMode = a + } + }), Object.defineProperty(c.Physics.P2.prototype, "total", { + get: function() { + return this.world.bodies.length + } + }), c.Physics.P2.FixtureList = function(a) { + Array.isArray(a) || (a = [a]), this.rawList = a, this.init(), this.parse(this.rawList) + }, c.Physics.P2.FixtureList.prototype = { + init: function() { + this.namedFixtures = {}, this.groupedFixtures = [], this.allFixtures = [] + }, + setCategory: function(a, b) { + var c = function(b) { + b.collisionGroup = a + }; + this.getFixtures(b).forEach(c) + }, + setMask: function(a, b) { + var c = function(b) { + b.collisionMask = a + }; + this.getFixtures(b).forEach(c) + }, + setSensor: function(a, b) { + var c = function(b) { + b.sensor = a + }; + this.getFixtures(b).forEach(c) + }, + setMaterial: function(a, b) { + var c = function(b) { + b.material = a + }; + this.getFixtures(b).forEach(c) + }, + getFixtures: function(a) { + var b = []; + if (a) { + a instanceof Array || (a = [a]); + var c = this; + return a.forEach(function(a) { + c.namedFixtures[a] && b.push(c.namedFixtures[a]) + }), this.flatten(b) + } + return this.allFixtures + }, + getFixtureByKey: function(a) { + return this.namedFixtures[a] + }, + getGroup: function(a) { + return this.groupedFixtures[a] + }, + parse: function() { + var a, b, c, d; + c = this.rawList, d = []; + for (a in c) b = c[a], isNaN(a - 0) ? this.namedFixtures[a] = this.flatten(b) : (this.groupedFixtures[a] = this.groupedFixtures[a] || [], this.groupedFixtures[a] = this.groupedFixtures[a].concat(b)), d.push(this.allFixtures = this.flatten(this.groupedFixtures)) + }, + flatten: function(a) { + var b, c; + return b = [], c = arguments.callee, a.forEach(function(a) { + return Array.prototype.push.apply(b, Array.isArray(a) ? c(a) : [a]) + }), b + } + }, c.Physics.P2.PointProxy = function(a, b) { + this.world = a, this.destination = b + }, c.Physics.P2.PointProxy.prototype.constructor = c.Physics.P2.PointProxy, Object.defineProperty(c.Physics.P2.PointProxy.prototype, "x", { + get: function() { + return this.world.mpx(this.destination[0]) + }, + set: function(a) { + this.destination[0] = this.world.pxm(a) + } + }), Object.defineProperty(c.Physics.P2.PointProxy.prototype, "y", { + get: function() { + return this.world.mpx(this.destination[1]) + }, + set: function(a) { + this.destination[1] = this.world.pxm(a) + } + }), Object.defineProperty(c.Physics.P2.PointProxy.prototype, "mx", { + get: function() { + return this.destination[0] + }, + set: function(a) { + this.destination[0] = a + } + }), Object.defineProperty(c.Physics.P2.PointProxy.prototype, "my", { + get: function() { + return this.destination[1] + }, + set: function(a) { + this.destination[1] = a + } + }), c.Physics.P2.InversePointProxy = function(a, b) { + this.world = a, this.destination = b + }, c.Physics.P2.InversePointProxy.prototype.constructor = c.Physics.P2.InversePointProxy, Object.defineProperty(c.Physics.P2.InversePointProxy.prototype, "x", { + get: function() { + return this.world.mpxi(this.destination[0]) + }, + set: function(a) { + this.destination[0] = this.world.pxmi(a) + } + }), Object.defineProperty(c.Physics.P2.InversePointProxy.prototype, "y", { + get: function() { + return this.world.mpxi(this.destination[1]) + }, + set: function(a) { + this.destination[1] = this.world.pxmi(a) + } + }), Object.defineProperty(c.Physics.P2.InversePointProxy.prototype, "mx", { + get: function() { + return this.destination[0] + }, + set: function(a) { + this.destination[0] = -a + } + }), Object.defineProperty(c.Physics.P2.InversePointProxy.prototype, "my", { + get: function() { + return this.destination[1] + }, + set: function(a) { + this.destination[1] = -a + } + }), c.Physics.P2.Body = function(a, b, d, e, f) { + b = b || null, d = d || 0, e = e || 0, void 0 === f && (f = 1), this.game = a, this.world = a.physics.p2, this.sprite = b, this.type = c.Physics.P2JS, this.offset = new c.Point, this.data = new p2.Body({ + position: [this.world.pxmi(d), this.world.pxmi(e)], + mass: f + }), this.data.parent = this, this.velocity = new c.Physics.P2.InversePointProxy(this.world, this.data.velocity), this.force = new c.Physics.P2.InversePointProxy(this.world, this.data.force), this.gravity = new c.Point, this.onBeginContact = new c.Signal, this.onEndContact = new c.Signal, this.collidesWith = [], this.removeNextStep = !1, this.debugBody = null, this.dirty = !1, this._collideWorldBounds = !0, this._bodyCallbacks = {}, this._bodyCallbackContext = {}, this._groupCallbacks = {}, this._groupCallbackContext = {}, this._reset = !1, b && (this.setRectangleFromSprite(b), b.exists && this.game.physics.p2.addBody(this)) + }, c.Physics.P2.Body.prototype = { + createBodyCallback: function(a, b, c) { + var d = -1; + a.id ? d = a.id : a.body && (d = a.body.id), d > -1 && (null === b ? (delete this._bodyCallbacks[d], delete this._bodyCallbackContext[d]) : (this._bodyCallbacks[d] = b, this._bodyCallbackContext[d] = c)) + }, + createGroupCallback: function(a, b, c) { + null === b ? (delete this._groupCallbacks[a.mask], delete this._groupCallbackContext[a.mask]) : (this._groupCallbacks[a.mask] = b, this._groupCallbackContext[a.mask] = c) + }, + getCollisionMask: function() { + var a = 0; + this._collideWorldBounds && (a = this.game.physics.p2.boundsCollisionGroup.mask); + for (var b = 0; b < this.collidesWith.length; b++) a |= this.collidesWith[b].mask; + return a + }, + updateCollisionMask: function(a) { + var b = this.getCollisionMask(); + if (void 0 === a) + for (var c = this.data.shapes.length - 1; c >= 0; c--) this.data.shapes[c].collisionMask = b; + else a.collisionMask = b + }, + setCollisionGroup: function(a, b) { + var c = this.getCollisionMask(); + if (void 0 === b) + for (var d = this.data.shapes.length - 1; d >= 0; d--) this.data.shapes[d].collisionGroup = a.mask, this.data.shapes[d].collisionMask = c; + else b.collisionGroup = a.mask, b.collisionMask = c + }, + clearCollision: function(a, b, c) { + if (void 0 === a && (a = !0), void 0 === b && (b = !0), void 0 === c) + for (var d = this.data.shapes.length - 1; d >= 0; d--) a && (this.data.shapes[d].collisionGroup = null), b && (this.data.shapes[d].collisionMask = null); + else a && (c.collisionGroup = null), b && (c.collisionMask = null); + a && (this.collidesWith.length = 0) + }, + removeCollisionGroup: function(a, b, c) { + void 0 === b && (b = !0); + var d; + if (Array.isArray(a)) + for (var e = 0; e < a.length; e++) d = this.collidesWith.indexOf(a[e]), d > -1 && (this.collidesWith.splice(d, 1), b && (delete this._groupCallbacks[a.mask], delete this._groupCallbackContext[a.mask])); + else d = this.collidesWith.indexOf(a), d > -1 && (this.collidesWith.splice(d, 1), b && (delete this._groupCallbacks[a.mask], delete this._groupCallbackContext[a.mask])); + var f = this.getCollisionMask(); + if (void 0 === c) + for (var e = this.data.shapes.length - 1; e >= 0; e--) this.data.shapes[e].collisionMask = f; + else c.collisionMask = f + }, + collides: function(a, b, c, d) { + if (Array.isArray(a)) + for (var e = 0; e < a.length; e++) this.collidesWith.indexOf(a[e]) === -1 && (this.collidesWith.push(a[e]), b && this.createGroupCallback(a[e], b, c)); + else this.collidesWith.indexOf(a) === -1 && (this.collidesWith.push(a), b && this.createGroupCallback(a, b, c)); + var f = this.getCollisionMask(); + if (void 0 === d) + for (var e = this.data.shapes.length - 1; e >= 0; e--) this.data.shapes[e].collisionMask = f; + else d.collisionMask = f + }, + adjustCenterOfMass: function() { + this.data.adjustCenterOfMass(), this.shapeChanged() + }, + getVelocityAtPoint: function(a, b) { + return this.data.getVelocityAtPoint(a, b) + }, + applyDamping: function(a) { + this.data.applyDamping(a) + }, + applyImpulse: function(a, b, c) { + this.data.applyImpulse(a, [this.world.pxmi(b), this.world.pxmi(c)]) + }, + applyImpulseLocal: function(a, b, c) { + this.data.applyImpulseLocal(a, [this.world.pxmi(b), this.world.pxmi(c)]) + }, + applyForce: function(a, b, c) { + this.data.applyForce(a, [this.world.pxmi(b), this.world.pxmi(c)]) + }, + setZeroForce: function() { + this.data.setZeroForce() + }, + setZeroRotation: function() { + this.data.angularVelocity = 0 + }, + setZeroVelocity: function() { + this.data.velocity[0] = 0, this.data.velocity[1] = 0 + }, + setZeroDamping: function() { + this.data.damping = 0, this.data.angularDamping = 0 + }, + toLocalFrame: function(a, b) { + return this.data.toLocalFrame(a, b) + }, + toWorldFrame: function(a, b) { + return this.data.toWorldFrame(a, b) + }, + rotateLeft: function(a) { + this.data.angularVelocity = this.world.pxm(-a) + }, + rotateRight: function(a) { + this.data.angularVelocity = this.world.pxm(a) + }, + moveForward: function(a) { + var b = this.world.pxmi(-a), + c = this.data.angle + Math.PI / 2; + this.data.velocity[0] = b * Math.cos(c), this.data.velocity[1] = b * Math.sin(c) + }, + moveBackward: function(a) { + var b = this.world.pxmi(-a), + c = this.data.angle + Math.PI / 2; + this.data.velocity[0] = -(b * Math.cos(c)), this.data.velocity[1] = -(b * Math.sin(c)) + }, + thrust: function(a) { + var b = this.world.pxmi(-a), + c = this.data.angle + Math.PI / 2; + this.data.force[0] += b * Math.cos(c), this.data.force[1] += b * Math.sin(c) + }, + thrustLeft: function(a) { + var b = this.world.pxmi(-a), + c = this.data.angle; + this.data.force[0] += b * Math.cos(c), this.data.force[1] += b * Math.sin(c) + }, + thrustRight: function(a) { + var b = this.world.pxmi(-a), + c = this.data.angle; + this.data.force[0] -= b * Math.cos(c), this.data.force[1] -= b * Math.sin(c) + }, + reverse: function(a) { + var b = this.world.pxmi(-a), + c = this.data.angle + Math.PI / 2; + this.data.force[0] -= b * Math.cos(c), this.data.force[1] -= b * Math.sin(c); + }, + moveLeft: function(a) { + this.data.velocity[0] = this.world.pxmi(-a) + }, + moveRight: function(a) { + this.data.velocity[0] = this.world.pxmi(a) + }, + moveUp: function(a) { + this.data.velocity[1] = this.world.pxmi(-a) + }, + moveDown: function(a) { + this.data.velocity[1] = this.world.pxmi(a) + }, + preUpdate: function() { + this.dirty = !0, this.removeNextStep && (this.removeFromWorld(), this.removeNextStep = !1) + }, + postUpdate: function() { + this.sprite.x = this.world.mpxi(this.data.position[0]) + this.offset.x, this.sprite.y = this.world.mpxi(this.data.position[1]) + this.offset.y, this.fixedRotation || (this.sprite.rotation = this.data.angle), this.debugBody && this.debugBody.updateSpriteTransform(), this.dirty = !1 + }, + reset: function(a, b, c, d) { + void 0 === c && (c = !1), void 0 === d && (d = !1), this.setZeroForce(), this.setZeroVelocity(), this.setZeroRotation(), c && this.setZeroDamping(), d && (this.mass = 1), this.x = a, this.y = b + }, + addToWorld: function() { + if (this.game.physics.p2._toRemove) + for (var a = 0; a < this.game.physics.p2._toRemove.length; a++) this.game.physics.p2._toRemove[a] === this && this.game.physics.p2._toRemove.splice(a, 1); + this.data.world !== this.game.physics.p2.world && this.game.physics.p2.addBody(this) + }, + removeFromWorld: function() { + this.data.world === this.game.physics.p2.world && this.game.physics.p2.removeBodyNextStep(this) + }, + destroy: function() { + this.removeFromWorld(), this.clearShapes(), this._bodyCallbacks = {}, this._bodyCallbackContext = {}, this._groupCallbacks = {}, this._groupCallbackContext = {}, this.debugBody && this.debugBody.destroy(!0, !0), this.debugBody = null, this.sprite && (this.sprite.body = null, this.sprite = null) + }, + clearShapes: function() { + for (var a = this.data.shapes.length; a--;) this.data.removeShape(this.data.shapes[a]); + this.shapeChanged() + }, + addShape: function(a, b, c, d) { + return void 0 === b && (b = 0), void 0 === c && (c = 0), void 0 === d && (d = 0), this.data.addShape(a, [this.world.pxmi(b), this.world.pxmi(c)], d), this.shapeChanged(), a + }, + addCircle: function(a, b, c, d) { + var e = new p2.Circle({ + radius: this.world.pxm(a) + }); + return this.addShape(e, b, c, d) + }, + addRectangle: function(a, b, c, d, e) { + var f = new p2.Box({ + width: this.world.pxm(a), + height: this.world.pxm(b) + }); + return this.addShape(f, c, d, e) + }, + addPlane: function(a, b, c) { + var d = new p2.Plane; + return this.addShape(d, a, b, c) + }, + addParticle: function(a, b, c) { + var d = new p2.Particle; + return this.addShape(d, a, b, c) + }, + addLine: function(a, b, c, d) { + var e = new p2.Line({ + length: this.world.pxm(a) + }); + return this.addShape(e, b, c, d) + }, + addCapsule: function(a, b, c, d, e) { + var f = new p2.Capsule({ + length: this.world.pxm(a), + radius: this.world.pxm(b) + }); + return this.addShape(f, c, d, e) + }, + addPolygon: function(a, b) { + a = a || {}, Array.isArray(b) || (b = Array.prototype.slice.call(arguments, 1)); + var c = []; + if (1 === b.length && Array.isArray(b[0])) c = b[0].slice(0); + else if (Array.isArray(b[0])) c = b.slice(); + else if ("number" == typeof b[0]) + for (var d = 0, e = b.length; d < e; d += 2) c.push([b[d], b[d + 1]]); + var f = c.length - 1; + c[f][0] === c[0][0] && c[f][1] === c[0][1] && c.pop(); + for (var g = 0; g < c.length; g++) c[g][0] = this.world.pxmi(c[g][0]), c[g][1] = this.world.pxmi(c[g][1]); + var h = this.data.fromPolygon(c, a); + return this.shapeChanged(), h + }, + removeShape: function(a) { + var b = this.data.removeShape(a); + return this.shapeChanged(), b + }, + setCircle: function(a, b, c, d) { + return this.clearShapes(), this.addCircle(a, b, c, d) + }, + setRectangle: function(a, b, c, d, e) { + return void 0 === a && (a = 16), void 0 === b && (b = 16), this.clearShapes(), this.addRectangle(a, b, c, d, e) + }, + setRectangleFromSprite: function(a) { + return void 0 === a && (a = this.sprite), this.clearShapes(), this.addRectangle(a.width, a.height, 0, 0, a.rotation) + }, + setMaterial: function(a, b) { + if (void 0 === b) + for (var c = this.data.shapes.length - 1; c >= 0; c--) this.data.shapes[c].material = a; + else b.material = a + }, + shapeChanged: function() { + this.debugBody && this.debugBody.draw() + }, + addPhaserPolygon: function(a, b) { + for (var c = this.game.cache.getPhysicsData(a, b), d = [], e = 0; e < c.length; e++) { + var f = c[e], + g = this.addFixture(f); + d[f.filter.group] = d[f.filter.group] || [], d[f.filter.group] = d[f.filter.group].concat(g), f.fixtureKey && (d[f.fixtureKey] = g) + } + return this.data.aabbNeedsUpdate = !0, this.shapeChanged(), d + }, + addFixture: function(a) { + var b = []; + if (a.circle) { + var c = new p2.Circle({ + radius: this.world.pxm(a.circle.radius) + }); + c.collisionGroup = a.filter.categoryBits, c.collisionMask = a.filter.maskBits, c.sensor = a.isSensor; + var d = p2.vec2.create(); + d[0] = this.world.pxmi(a.circle.position[0] - this.sprite.width / 2), d[1] = this.world.pxmi(a.circle.position[1] - this.sprite.height / 2), this.data.addShape(c, d), b.push(c) + } else + for (var e = a.polygons, f = p2.vec2.create(), g = 0; g < e.length; g++) { + for (var h = e[g], i = [], j = 0; j < h.length; j += 2) i.push([this.world.pxmi(h[j]), this.world.pxmi(h[j + 1])]); + for (var c = new p2.Convex({ + vertices: i + }), k = 0; k !== c.vertices.length; k++) { + var l = c.vertices[k]; + p2.vec2.sub(l, l, c.centerOfMass) + } + p2.vec2.scale(f, c.centerOfMass, 1), f[0] -= this.world.pxmi(this.sprite.width / 2), f[1] -= this.world.pxmi(this.sprite.height / 2), c.updateTriangles(), c.updateCenterOfMass(), c.updateBoundingRadius(), c.collisionGroup = a.filter.categoryBits, c.collisionMask = a.filter.maskBits, c.sensor = a.isSensor, this.data.addShape(c, f), b.push(c) + } + return b + }, + loadPolygon: function(a, b) { + if (null === a) var c = b; + else var c = this.game.cache.getPhysicsData(a, b); + for (var d = p2.vec2.create(), e = 0; e < c.length; e++) { + for (var f = [], g = 0; g < c[e].shape.length; g += 2) f.push([this.world.pxmi(c[e].shape[g]), this.world.pxmi(c[e].shape[g + 1])]); + for (var h = new p2.Convex({ + vertices: f + }), i = 0; i !== h.vertices.length; i++) { + var j = h.vertices[i]; + p2.vec2.sub(j, j, h.centerOfMass) + } + p2.vec2.scale(d, h.centerOfMass, 1), d[0] -= this.world.pxmi(this.sprite.width / 2), d[1] -= this.world.pxmi(this.sprite.height / 2), h.updateTriangles(), h.updateCenterOfMass(), h.updateBoundingRadius(), this.data.addShape(h, d) + } + return this.data.aabbNeedsUpdate = !0, this.shapeChanged(), !0 + } + }, c.Physics.P2.Body.prototype.constructor = c.Physics.P2.Body, c.Physics.P2.Body.DYNAMIC = 1, c.Physics.P2.Body.STATIC = 2, c.Physics.P2.Body.KINEMATIC = 4, Object.defineProperty(c.Physics.P2.Body.prototype, "static", { + get: function() { + return this.data.type === c.Physics.P2.Body.STATIC + }, + set: function(a) { + a && this.data.type !== c.Physics.P2.Body.STATIC ? (this.data.type = c.Physics.P2.Body.STATIC, this.mass = 0) : a || this.data.type !== c.Physics.P2.Body.STATIC || (this.data.type = c.Physics.P2.Body.DYNAMIC, this.mass = 1) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "dynamic", { + get: function() { + return this.data.type === c.Physics.P2.Body.DYNAMIC + }, + set: function(a) { + a && this.data.type !== c.Physics.P2.Body.DYNAMIC ? (this.data.type = c.Physics.P2.Body.DYNAMIC, this.mass = 1) : a || this.data.type !== c.Physics.P2.Body.DYNAMIC || (this.data.type = c.Physics.P2.Body.STATIC, this.mass = 0) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "kinematic", { + get: function() { + return this.data.type === c.Physics.P2.Body.KINEMATIC + }, + set: function(a) { + a && this.data.type !== c.Physics.P2.Body.KINEMATIC ? (this.data.type = c.Physics.P2.Body.KINEMATIC, this.mass = 4) : a || this.data.type !== c.Physics.P2.Body.KINEMATIC || (this.data.type = c.Physics.P2.Body.STATIC, this.mass = 0) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "allowSleep", { + get: function() { + return this.data.allowSleep + }, + set: function(a) { + a !== this.data.allowSleep && (this.data.allowSleep = a) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "angle", { + get: function() { + return c.Math.wrapAngle(c.Math.radToDeg(this.data.angle)) + }, + set: function(a) { + this.data.angle = c.Math.degToRad(c.Math.wrapAngle(a)) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "angularDamping", { + get: function() { + return this.data.angularDamping + }, + set: function(a) { + this.data.angularDamping = a + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "angularForce", { + get: function() { + return this.data.angularForce + }, + set: function(a) { + this.data.angularForce = a + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "angularVelocity", { + get: function() { + return this.data.angularVelocity + }, + set: function(a) { + this.data.angularVelocity = a + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "damping", { + get: function() { + return this.data.damping + }, + set: function(a) { + this.data.damping = a + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "fixedRotation", { + get: function() { + return this.data.fixedRotation + }, + set: function(a) { + a !== this.data.fixedRotation && (this.data.fixedRotation = a) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "inertia", { + get: function() { + return this.data.inertia + }, + set: function(a) { + this.data.inertia = a + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "mass", { + get: function() { + return this.data.mass + }, + set: function(a) { + a !== this.data.mass && (this.data.mass = a, this.data.updateMassProperties()) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "motionState", { + get: function() { + return this.data.type + }, + set: function(a) { + a !== this.data.type && (this.data.type = a) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "rotation", { + get: function() { + return this.data.angle + }, + set: function(a) { + this.data.angle = a + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "sleepSpeedLimit", { + get: function() { + return this.data.sleepSpeedLimit + }, + set: function(a) { + this.data.sleepSpeedLimit = a + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "x", { + get: function() { + return this.world.mpxi(this.data.position[0]) + }, + set: function(a) { + this.data.position[0] = this.world.pxmi(a) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "y", { + get: function() { + return this.world.mpxi(this.data.position[1]) + }, + set: function(a) { + this.data.position[1] = this.world.pxmi(a) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "id", { + get: function() { + return this.data.id + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "debug", { + get: function() { + return null !== this.debugBody + }, + set: function(a) { + a && !this.debugBody ? this.debugBody = new c.Physics.P2.BodyDebug(this.game, this.data) : !a && this.debugBody && (this.debugBody.destroy(), this.debugBody = null) + } + }), Object.defineProperty(c.Physics.P2.Body.prototype, "collideWorldBounds", { + get: function() { + return this._collideWorldBounds + }, + set: function(a) { + a && !this._collideWorldBounds ? (this._collideWorldBounds = !0, this.updateCollisionMask()) : !a && this._collideWorldBounds && (this._collideWorldBounds = !1, this.updateCollisionMask()) + } + }), c.Physics.P2.BodyDebug = function(a, b, d) { + c.Group.call(this, a); + var e = { + pixelsPerLengthUnit: a.physics.p2.mpx(1), + debugPolygons: !1, + lineWidth: 1, + alpha: .5 + }; + this.settings = c.Utils.extend(e, d), this.ppu = this.settings.pixelsPerLengthUnit, this.ppu = -1 * this.ppu, this.body = b, this.canvas = new c.Graphics(a), this.canvas.alpha = this.settings.alpha, this.add(this.canvas), this.draw(), this.updateSpriteTransform() + }, c.Physics.P2.BodyDebug.prototype = Object.create(c.Group.prototype), c.Physics.P2.BodyDebug.prototype.constructor = c.Physics.P2.BodyDebug, c.Utils.extend(c.Physics.P2.BodyDebug.prototype, { + updateSpriteTransform: function() { + this.position.x = this.body.position[0] * this.ppu, this.position.y = this.body.position[1] * this.ppu, this.rotation = this.body.angle + }, + draw: function() { + var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o; + if (h = this.body, j = this.canvas, j.clear(), c = parseInt(this.randomPastelHex(), 16), f = 16711680, g = this.lineWidth, h instanceof p2.Body && h.shapes.length) { + var p = h.shapes.length; + for (d = 0; d !== p;) { + if (b = h.shapes[d], i = b.position || 0, a = b.angle || 0, b instanceof p2.Circle) this.drawCircle(j, i[0] * this.ppu, i[1] * this.ppu, a, b.radius * this.ppu, c, g); + else if (b instanceof p2.Capsule) this.drawCapsule(j, i[0] * this.ppu, i[1] * this.ppu, a, b.length * this.ppu, b.radius * this.ppu, f, c, g); + else if (b instanceof p2.Plane) this.drawPlane(j, i[0] * this.ppu, -i[1] * this.ppu, c, f, 5 * g, 10 * g, 10 * g, 100 * this.ppu, a); + else if (b instanceof p2.Line) this.drawLine(j, b.length * this.ppu, f, g); + else if (b instanceof p2.Box) this.drawRectangle(j, i[0] * this.ppu, i[1] * this.ppu, a, b.width * this.ppu, b.height * this.ppu, f, c, g); + else if (b instanceof p2.Convex) { + for (l = [], m = p2.vec2.create(), e = n = 0, o = b.vertices.length; 0 <= o ? n < o : n > o; e = 0 <= o ? ++n : --n) k = b.vertices[e], p2.vec2.rotate(m, k, a), l.push([(m[0] + i[0]) * this.ppu, -(m[1] + i[1]) * this.ppu]); + this.drawConvex(j, l, b.triangles, f, c, g, this.settings.debugPolygons, [i[0] * this.ppu, -i[1] * this.ppu]) + } + d++ + } + } + }, + drawRectangle: function(a, b, c, d, e, f, g, h, i) { + void 0 === i && (i = 1), void 0 === g && (g = 0), a.lineStyle(i, g, 1), a.beginFill(h), a.drawRect(b - e / 2, c - f / 2, e, f) + }, + drawCircle: function(a, b, c, d, e, f, g) { + void 0 === g && (g = 1), void 0 === f && (f = 16777215), a.lineStyle(g, 0, 1), a.beginFill(f, 1), a.drawCircle(b, c, 2 * -e), a.endFill(), a.moveTo(b, c), a.lineTo(b + e * Math.cos(-d), c + e * Math.sin(-d)) + }, + drawLine: function(a, b, c, d) { + void 0 === d && (d = 1), void 0 === c && (c = 0), a.lineStyle(5 * d, c, 1), a.moveTo(-b / 2, 0), a.lineTo(b / 2, 0) + }, + drawConvex: function(a, b, c, d, e, f, g, h) { + var i, j, k, l, m, n, o, p, q, r, s; + if (void 0 === f && (f = 1), void 0 === d && (d = 0), g) { + for (i = [16711680, 65280, 255], j = 0; j !== b.length + 1;) l = b[j % b.length], m = b[(j + 1) % b.length], o = l[0], r = l[1], p = m[0], s = m[1], a.lineStyle(f, i[j % i.length], 1), a.moveTo(o, -r), a.lineTo(p, -s), a.drawCircle(o, -r, 2 * f), j++; + return a.lineStyle(f, 0, 1), a.drawCircle(h[0], h[1], 2 * f) + } + for (a.lineStyle(f, d, 1), a.beginFill(e), j = 0; j !== b.length;) k = b[j], n = k[0], q = k[1], 0 === j ? a.moveTo(n, -q) : a.lineTo(n, -q), j++; + if (a.endFill(), b.length > 2) return a.moveTo(b[b.length - 1][0], -b[b.length - 1][1]), a.lineTo(b[0][0], -b[0][1]) + }, + drawPath: function(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o, p, q, r; + for (void 0 === e && (e = 1), void 0 === c && (c = 0), a.lineStyle(e, c, 1), "number" == typeof d && a.beginFill(d), h = null, i = null, g = 0; g < b.length;) p = b[g], q = p[0], r = p[1], q === h && r === i || (0 === g ? a.moveTo(q, r) : (j = h, k = i, l = q, m = r, n = b[(g + 1) % b.length][0], o = b[(g + 1) % b.length][1], f = (l - j) * (o - k) - (n - j) * (m - k), 0 !== f && a.lineTo(q, r)), h = q, i = r), g++; + "number" == typeof d && a.endFill(), b.length > 2 && "number" == typeof d && (a.moveTo(b[b.length - 1][0], b[b.length - 1][1]), a.lineTo(b[0][0], b[0][1])) + }, + drawPlane: function(a, b, c, d, e, f, g, h, i, j) { + var k, l, m; + void 0 === f && (f = 1), void 0 === d && (d = 16777215), a.lineStyle(f, e, 11), a.beginFill(d), k = i, a.moveTo(b, -c), l = b + Math.cos(j) * this.game.width, m = c + Math.sin(j) * this.game.height, a.lineTo(l, -m), a.moveTo(b, -c), l = b + Math.cos(j) * -this.game.width, m = c + Math.sin(j) * -this.game.height, a.lineTo(l, -m) + }, + drawCapsule: function(a, b, c, d, e, f, g, h, i) { + void 0 === i && (i = 1), void 0 === g && (g = 0), a.lineStyle(i, g, 1); + var j = Math.cos(d), + k = Math.sin(d); + a.beginFill(h, 1), a.drawCircle(-e / 2 * j + b, -e / 2 * k + c, 2 * -f), a.drawCircle(e / 2 * j + b, e / 2 * k + c, 2 * -f), a.endFill(), a.lineStyle(i, g, 0), a.beginFill(h, 1), a.moveTo(-e / 2 * j + f * k + b, -e / 2 * k + f * j + c), a.lineTo(e / 2 * j + f * k + b, e / 2 * k + f * j + c), a.lineTo(e / 2 * j - f * k + b, e / 2 * k - f * j + c), a.lineTo(-e / 2 * j - f * k + b, -e / 2 * k - f * j + c), a.endFill(), a.lineStyle(i, g, 1), a.moveTo(-e / 2 * j + f * k + b, -e / 2 * k + f * j + c), a.lineTo(e / 2 * j + f * k + b, e / 2 * k + f * j + c), a.moveTo(-e / 2 * j - f * k + b, -e / 2 * k - f * j + c), a.lineTo(e / 2 * j - f * k + b, e / 2 * k - f * j + c) + }, + randomPastelHex: function() { + var a, b, c, d; + return c = [255, 255, 255], d = Math.floor(256 * Math.random()), b = Math.floor(256 * Math.random()), a = Math.floor(256 * Math.random()), d = Math.floor((d + 3 * c[0]) / 4), b = Math.floor((b + 3 * c[1]) / 4), a = Math.floor((a + 3 * c[2]) / 4), this.rgbToHex(d, b, a) + }, + rgbToHex: function(a, b, c) { + return this.componentToHex(a) + this.componentToHex(b) + this.componentToHex(c) + }, + componentToHex: function(a) { + var b; + return b = a.toString(16), 2 === b.length ? b : b + "0" + } + }), c.Physics.P2.Spring = function(a, b, c, d, e, f, g, h, i, j) { + this.game = a.game, this.world = a, void 0 === d && (d = 1), void 0 === e && (e = 100), void 0 === f && (f = 1), d = a.pxm(d); + var k = { + restLength: d, + stiffness: e, + damping: f + }; + "undefined" != typeof g && null !== g && (k.worldAnchorA = [a.pxm(g[0]), a.pxm(g[1])]), "undefined" != typeof h && null !== h && (k.worldAnchorB = [a.pxm(h[0]), a.pxm(h[1])]), "undefined" != typeof i && null !== i && (k.localAnchorA = [a.pxm(i[0]), a.pxm(i[1])]), "undefined" != typeof j && null !== j && (k.localAnchorB = [a.pxm(j[0]), a.pxm(j[1])]), this.data = new p2.LinearSpring(b, c, k), this.data.parent = this + }, c.Physics.P2.Spring.prototype.constructor = c.Physics.P2.Spring, c.Physics.P2.RotationalSpring = function(a, b, c, d, e, f) { + this.game = a.game, this.world = a, void 0 === d && (d = null), void 0 === e && (e = 100), void 0 === f && (f = 1), d && (d = a.pxm(d)); + var g = { + restAngle: d, + stiffness: e, + damping: f + }; + this.data = new p2.RotationalSpring(b, c, g), this.data.parent = this + }, c.Physics.P2.Spring.prototype.constructor = c.Physics.P2.Spring, c.Physics.P2.Material = function(a) { + this.name = a, p2.Material.call(this) + }, c.Physics.P2.Material.prototype = Object.create(p2.Material.prototype), c.Physics.P2.Material.prototype.constructor = c.Physics.P2.Material, c.Physics.P2.ContactMaterial = function(a, b, c) { + p2.ContactMaterial.call(this, a, b, c) + }, c.Physics.P2.ContactMaterial.prototype = Object.create(p2.ContactMaterial.prototype), c.Physics.P2.ContactMaterial.prototype.constructor = c.Physics.P2.ContactMaterial, c.Physics.P2.CollisionGroup = function(a) { + this.mask = a + }, c.Physics.P2.DistanceConstraint = function(a, b, c, d, e, f, g) { + void 0 === d && (d = 100), void 0 === e && (e = [0, 0]), void 0 === f && (f = [0, 0]), void 0 === g && (g = Number.MAX_VALUE), this.game = a.game, this.world = a, d = a.pxm(d), e = [a.pxmi(e[0]), a.pxmi(e[1])], f = [a.pxmi(f[0]), a.pxmi(f[1])]; + var h = { + distance: d, + localAnchorA: e, + localAnchorB: f, + maxForce: g + }; + p2.DistanceConstraint.call(this, b, c, h) + }, c.Physics.P2.DistanceConstraint.prototype = Object.create(p2.DistanceConstraint.prototype), c.Physics.P2.DistanceConstraint.prototype.constructor = c.Physics.P2.DistanceConstraint, c.Physics.P2.GearConstraint = function(a, b, c, d, e) { + void 0 === d && (d = 0), void 0 === e && (e = 1), this.game = a.game, this.world = a; + var f = { + angle: d, + ratio: e + }; + p2.GearConstraint.call(this, b, c, f) + }, c.Physics.P2.GearConstraint.prototype = Object.create(p2.GearConstraint.prototype), c.Physics.P2.GearConstraint.prototype.constructor = c.Physics.P2.GearConstraint, c.Physics.P2.LockConstraint = function(a, b, c, d, e, f) { + void 0 === d && (d = [0, 0]), void 0 === e && (e = 0), void 0 === f && (f = Number.MAX_VALUE), this.game = a.game, this.world = a, d = [a.pxm(d[0]), a.pxm(d[1])]; + var g = { + localOffsetB: d, + localAngleB: e, + maxForce: f + }; + p2.LockConstraint.call(this, b, c, g) + }, c.Physics.P2.LockConstraint.prototype = Object.create(p2.LockConstraint.prototype), c.Physics.P2.LockConstraint.prototype.constructor = c.Physics.P2.LockConstraint, c.Physics.P2.PrismaticConstraint = function(a, b, c, d, e, f, g, h) { + void 0 === d && (d = !0), void 0 === e && (e = [0, 0]), void 0 === f && (f = [0, 0]), void 0 === g && (g = [0, 0]), void 0 === h && (h = Number.MAX_VALUE), this.game = a.game, this.world = a, e = [a.pxmi(e[0]), a.pxmi(e[1])], f = [a.pxmi(f[0]), a.pxmi(f[1])]; + var i = { + localAnchorA: e, + localAnchorB: f, + localAxisA: g, + maxForce: h, + disableRotationalLock: !d + }; + p2.PrismaticConstraint.call(this, b, c, i) + }, c.Physics.P2.PrismaticConstraint.prototype = Object.create(p2.PrismaticConstraint.prototype), c.Physics.P2.PrismaticConstraint.prototype.constructor = c.Physics.P2.PrismaticConstraint, c.Physics.P2.RevoluteConstraint = function(a, b, c, d, e, f, g) { + void 0 === f && (f = Number.MAX_VALUE), void 0 === g && (g = null), this.game = a.game, this.world = a, c = [a.pxmi(c[0]), a.pxmi(c[1])], e = [a.pxmi(e[0]), a.pxmi(e[1])], g && (g = [a.pxmi(g[0]), a.pxmi(g[1])]); + var h = { + worldPivot: g, + localPivotA: c, + localPivotB: e, + maxForce: f + }; + p2.RevoluteConstraint.call(this, b, d, h) + }, c.Physics.P2.RevoluteConstraint.prototype = Object.create(p2.RevoluteConstraint.prototype), c.Physics.P2.RevoluteConstraint.prototype.constructor = c.Physics.P2.RevoluteConstraint, c.ImageCollection = function(a, b, c, d, e, f, g) { + (void 0 === c || c <= 0) && (c = 32), (void 0 === d || d <= 0) && (d = 32), void 0 === e && (e = 0), void 0 === f && (f = 0), this.name = a, this.firstgid = 0 | b, this.imageWidth = 0 | c, this.imageHeight = 0 | d, this.imageMargin = 0 | e, this.imageSpacing = 0 | f, this.properties = g || {}, this.images = [], this.total = 0 + }, c.ImageCollection.prototype = { + containsImageIndex: function(a) { + return a >= this.firstgid && a < this.firstgid + this.total + }, + addImage: function(a, b) { + this.images.push({ + gid: a, + image: b + }), this.total++ + } + }, c.ImageCollection.prototype.constructor = c.ImageCollection, c.Tile = function(a, b, c, d, e, f) { + this.layer = a, this.index = b, this.x = c, this.y = d, this.rotation = 0, this.flipped = !1, this.worldX = c * e, this.worldY = d * f, this.width = e, this.height = f, this.centerX = Math.abs(e / 2), this.centerY = Math.abs(f / 2), this.alpha = 1, this.properties = {}, this.scanned = !1, this.faceTop = !1, this.faceBottom = !1, this.faceLeft = !1, this.faceRight = !1, this.collideLeft = !1, this.collideRight = !1, this.collideUp = !1, this.collideDown = !1, this.collisionCallback = null, this.collisionCallbackContext = this + }, c.Tile.prototype = { + containsPoint: function(a, b) { + return !(a < this.worldX || b < this.worldY || a > this.right || b > this.bottom) + }, + intersects: function(a, b, c, d) { + return !(c <= this.worldX) && (!(d <= this.worldY) && (!(a >= this.worldX + this.width) && !(b >= this.worldY + this.height))) + }, + setCollisionCallback: function(a, b) { + this.collisionCallback = a, this.collisionCallbackContext = b + }, + destroy: function() { + this.collisionCallback = null, this.collisionCallbackContext = null, this.properties = null + }, + setCollision: function(a, b, c, d) { + this.collideLeft = a, this.collideRight = b, this.collideUp = c, this.collideDown = d, this.faceLeft = a, this.faceRight = b, this.faceTop = c, this.faceBottom = d + }, + resetCollision: function() { + this.collideLeft = !1, this.collideRight = !1, this.collideUp = !1, this.collideDown = !1, this.faceTop = !1, this.faceBottom = !1, this.faceLeft = !1, this.faceRight = !1 + }, + isInteresting: function(a, b) { + return a && b ? this.collideLeft || this.collideRight || this.collideUp || this.collideDown || this.faceTop || this.faceBottom || this.faceLeft || this.faceRight || this.collisionCallback : a ? this.collideLeft || this.collideRight || this.collideUp || this.collideDown : !!b && (this.faceTop || this.faceBottom || this.faceLeft || this.faceRight) + }, + copy: function(a) { + this.index = a.index, this.alpha = a.alpha, this.properties = a.properties, this.collideUp = a.collideUp, this.collideDown = a.collideDown, this.collideLeft = a.collideLeft, this.collideRight = a.collideRight, this.collisionCallback = a.collisionCallback, this.collisionCallbackContext = a.collisionCallbackContext + } + }, c.Tile.prototype.constructor = c.Tile, Object.defineProperty(c.Tile.prototype, "collides", { + get: function() { + return this.collideLeft || this.collideRight || this.collideUp || this.collideDown + } + }), Object.defineProperty(c.Tile.prototype, "canCollide", { + get: function() { + return this.collideLeft || this.collideRight || this.collideUp || this.collideDown || this.collisionCallback + } + }), Object.defineProperty(c.Tile.prototype, "left", { + get: function() { + return this.worldX + } + }), Object.defineProperty(c.Tile.prototype, "right", { + get: function() { + return this.worldX + this.width + } + }), Object.defineProperty(c.Tile.prototype, "top", { + get: function() { + return this.worldY + } + }), Object.defineProperty(c.Tile.prototype, "bottom", { + get: function() { + return this.worldY + this.height + } + }), c.Tilemap = function(a, b, d, e, f, g) { + this.game = a, this.key = b; + var h = c.TilemapParser.parse(this.game, b, d, e, f, g); + null !== h && (this.width = h.width, this.height = h.height, this.tileWidth = h.tileWidth, this.tileHeight = h.tileHeight, this.orientation = h.orientation, this.format = h.format, this.version = h.version, this.properties = h.properties, this.widthInPixels = h.widthInPixels, this.heightInPixels = h.heightInPixels, this.layers = h.layers, this.tilesets = h.tilesets, this.imagecollections = h.imagecollections, this.tiles = h.tiles, this.objects = h.objects, this.collideIndexes = [], this.collision = h.collision, this.images = h.images, this.enableDebug = !1, this.currentLayer = 0, this.debugMap = [], this._results = [], this._tempA = 0, this._tempB = 0) + }, c.Tilemap.CSV = 0, c.Tilemap.TILED_JSON = 1, c.Tilemap.NORTH = 0, c.Tilemap.EAST = 1, c.Tilemap.SOUTH = 2, c.Tilemap.WEST = 3, c.Tilemap.prototype = { + create: function(a, b, c, d, e, f) { + return void 0 === f && (f = this.game.world), this.width = b, this.height = c, this.setTileSize(d, e), this.layers.length = 0, this.createBlankLayer(a, b, c, d, e, f) + }, + setTileSize: function(a, b) { + this.tileWidth = a, this.tileHeight = b, this.widthInPixels = this.width * a, this.heightInPixels = this.height * b + }, + addTilesetImage: function(a, b, d, e, f, g, h) { + if (void 0 === a) return null; + void 0 === d && (d = this.tileWidth), void 0 === e && (e = this.tileHeight), void 0 === f && (f = 0), void 0 === g && (g = 0), void 0 === h && (h = 0), 0 === d && (d = 32), 0 === e && (e = 32); + var i = null; + if (void 0 !== b && null !== b || (b = a), b instanceof c.BitmapData) i = b.canvas; + else { + if (!this.game.cache.checkImageKey(b)) return console.warn('Phaser.Tilemap.addTilesetImage: Invalid image key given: "' + b + '"'), null; + i = this.game.cache.getImage(b) + } + var j = this.getTilesetIndex(a); + if (null === j && this.format === c.Tilemap.TILED_JSON) return console.warn('Phaser.Tilemap.addTilesetImage: No data found in the JSON matching the tileset name: "' + a + '"'), null; + if (this.tilesets[j]) return this.tilesets[j].setImage(i), this.tilesets[j]; + var k = new c.Tileset(a, h, d, e, f, g, {}); + k.setImage(i), this.tilesets.push(k); + for (var l = this.tilesets.length - 1, m = f, n = f, o = 0, p = 0, q = 0, r = h; r < h + k.total && (this.tiles[r] = [m, n, l], m += d + g, o++, o !== k.total) && (p++, p !== k.columns || (m = f, n += e + g, p = 0, q++, q !== k.rows)); r++); + return k + }, + createFromObjects: function(a, b, d, e, f, g, h, i, j) { + if (void 0 === f && (f = !0), void 0 === g && (g = !1), void 0 === h && (h = this.game.world), void 0 === i && (i = c.Sprite), void 0 === j && (j = !0), !this.objects[a]) return void console.warn("Tilemap.createFromObjects: Invalid objectgroup name given: " + a); + for (var k = 0; k < this.objects[a].length; k++) { + var l = !1, + m = this.objects[a][k]; + if (void 0 !== m.gid && "number" == typeof b && m.gid === b ? l = !0 : void 0 !== m.id && "number" == typeof b && m.id === b ? l = !0 : void 0 !== m.name && "string" == typeof b && m.name === b && (l = !0), l) { + var n = new i(this.game, parseFloat(m.x, 10), parseFloat(m.y, 10), d, e); + n.name = m.name, n.visible = m.visible, n.autoCull = g, n.exists = f, m.width && (n.width = m.width), m.height && (n.height = m.height), m.rotation && (n.angle = m.rotation), j && (n.y -= n.height), h.add(n); + for (var o in m.properties) h.set(n, o, m.properties[o], !1, !1, 0, !0) + } + } + }, + createFromTiles: function(a, b, d, e, f, g) { + "number" == typeof a && (a = [a]), void 0 === b || null === b ? b = [] : "number" == typeof b && (b = [b]), e = this.getLayer(e), void 0 === f && (f = this.game.world), void 0 === g && (g = {}), void 0 === g.customClass && (g.customClass = c.Sprite), void 0 === g.adjustY && (g.adjustY = !0); + var h = this.layers[e].width, + i = this.layers[e].height; + if (this.copy(0, 0, h, i, e), this._results.length < 2) return 0; + for (var j, k = 0, l = 1, m = this._results.length; l < m; l++) + if (a.indexOf(this._results[l].index) !== -1) { + j = new g.customClass(this.game, this._results[l].worldX, this._results[l].worldY, d); + for (var n in g) j[n] = g[n]; + f.add(j), k++ + } if (1 === b.length) + for (l = 0; l < a.length; l++) this.replace(a[l], b[0], 0, 0, h, i, e); + else if (b.length > 1) + for (l = 0; l < a.length; l++) this.replace(a[l], b[l], 0, 0, h, i, e); + return k + }, + createLayer: function(a, b, d, e) { + void 0 === b && (b = this.game.width), void 0 === d && (d = this.game.height), void 0 === e && (e = this.game.world); + var f = a; + if ("string" == typeof a && (f = this.getLayerIndex(a)), null === f || f > this.layers.length) return void console.warn("Tilemap.createLayer: Invalid layer ID given: " + f); + void 0 === b || b <= 0 ? b = Math.min(this.game.width, this.layers[f].widthInPixels) : b > this.game.width && (b = this.game.width), void 0 === d || d <= 0 ? d = Math.min(this.game.height, this.layers[f].heightInPixels) : d > this.game.height && (d = this.game.height), this.enableDebug && (console.group("Tilemap.createLayer"), console.log("Name:", this.layers[f].name), console.log("Size:", b, "x", d), console.log("Tileset:", this.tilesets[0].name, "index:", f)); + var g = e.add(new c.TilemapLayer(this.game, this, f, b, d)); + return this.enableDebug && console.groupEnd(), g + }, + createBlankLayer: function(a, b, d, e, f, g) { + if (void 0 === g && (g = this.game.world), null !== this.getLayerIndex(a)) return void console.warn("Tilemap.createBlankLayer: Layer with matching name already exists: " + a); + for (var h, i = { + name: a, + x: 0, + y: 0, + width: b, + height: d, + widthInPixels: b * e, + heightInPixels: d * f, + alpha: 1, + visible: !0, + properties: {}, + indexes: [], + callbacks: [], + bodies: [], + data: null + }, j = [], k = 0; k < d; k++) { + h = []; + for (var l = 0; l < b; l++) h.push(new c.Tile(i, (-1), l, k, e, f)); + j.push(h) + } + i.data = j, this.layers.push(i), this.currentLayer = this.layers.length - 1; + var m = i.widthInPixels, + n = i.heightInPixels; + m > this.game.width && (m = this.game.width), n > this.game.height && (n = this.game.height); + var j = new c.TilemapLayer(this.game, this, this.layers.length - 1, m, n); + return j.name = a, g.add(j) + }, + getIndex: function(a, b) { + for (var c = 0; c < a.length; c++) + if (a[c].name === b) return c; + return null + }, + getLayerIndex: function(a) { + return this.getIndex(this.layers, a) + }, + getTilesetIndex: function(a) { + return this.getIndex(this.tilesets, a) + }, + getImageIndex: function(a) { + return this.getIndex(this.images, a) + }, + setTileIndexCallback: function(a, b, c, d) { + if (d = this.getLayer(d), "number" == typeof a) this.layers[d].callbacks[a] = { + callback: b, + callbackContext: c + }; + else + for (var e = 0, f = a.length; e < f; e++) this.layers[d].callbacks[a[e]] = { + callback: b, + callbackContext: c + } + }, + setTileLocationCallback: function(a, b, c, d, e, f, g) { + if (g = this.getLayer(g), this.copy(a, b, c, d, g), !(this._results.length < 2)) + for (var h = 1; h < this._results.length; h++) this._results[h].setCollisionCallback(e, f) + }, + setCollision: function(a, b, c, d) { + if (void 0 === b && (b = !0), void 0 === d && (d = !0), c = this.getLayer(c), "number" == typeof a) return this.setCollisionByIndex(a, b, c, !0); + if (Array.isArray(a)) { + for (var e = 0; e < a.length; e++) this.setCollisionByIndex(a[e], b, c, !1); + d && this.calculateFaces(c) + } + }, + setCollisionBetween: function(a, b, c, d, e) { + if (void 0 === c && (c = !0), void 0 === e && (e = !0), d = this.getLayer(d), !(a > b)) { + for (var f = a; f <= b; f++) this.setCollisionByIndex(f, c, d, !1); + e && this.calculateFaces(d) + } + }, + setCollisionByExclusion: function(a, b, c, d) { + void 0 === b && (b = !0), void 0 === d && (d = !0), c = this.getLayer(c); + for (var e = 0, f = this.tiles.length; e < f; e++) a.indexOf(e) === -1 && this.setCollisionByIndex(e, b, c, !1); + d && this.calculateFaces(c) + }, + setCollisionByIndex: function(a, b, c, d) { + if (void 0 === b && (b = !0), void 0 === c && (c = this.currentLayer), void 0 === d && (d = !0), b) this.collideIndexes.push(a); + else { + var e = this.collideIndexes.indexOf(a); + e > -1 && this.collideIndexes.splice(e, 1) + } + for (var f = 0; f < this.layers[c].height; f++) + for (var g = 0; g < this.layers[c].width; g++) { + var h = this.layers[c].data[f][g]; + h && h.index === a && (b ? h.setCollision(!0, !0, !0, !0) : h.resetCollision(), h.faceTop = b, h.faceBottom = b, h.faceLeft = b, h.faceRight = b) + } + return d && this.calculateFaces(c), c + }, + getLayer: function(a) { + return void 0 === a ? a = this.currentLayer : "string" == typeof a ? a = this.getLayerIndex(a) : a instanceof c.TilemapLayer && (a = a.index), a + }, + setPreventRecalculate: function(a) { + if (a === !0 && this.preventingRecalculate !== !0 && (this.preventingRecalculate = !0, this.needToRecalculate = {}), a === !1 && this.preventingRecalculate === !0) { + this.preventingRecalculate = !1; + for (var b in this.needToRecalculate) this.calculateFaces(b); + this.needToRecalculate = !1 + } + }, + calculateFaces: function(a) { + if (this.preventingRecalculate) return void(this.needToRecalculate[a] = !0); + for (var b = null, c = null, d = null, e = null, f = 0, g = this.layers[a].height; f < g; f++) + for (var h = 0, i = this.layers[a].width; h < i; h++) { + var j = this.layers[a].data[f][h]; + j && (b = this.getTileAbove(a, h, f), c = this.getTileBelow(a, h, f), d = this.getTileLeft(a, h, f), e = this.getTileRight(a, h, f), j.collides && (j.faceTop = !0, j.faceBottom = !0, j.faceLeft = !0, j.faceRight = !0), b && b.collides && (j.faceTop = !1), c && c.collides && (j.faceBottom = !1), d && d.collides && (j.faceLeft = !1), e && e.collides && (j.faceRight = !1)) + } + }, + getTileAbove: function(a, b, c) { + return c > 0 ? this.layers[a].data[c - 1][b] : null + }, + getTileBelow: function(a, b, c) { + return c < this.layers[a].height - 1 ? this.layers[a].data[c + 1][b] : null + }, + getTileLeft: function(a, b, c) { + return b > 0 ? this.layers[a].data[c][b - 1] : null + }, + getTileRight: function(a, b, c) { + return b < this.layers[a].width - 1 ? this.layers[a].data[c][b + 1] : null + }, + setLayer: function(a) { + a = this.getLayer(a), this.layers[a] && (this.currentLayer = a) + }, + hasTile: function(a, b, c) { + return c = this.getLayer(c), void 0 !== this.layers[c].data[b] && void 0 !== this.layers[c].data[b][a] && this.layers[c].data[b][a].index > -1 + }, + removeTile: function(a, b, d) { + if (d = this.getLayer(d), a >= 0 && a < this.layers[d].width && b >= 0 && b < this.layers[d].height && this.hasTile(a, b, d)) { + var e = this.layers[d].data[b][a]; + return this.layers[d].data[b][a] = new c.Tile(this.layers[d], (-1), a, b, this.tileWidth, this.tileHeight), this.layers[d].dirty = !0, this.calculateFaces(d), e + } + }, + removeTileWorldXY: function(a, b, c, d, e) { + return e = this.getLayer(e), a = this.game.math.snapToFloor(a, c) / c, b = this.game.math.snapToFloor(b, d) / d, this.removeTile(a, b, e) + }, + putTile: function(a, b, d, e) { + if (null === a) return this.removeTile(b, d, e); + if (e = this.getLayer(e), b >= 0 && b < this.layers[e].width && d >= 0 && d < this.layers[e].height) { + var f; + return a instanceof c.Tile ? (f = a.index, this.hasTile(b, d, e) ? this.layers[e].data[d][b].copy(a) : this.layers[e].data[d][b] = new c.Tile(e, f, b, d, a.width, a.height)) : (f = a, this.hasTile(b, d, e) ? this.layers[e].data[d][b].index = f : this.layers[e].data[d][b] = new c.Tile(this.layers[e], f, b, d, this.tileWidth, this.tileHeight)), this.collideIndexes.indexOf(f) > -1 ? this.layers[e].data[d][b].setCollision(!0, !0, !0, !0) : this.layers[e].data[d][b].resetCollision(), this.layers[e].dirty = !0, this.calculateFaces(e), this.layers[e].data[d][b] + } + return null + }, + putTileWorldXY: function(a, b, c, d, e, f) { + return f = this.getLayer(f), b = this.game.math.snapToFloor(b, d) / d, c = this.game.math.snapToFloor(c, e) / e, this.putTile(a, b, c, f) + }, + searchTileIndex: function(a, b, c, d) { + void 0 === b && (b = 0), void 0 === c && (c = !1), d = this.getLayer(d); + var e = 0; + if (c) { + for (var f = this.layers[d].height - 1; f >= 0; f--) + for (var g = this.layers[d].width - 1; g >= 0; g--) + if (this.layers[d].data[f][g].index === a) { + if (e === b) return this.layers[d].data[f][g]; + e++ + } + } else + for (var f = 0; f < this.layers[d].height; f++) + for (var g = 0; g < this.layers[d].width; g++) + if (this.layers[d].data[f][g].index === a) { + if (e === b) return this.layers[d].data[f][g]; + e++ + } return null + }, + getTile: function(a, b, c, d) { + return void 0 === d && (d = !1), c = this.getLayer(c), a >= 0 && a < this.layers[c].width && b >= 0 && b < this.layers[c].height ? this.layers[c].data[b][a].index === -1 ? d ? this.layers[c].data[b][a] : null : this.layers[c].data[b][a] : null; + }, + getTileWorldXY: function(a, b, c, d, e, f) { + return void 0 === c && (c = this.tileWidth), void 0 === d && (d = this.tileHeight), e = this.getLayer(e), a = this.game.math.snapToFloor(a, c) / c, b = this.game.math.snapToFloor(b, d) / d, this.getTile(a, b, e, f) + }, + copy: function(a, b, c, d, e) { + if (e = this.getLayer(e), !this.layers[e]) return void(this._results.length = 0); + void 0 === a && (a = 0), void 0 === b && (b = 0), void 0 === c && (c = this.layers[e].width), void 0 === d && (d = this.layers[e].height), a < 0 && (a = 0), b < 0 && (b = 0), c > this.layers[e].width && (c = this.layers[e].width), d > this.layers[e].height && (d = this.layers[e].height), this._results.length = 0, this._results.push({ + x: a, + y: b, + width: c, + height: d, + layer: e + }); + for (var f = b; f < b + d; f++) + for (var g = a; g < a + c; g++) this._results.push(this.layers[e].data[f][g]); + return this._results + }, + paste: function(a, b, c, d) { + if (void 0 === a && (a = 0), void 0 === b && (b = 0), d = this.getLayer(d), c && !(c.length < 2)) { + for (var e = a - c[1].x, f = b - c[1].y, g = 1; g < c.length; g++) this.layers[d].data[f + c[g].y][e + c[g].x].copy(c[g]); + this.layers[d].dirty = !0, this.calculateFaces(d) + } + }, + swap: function(a, b, c, d, e, f, g) { + g = this.getLayer(g), this.copy(c, d, e, f, g), this._results.length < 2 || (this._tempA = a, this._tempB = b, this._results.forEach(this.swapHandler, this), this.paste(c, d, this._results, g)) + }, + swapHandler: function(a) { + a.index === this._tempA ? a.index = this._tempB : a.index === this._tempB && (a.index = this._tempA) + }, + forEach: function(a, b, c, d, e, f, g) { + g = this.getLayer(g), this.copy(c, d, e, f, g), this._results.length < 2 || (this._results.forEach(a, b), this.paste(c, d, this._results, g)) + }, + replace: function(a, b, c, d, e, f, g) { + if (g = this.getLayer(g), this.copy(c, d, e, f, g), !(this._results.length < 2)) { + for (var h = 1; h < this._results.length; h++) this._results[h].index === a && (this._results[h].index = b); + this.paste(c, d, this._results, g) + } + }, + random: function(a, b, c, d, e) { + if (e = this.getLayer(e), this.copy(a, b, c, d, e), !(this._results.length < 2)) { + for (var f = [], g = 1; g < this._results.length; g++) + if (this._results[g].index) { + var h = this._results[g].index; + f.indexOf(h) === -1 && f.push(h) + } for (var i = 1; i < this._results.length; i++) this._results[i].index = this.game.rnd.pick(f); + this.paste(a, b, this._results, e) + } + }, + shuffle: function(a, b, d, e, f) { + if (f = this.getLayer(f), this.copy(a, b, d, e, f), !(this._results.length < 2)) { + for (var g = [], h = 1; h < this._results.length; h++) this._results[h].index && g.push(this._results[h].index); + c.ArrayUtils.shuffle(g); + for (var i = 1; i < this._results.length; i++) this._results[i].index = g[i - 1]; + this.paste(a, b, this._results, f) + } + }, + fill: function(a, b, c, d, e, f) { + if (f = this.getLayer(f), this.copy(b, c, d, e, f), !(this._results.length < 2)) { + for (var g = 1; g < this._results.length; g++) this._results[g].index = a; + this.paste(b, c, this._results, f) + } + }, + removeAllLayers: function() { + this.layers.length = 0, this.currentLayer = 0 + }, + dump: function() { + for (var a = "", b = [""], c = 0; c < this.layers[this.currentLayer].height; c++) { + for (var d = 0; d < this.layers[this.currentLayer].width; d++) a += "%c ", this.layers[this.currentLayer].data[c][d] > 1 ? this.debugMap[this.layers[this.currentLayer].data[c][d]] ? b.push("background: " + this.debugMap[this.layers[this.currentLayer].data[c][d]]) : b.push("background: #ffffff") : b.push("background: rgb(0, 0, 0)"); + a += "\n" + } + b[0] = a, console.log.apply(console, b) + }, + destroy: function() { + this.removeAllLayers(), this.data = [], this.game = null + } + }, c.Tilemap.prototype.constructor = c.Tilemap, Object.defineProperty(c.Tilemap.prototype, "layer", { + get: function() { + return this.layers[this.currentLayer] + }, + set: function(a) { + a !== this.currentLayer && this.setLayer(a) + } + }), c.TilemapLayer = function(a, b, d, e, f) { + e |= 0, f |= 0, c.Sprite.call(this, a, 0, 0), this.map = b, this.index = d, this.layer = b.layers[d], this.canvas = PIXI.CanvasPool.create(this, e, f), this.context = this.canvas.getContext("2d"), this.setTexture(new PIXI.Texture(new PIXI.BaseTexture(this.canvas))), this.type = c.TILEMAPLAYER, this.physicsType = c.TILEMAPLAYER, this.renderSettings = { + enableScrollDelta: !1, + overdrawRatio: .2, + copyCanvas: null + }, this.debug = !1, this.exists = !0, this.debugSettings = { + missingImageFill: "rgb(255,255,255)", + debuggedTileOverfill: "rgba(0,255,0,0.4)", + forceFullRedraw: !0, + debugAlpha: .5, + facingEdgeStroke: "rgba(0,255,0,1)", + collidingTileOverfill: "rgba(0,255,0,0.2)" + }, this.scrollFactorX = 1, this.scrollFactorY = 1, this.dirty = !0, this.rayStepRate = 4, this._wrap = !1, this._mc = { + scrollX: 0, + scrollY: 0, + renderWidth: 0, + renderHeight: 0, + tileWidth: b.tileWidth, + tileHeight: b.tileHeight, + cw: b.tileWidth, + ch: b.tileHeight, + tilesets: [] + }, this._scrollX = 0, this._scrollY = 0, this._results = [], a.device.canvasBitBltShift || (this.renderSettings.copyCanvas = c.TilemapLayer.ensureSharedCopyCanvas()), this.fixedToCamera = !0 + }, c.TilemapLayer.prototype = Object.create(c.Sprite.prototype), c.TilemapLayer.prototype.constructor = c.TilemapLayer, c.TilemapLayer.prototype.preUpdateCore = c.Component.Core.preUpdate, c.TilemapLayer.sharedCopyCanvas = null, c.TilemapLayer.ensureSharedCopyCanvas = function() { + return this.sharedCopyCanvas || (this.sharedCopyCanvas = PIXI.CanvasPool.create(this, 2, 2)), this.sharedCopyCanvas + }, c.TilemapLayer.prototype.preUpdate = function() { + return this.preUpdateCore() + }, c.TilemapLayer.prototype.postUpdate = function() { + this.fixedToCamera && (this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x, this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y), this._scrollX = this.game.camera.view.x * this.scrollFactorX / this.scale.x, this._scrollY = this.game.camera.view.y * this.scrollFactorY / this.scale.y + }, c.TilemapLayer.prototype._renderCanvas = function(a) { + this.fixedToCamera && (this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x, this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y), this._scrollX = this.game.camera.view.x * this.scrollFactorX / this.scale.x, this._scrollY = this.game.camera.view.y * this.scrollFactorY / this.scale.y, this.render(), PIXI.Sprite.prototype._renderCanvas.call(this, a) + }, c.TilemapLayer.prototype._renderWebGL = function(a) { + this.fixedToCamera && (this.position.x = (this.game.camera.view.x + this.cameraOffset.x) / this.game.camera.scale.x, this.position.y = (this.game.camera.view.y + this.cameraOffset.y) / this.game.camera.scale.y), this._scrollX = this.game.camera.view.x * this.scrollFactorX / this.scale.x, this._scrollY = this.game.camera.view.y * this.scrollFactorY / this.scale.y, this.render(), PIXI.Sprite.prototype._renderWebGL.call(this, a) + }, c.TilemapLayer.prototype.destroy = function() { + PIXI.CanvasPool.remove(this), c.Component.Destroy.prototype.destroy.call(this) + }, c.TilemapLayer.prototype.resize = function(a, b) { + this.canvas.width = a, this.canvas.height = b, this.texture.frame.resize(a, b), this.texture.width = a, this.texture.height = b, this.texture.crop.width = a, this.texture.crop.height = b, this.texture.baseTexture.width = a, this.texture.baseTexture.height = b, this.texture.baseTexture.dirty(), this.texture.requiresUpdate = !0, this.texture._updateUvs(), this.dirty = !0 + }, c.TilemapLayer.prototype.resizeWorld = function() { + this.game.world.setBounds(0, 0, this.layer.widthInPixels * this.scale.x, this.layer.heightInPixels * this.scale.y) + }, c.TilemapLayer.prototype._fixX = function(a) { + return 1 === this.scrollFactorX || 0 === this.scrollFactorX && 0 === this.position.x ? a : 0 === this.scrollFactorX && 0 !== this.position.x ? a - this.position.x : this._scrollX + (a - this._scrollX / this.scrollFactorX) + }, c.TilemapLayer.prototype._unfixX = function(a) { + return 1 === this.scrollFactorX ? a : this._scrollX / this.scrollFactorX + (a - this._scrollX) + }, c.TilemapLayer.prototype._fixY = function(a) { + return 1 === this.scrollFactorY || 0 === this.scrollFactorY && 0 === this.position.y ? a : 0 === this.scrollFactorY && 0 !== this.position.y ? a - this.position.y : this._scrollY + (a - this._scrollY / this.scrollFactorY) + }, c.TilemapLayer.prototype._unfixY = function(a) { + return 1 === this.scrollFactorY ? a : this._scrollY / this.scrollFactorY + (a - this._scrollY) + }, c.TilemapLayer.prototype.getTileX = function(a) { + return Math.floor(this._fixX(a) / this._mc.tileWidth) + }, c.TilemapLayer.prototype.getTileY = function(a) { + return Math.floor(this._fixY(a) / this._mc.tileHeight) + }, c.TilemapLayer.prototype.getTileXY = function(a, b, c) { + return c.x = this.getTileX(a), c.y = this.getTileY(b), c + }, c.TilemapLayer.prototype.getRayCastTiles = function(a, b, c, d) { + b || (b = this.rayStepRate), void 0 === c && (c = !1), void 0 === d && (d = !1); + var e = this.getTiles(a.x, a.y, a.width, a.height, c, d); + if (0 === e.length) return []; + for (var f = a.coordinatesOnLine(b), g = [], h = 0; h < e.length; h++) + for (var i = 0; i < f.length; i++) { + var j = e[h], + k = f[i]; + if (j.containsPoint(k[0], k[1])) { + g.push(j); + break + } + } + return g + }, c.TilemapLayer.prototype.getTiles = function(a, b, c, d, e, f) { + void 0 === e && (e = !1), void 0 === f && (f = !1); + var g = !(e || f); + a = this._fixX(a), b = this._fixY(b); + for (var h = Math.floor(a / (this._mc.cw * this.scale.x)), i = Math.floor(b / (this._mc.ch * this.scale.y)), j = Math.ceil((a + c) / (this._mc.cw * this.scale.x)) - h, k = Math.ceil((b + d) / (this._mc.ch * this.scale.y)) - i; this._results.length;) this._results.pop(); + for (var l = i; l < i + k; l++) + for (var m = h; m < h + j; m++) { + var n = this.layer.data[l]; + n && n[m] && (g || n[m].isInteresting(e, f)) && this._results.push(n[m]) + } + return this._results.slice() + }, c.TilemapLayer.prototype.resolveTileset = function(a) { + var b = this._mc.tilesets; + if (a < 2e3) + for (; b.length < a;) b.push(void 0); + var c = this.map.tiles[a] && this.map.tiles[a][2]; + if (null !== c) { + var d = this.map.tilesets[c]; + if (d && d.containsTileIndex(a)) return b[a] = d + } + return b[a] = null + }, c.TilemapLayer.prototype.resetTilesetCache = function() { + for (var a = this._mc.tilesets; a.length;) a.pop() + }, c.TilemapLayer.prototype.setScale = function(a, b) { + a = a || 1, b = b || a; + for (var c = 0; c < this.layer.data.length; c++) + for (var d = this.layer.data[c], e = 0; e < d.length; e++) { + var f = d[e]; + f.width = this.map.tileWidth * a, f.height = this.map.tileHeight * b, f.worldX = f.x * f.width, f.worldY = f.y * f.height + } + this.scale.setTo(a, b) + }, c.TilemapLayer.prototype.shiftCanvas = function(a, b, c) { + var d = a.canvas, + e = d.width - Math.abs(b), + f = d.height - Math.abs(c), + g = 0, + h = 0, + i = b, + j = c; + b < 0 && (g = -b, i = 0), c < 0 && (h = -c, j = 0); + var k = this.renderSettings.copyCanvas; + if (k) { + (k.width < e || k.height < f) && (k.width = e, k.height = f); + var l = k.getContext("2d"); + l.clearRect(0, 0, e, f), l.drawImage(d, g, h, e, f, 0, 0, e, f), a.clearRect(i, j, e, f), a.drawImage(k, 0, 0, e, f, i, j, e, f) + } else a.save(), a.globalCompositeOperation = "copy", a.drawImage(d, g, h, e, f, i, j, e, f), a.restore() + }, c.TilemapLayer.prototype.renderRegion = function(a, b, c, d, e, f) { + var g = this.context, + h = this.layer.width, + i = this.layer.height, + j = this._mc.tileWidth, + k = this._mc.tileHeight, + l = this._mc.tilesets, + m = NaN; + this._wrap || (c <= e && (c = Math.max(0, c), e = Math.min(h - 1, e)), d <= f && (d = Math.max(0, d), f = Math.min(i - 1, f))); + var n, o, p, q, r, s, t = c * j - a, + u = d * k - b, + v = (c + (1 << 20) * h) % h, + w = (d + (1 << 20) * i) % i; + for (q = w, s = f - d, o = u; s >= 0; q++, s--, o += k) { + q >= i && (q -= i); + var x = this.layer.data[q]; + for (p = v, r = e - c, n = t; r >= 0; p++, r--, n += j) { + p >= h && (p -= h); + var y = x[p]; + if (y && !(y.index < 0)) { + var z = y.index, + A = l[z]; + void 0 === A && (A = this.resolveTileset(z)), y.alpha === m || this.debug || (g.globalAlpha = y.alpha, m = y.alpha), A ? y.rotation || y.flipped ? (g.save(), g.translate(n + y.centerX, o + y.centerY), g.rotate(y.rotation), y.flipped && g.scale(-1, 1), A.draw(g, -y.centerX, -y.centerY, z), g.restore()) : A.draw(g, n, o, z) : this.debugSettings.missingImageFill && (g.fillStyle = this.debugSettings.missingImageFill, g.fillRect(n, o, j, k)), y.debug && this.debugSettings.debuggedTileOverfill && (g.fillStyle = this.debugSettings.debuggedTileOverfill, g.fillRect(n, o, j, k)) + } + } + } + }, c.TilemapLayer.prototype.renderDeltaScroll = function(a, b) { + var c = this._mc.scrollX, + d = this._mc.scrollY, + e = this.canvas.width, + f = this.canvas.height, + g = this._mc.tileWidth, + h = this._mc.tileHeight, + i = 0, + j = -g, + k = 0, + l = -h; + if (a < 0 ? (i = e + a, j = e - 1) : a > 0 && (j = a), b < 0 ? (k = f + b, l = f - 1) : b > 0 && (l = b), this.shiftCanvas(this.context, a, b), i = Math.floor((i + c) / g), j = Math.floor((j + c) / g), k = Math.floor((k + d) / h), l = Math.floor((l + d) / h), i <= j) { + this.context.clearRect(i * g - c, 0, (j - i + 1) * g, f); + var m = Math.floor((0 + d) / h), + n = Math.floor((f - 1 + d) / h); + this.renderRegion(c, d, i, m, j, n) + } + if (k <= l) { + this.context.clearRect(0, k * h - d, e, (l - k + 1) * h); + var o = Math.floor((0 + c) / g), + p = Math.floor((e - 1 + c) / g); + this.renderRegion(c, d, o, k, p, l) + } + }, c.TilemapLayer.prototype.renderFull = function() { + var a = this._mc.scrollX, + b = this._mc.scrollY, + c = this.canvas.width, + d = this.canvas.height, + e = this._mc.tileWidth, + f = this._mc.tileHeight, + g = Math.floor(a / e), + h = Math.floor((c - 1 + a) / e), + i = Math.floor(b / f), + j = Math.floor((d - 1 + b) / f); + this.context.clearRect(0, 0, c, d), this.renderRegion(a, b, g, i, h, j) + }, c.TilemapLayer.prototype.render = function() { + var a = !1; + if (this.visible) { + (this.dirty || this.layer.dirty) && (this.layer.dirty = !1, a = !0); + var b = this.canvas.width, + c = this.canvas.height, + d = 0 | this._scrollX, + e = 0 | this._scrollY, + f = this._mc, + g = f.scrollX - d, + h = f.scrollY - e; + if (a || 0 !== g || 0 !== h || f.renderWidth !== b || f.renderHeight !== c) return this.context.save(), f.scrollX = d, f.scrollY = e, f.renderWidth === b && f.renderHeight === c || (f.renderWidth = b, f.renderHeight = c), this.debug && (this.context.globalAlpha = this.debugSettings.debugAlpha, this.debugSettings.forceFullRedraw && (a = !0)), !a && this.renderSettings.enableScrollDelta && Math.abs(g) + Math.abs(h) < Math.min(b, c) ? this.renderDeltaScroll(g, h) : this.renderFull(), this.debug && (this.context.globalAlpha = 1, this.renderDebug()), this.texture.baseTexture.dirty(), this.dirty = !1, this.context.restore(), !0 + } + }, c.TilemapLayer.prototype.renderDebug = function() { + var a, b, c, d, e, f, g = this._mc.scrollX, + h = this._mc.scrollY, + i = this.context, + j = this.canvas.width, + k = this.canvas.height, + l = this.layer.width, + m = this.layer.height, + n = this._mc.tileWidth, + o = this._mc.tileHeight, + p = Math.floor(g / n), + q = Math.floor((j - 1 + g) / n), + r = Math.floor(h / o), + s = Math.floor((k - 1 + h) / o), + t = p * n - g, + u = r * o - h, + v = (p + (1 << 20) * l) % l, + w = (r + (1 << 20) * m) % m; + for (i.strokeStyle = this.debugSettings.facingEdgeStroke, d = w, f = s - r, b = u; f >= 0; d++, f--, b += o) { + d >= m && (d -= m); + var x = this.layer.data[d]; + for (c = v, e = q - p, a = t; e >= 0; c++, e--, a += n) { + c >= l && (c -= l); + var y = x[c]; + !y || y.index < 0 || !y.collides || (this.debugSettings.collidingTileOverfill && (i.fillStyle = this.debugSettings.collidingTileOverfill, i.fillRect(a, b, this._mc.cw, this._mc.ch)), this.debugSettings.facingEdgeStroke && (i.beginPath(), y.faceTop && (i.moveTo(a, b), i.lineTo(a + this._mc.cw, b)), y.faceBottom && (i.moveTo(a, b + this._mc.ch), i.lineTo(a + this._mc.cw, b + this._mc.ch)), y.faceLeft && (i.moveTo(a, b), i.lineTo(a, b + this._mc.ch)), y.faceRight && (i.moveTo(a + this._mc.cw, b), i.lineTo(a + this._mc.cw, b + this._mc.ch)), i.closePath(), i.stroke())) + } + } + }, Object.defineProperty(c.TilemapLayer.prototype, "wrap", { + get: function() { + return this._wrap + }, + set: function(a) { + this._wrap = a, this.dirty = !0 + } + }), Object.defineProperty(c.TilemapLayer.prototype, "scrollX", { + get: function() { + return this._scrollX + }, + set: function(a) { + this._scrollX = a + } + }), Object.defineProperty(c.TilemapLayer.prototype, "scrollY", { + get: function() { + return this._scrollY + }, + set: function(a) { + this._scrollY = a + } + }), Object.defineProperty(c.TilemapLayer.prototype, "collisionWidth", { + get: function() { + return this._mc.cw + }, + set: function(a) { + this._mc.cw = 0 | a, this.dirty = !0 + } + }), Object.defineProperty(c.TilemapLayer.prototype, "collisionHeight", { + get: function() { + return this._mc.ch + }, + set: function(a) { + this._mc.ch = 0 | a, this.dirty = !0 + } + }), c.TilemapParser = { + INSERT_NULL: !1, + parse: function(a, b, d, e, f, g) { + if (void 0 === d && (d = 32), void 0 === e && (e = 32), void 0 === f && (f = 10), void 0 === g && (g = 10), void 0 === b) return this.getEmptyData(); + if (null === b) return this.getEmptyData(d, e, f, g); + var h = a.cache.getTilemapData(b); + if (h) { + if (h.format === c.Tilemap.CSV) return this.parseCSV(b, h.data, d, e); + if (!h.format || h.format === c.Tilemap.TILED_JSON) return this.parseTiledJSON(h.data) + } else console.warn("Phaser.TilemapParser.parse - No map data found for key " + b) + }, + parseCSV: function(a, b, d, e) { + var f = this.getEmptyData(); + b = b.trim(); + for (var g = [], h = b.split("\n"), i = h.length, j = 0, k = 0; k < h.length; k++) { + g[k] = []; + for (var l = h[k].split(","), m = 0; m < l.length; m++) g[k][m] = new c.Tile(f.layers[0], parseInt(l[m], 10), m, k, d, e); + 0 === j && (j = l.length) + } + return f.format = c.Tilemap.CSV, f.name = a, f.width = j, f.height = i, f.tileWidth = d, f.tileHeight = e, f.widthInPixels = j * d, f.heightInPixels = i * e, f.layers[0].width = j, f.layers[0].height = i, f.layers[0].widthInPixels = f.widthInPixels, f.layers[0].heightInPixels = f.heightInPixels, f.layers[0].data = g, f + }, + getEmptyData: function(a, b, c, d) { + return { + width: void 0 !== c && null !== c ? c : 0, + height: void 0 !== d && null !== d ? d : 0, + tileWidth: void 0 !== a && null !== a ? a : 0, + tileHeight: void 0 !== b && null !== b ? b : 0, + orientation: "orthogonal", + version: "1", + properties: {}, + widthInPixels: 0, + heightInPixels: 0, + layers: [{ + name: "layer", + x: 0, + y: 0, + width: 0, + height: 0, + widthInPixels: 0, + heightInPixels: 0, + alpha: 1, + visible: !0, + properties: {}, + indexes: [], + callbacks: [], + bodies: [], + data: [] + }], + images: [], + objects: {}, + collision: {}, + tilesets: [], + tiles: [] + } + }, + parseTiledJSON: function(a) { + function b(a, b) { + var c = {}; + for (var d in b) { + var e = b[d]; + "undefined" != typeof a[e] && (c[e] = a[e]) + } + return c + } + if ("orthogonal" !== a.orientation) return console.warn("TilemapParser.parseTiledJSON - Only orthogonal map types are supported in this version of Phaser"), null; + for (var d = { + width: a.width, + height: a.height, + tileWidth: a.tilewidth, + tileHeight: a.tileheight, + orientation: a.orientation, + format: c.Tilemap.TILED_JSON, + version: a.version, + properties: a.properties, + widthInPixels: a.width * a.tilewidth, + heightInPixels: a.height * a.tileheight + }, e = [], f = 0; f < a.layers.length; f++) + if ("tilelayer" === a.layers[f].type) { + var g = a.layers[f]; + if (!g.compression && g.encoding && "base64" === g.encoding) { + for (var h = window.atob(g.data), i = h.length, j = new Array(i), k = 0; k < i; k += 4) j[k / 4] = (h.charCodeAt(k) | h.charCodeAt(k + 1) << 8 | h.charCodeAt(k + 2) << 16 | h.charCodeAt(k + 3) << 24) >>> 0; + g.data = j, delete g.encoding + } else if (g.compression) { + console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '" + g.name + "'"); + continue + } + var l = { + name: g.name, + x: g.x, + y: g.y, + width: g.width, + height: g.height, + widthInPixels: g.width * a.tilewidth, + heightInPixels: g.height * a.tileheight, + alpha: g.opacity, + visible: g.visible, + properties: {}, + indexes: [], + callbacks: [], + bodies: [] + }; + g.properties && (l.properties = g.properties); + for (var m, n, o, p, q = 0, r = [], s = [], t = 0, i = g.data.length; t < i; t++) { + if (m = 0, n = !1, p = g.data[t], o = 0, p > 536870912) switch (p > 2147483648 && (p -= 2147483648, o += 4), p > 1073741824 && (p -= 1073741824, o += 2), p > 536870912 && (p -= 536870912, o += 1), o) { + case 5: + m = Math.PI / 2; + break; + case 6: + m = Math.PI; + break; + case 3: + m = 3 * Math.PI / 2; + break; + case 4: + m = 0, n = !0; + break; + case 7: + m = Math.PI / 2, n = !0; + break; + case 2: + m = Math.PI, n = !0; + break; + case 1: + m = 3 * Math.PI / 2, n = !0 + } + if (p > 0) { + var u = new c.Tile(l, p, q, s.length, a.tilewidth, a.tileheight); + u.rotation = m, u.flipped = n, 0 !== o && (u.flippedVal = o), r.push(u) + } else c.TilemapParser.INSERT_NULL ? r.push(null) : r.push(new c.Tile(l, (-1), q, s.length, a.tilewidth, a.tileheight)); + q++, q === g.width && (s.push(r), q = 0, r = []) + } + l.data = s, e.push(l) + } d.layers = e; + for (var v = [], f = 0; f < a.layers.length; f++) + if ("imagelayer" === a.layers[f].type) { + var w = a.layers[f], + x = { + name: w.name, + image: w.image, + x: w.x, + y: w.y, + alpha: w.opacity, + visible: w.visible, + properties: {} + }; + w.properties && (x.properties = w.properties), v.push(x) + } d.images = v; + for (var y = [], z = [], A = null, f = 0; f < a.tilesets.length; f++) { + var B = a.tilesets[f]; + if (B.image) { + var C = new c.Tileset(B.name, B.firstgid, B.tilewidth, B.tileheight, B.margin, B.spacing, B.properties); + B.tileproperties && (C.tileProperties = B.tileproperties), C.updateTileData(B.imagewidth, B.imageheight), y.push(C) + } else { + var D = new c.ImageCollection(B.name, B.firstgid, B.tilewidth, B.tileheight, B.margin, B.spacing, B.properties); + for (var E in B.tiles) { + var x = B.tiles[E].image, + p = B.firstgid + parseInt(E, 10); + D.addImage(p, x) + } + z.push(D) + } + A && (A.lastgid = B.firstgid - 1), A = B + } + d.tilesets = y, d.imagecollections = z; + for (var F = {}, G = {}, f = 0; f < a.layers.length; f++) + if ("objectgroup" === a.layers[f].type) { + var H = a.layers[f]; + F[H.name] = [], G[H.name] = []; + for (var I = 0, i = H.objects.length; I < i; I++) + if (H.objects[I].gid) { + var J = { + gid: H.objects[I].gid, + name: H.objects[I].name, + type: H.objects[I].hasOwnProperty("type") ? H.objects[I].type : "", + x: H.objects[I].x, + y: H.objects[I].y, + visible: H.objects[I].visible, + properties: H.objects[I].properties + }; + H.objects[I].rotation && (J.rotation = H.objects[I].rotation), F[H.name].push(J) + } else if (H.objects[I].polyline) { + var J = { + name: H.objects[I].name, + type: H.objects[I].type, + x: H.objects[I].x, + y: H.objects[I].y, + width: H.objects[I].width, + height: H.objects[I].height, + visible: H.objects[I].visible, + properties: H.objects[I].properties + }; + H.objects[I].rotation && (J.rotation = H.objects[I].rotation), J.polyline = []; + for (var K = 0; K < H.objects[I].polyline.length; K++) J.polyline.push([H.objects[I].polyline[K].x, H.objects[I].polyline[K].y]); + G[H.name].push(J), F[H.name].push(J) + } else if (H.objects[I].polygon) { + var J = b(H.objects[I], ["name", "type", "x", "y", "visible", "rotation", "properties"]); + J.polygon = []; + for (var K = 0; K < H.objects[I].polygon.length; K++) J.polygon.push([H.objects[I].polygon[K].x, H.objects[I].polygon[K].y]); + F[H.name].push(J) + } else if (H.objects[I].ellipse) { + var J = b(H.objects[I], ["name", "type", "ellipse", "x", "y", "width", "height", "visible", "rotation", "properties"]); + F[H.name].push(J) + } else { + var J = b(H.objects[I], ["name", "type", "x", "y", "width", "height", "visible", "rotation", "properties"]); + J.rectangle = !0, F[H.name].push(J) + } + } d.objects = F, d.collision = G, d.tiles = []; + for (var f = 0; f < d.tilesets.length; f++) + for (var B = d.tilesets[f], q = B.tileMargin, L = B.tileMargin, M = 0, N = 0, O = 0, t = B.firstgid; t < B.firstgid + B.total && (d.tiles[t] = [q, L, f], q += B.tileWidth + B.tileSpacing, M++, M !== B.total) && (N++, N !== B.columns || (q = B.tileMargin, L += B.tileHeight + B.tileSpacing, N = 0, O++, O !== B.rows)); t++); + for (var l, u, P, B, f = 0; f < d.layers.length; f++) { + l = d.layers[f], B = null; + for (var k = 0; k < l.data.length; k++) { + r = l.data[k]; + for (var Q = 0; Q < r.length; Q++) u = r[Q], null === u || u.index < 0 || (P = d.tiles[u.index][2], B = d.tilesets[P], B.tileProperties && B.tileProperties[u.index - B.firstgid] && (u.properties = c.Utils.mixin(B.tileProperties[u.index - B.firstgid], u.properties))) + } + } + return d + } + }, c.Tileset = function(a, b, c, d, e, f, g) { + (void 0 === c || c <= 0) && (c = 32), (void 0 === d || d <= 0) && (d = 32), void 0 === e && (e = 0), void 0 === f && (f = 0), this.name = a, this.firstgid = 0 | b, this.tileWidth = 0 | c, this.tileHeight = 0 | d, this.tileMargin = 0 | e, this.tileSpacing = 0 | f, this.properties = g || {}, this.image = null, this.rows = 0, this.columns = 0, this.total = 0, this.drawCoords = [] + }, c.Tileset.prototype = { + draw: function(a, b, c, d) { + var e = d - this.firstgid << 1; + e >= 0 && e + 1 < this.drawCoords.length && a.drawImage(this.image, this.drawCoords[e], this.drawCoords[e + 1], this.tileWidth, this.tileHeight, b, c, this.tileWidth, this.tileHeight) + }, + containsTileIndex: function(a) { + return a >= this.firstgid && a < this.firstgid + this.total + }, + setImage: function(a) { + this.image = a, this.updateTileData(a.width, a.height) + }, + setSpacing: function(a, b) { + this.tileMargin = 0 | a, this.tileSpacing = 0 | b, this.image && this.updateTileData(this.image.width, this.image.height) + }, + updateTileData: function(a, b) { + var c = (b - 2 * this.tileMargin + this.tileSpacing) / (this.tileHeight + this.tileSpacing), + d = (a - 2 * this.tileMargin + this.tileSpacing) / (this.tileWidth + this.tileSpacing); + c % 1 === 0 && d % 1 === 0 || console.warn("Phaser.Tileset - " + this.name + " image tile area is not an even multiple of tile size"), c = Math.floor(c), d = Math.floor(d), (this.rows && this.rows !== c || this.columns && this.columns !== d) && console.warn("Phaser.Tileset - actual and expected number of tile rows and columns differ"), this.rows = c, this.columns = d, this.total = c * d, this.drawCoords.length = 0; + for (var e = this.tileMargin, f = this.tileMargin, g = 0; g < this.rows; g++) { + for (var h = 0; h < this.columns; h++) this.drawCoords.push(e), this.drawCoords.push(f), e += this.tileWidth + this.tileSpacing; + e = this.tileMargin, f += this.tileHeight + this.tileSpacing + } + } + }, c.Tileset.prototype.constructor = c.Tileset, c.Particle = function(a, b, d, e, f) { + c.Sprite.call(this, a, b, d, e, f), this.autoScale = !1, this.scaleData = null, this._s = 0, this.autoAlpha = !1, this.alphaData = null, this._a = 0 + }, c.Particle.prototype = Object.create(c.Sprite.prototype), c.Particle.prototype.constructor = c.Particle, c.Particle.prototype.update = function() { + this.autoScale && (this._s--, this._s ? this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y) : this.autoScale = !1), this.autoAlpha && (this._a--, this._a ? this.alpha = this.alphaData[this._a].v : this.autoAlpha = !1) + }, c.Particle.prototype.onEmit = function() {}, c.Particle.prototype.setAlphaData = function(a) { + this.alphaData = a, this._a = a.length - 1, this.alpha = this.alphaData[this._a].v, this.autoAlpha = !0 + }, c.Particle.prototype.setScaleData = function(a) { + this.scaleData = a, this._s = a.length - 1, this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y), this.autoScale = !0 + }, c.Particle.prototype.reset = function(a, b, d) { + return c.Component.Reset.prototype.reset.call(this, a, b, d), this.alpha = 1, this.scale.set(1), this.autoScale = !1, this.autoAlpha = !1, this + }, c.Particles = function(a) { + this.game = a, this.emitters = {}, this.ID = 0 + }, c.Particles.prototype = { + add: function(a) { + return this.emitters[a.name] = a, a + }, + remove: function(a) { + delete this.emitters[a.name] + }, + update: function() { + for (var a in this.emitters) this.emitters[a].exists && this.emitters[a].update() + } + }, c.Particles.prototype.constructor = c.Particles, c.Particles.Arcade = {}, c.Particles.Arcade.Emitter = function(a, b, d, e) { + this.maxParticles = e || 50, c.Group.call(this, a), this.name = "emitter" + this.game.particles.ID++, this.type = c.EMITTER, this.physicsType = c.GROUP, this.area = new c.Rectangle(b, d, 1, 1), this.minParticleSpeed = new c.Point((-100), (-100)), this.maxParticleSpeed = new c.Point(100, 100), this.minParticleScale = 1, this.maxParticleScale = 1, this.scaleData = null, this.minRotation = -360, this.maxRotation = 360, this.minParticleAlpha = 1, this.maxParticleAlpha = 1, this.alphaData = null, this.gravity = 100, this.particleClass = c.Particle, this.particleDrag = new c.Point, this.angularDrag = 0, this.frequency = 100, this.lifespan = 2e3, this.bounce = new c.Point, this.on = !1, this.particleAnchor = new c.Point(.5, .5), this.blendMode = c.blendModes.NORMAL, this.emitX = b, this.emitY = d, this.autoScale = !1, this.autoAlpha = !1, this.particleBringToTop = !1, this.particleSendToBack = !1, this._minParticleScale = new c.Point(1, 1), this._maxParticleScale = new c.Point(1, 1), this._quantity = 0, this._timer = 0, this._counter = 0, this._flowQuantity = 0, this._flowTotal = 0, this._explode = !0, this._frames = null + }, c.Particles.Arcade.Emitter.prototype = Object.create(c.Group.prototype), c.Particles.Arcade.Emitter.prototype.constructor = c.Particles.Arcade.Emitter, c.Particles.Arcade.Emitter.prototype.update = function() { + if (this.on && this.game.time.time >= this._timer) + if (this._timer = this.game.time.time + this.frequency * this.game.time.slowMotion, 0 !== this._flowTotal) + if (this._flowQuantity > 0) { + for (var a = 0; a < this._flowQuantity; a++) + if (this.emitParticle() && (this._counter++, this._flowTotal !== -1 && this._counter >= this._flowTotal)) { + this.on = !1; + break + } + } else this.emitParticle() && (this._counter++, this._flowTotal !== -1 && this._counter >= this._flowTotal && (this.on = !1)); + else this.emitParticle() && (this._counter++, this._quantity > 0 && this._counter >= this._quantity && (this.on = !1)); + for (var a = this.children.length; a--;) this.children[a].exists && this.children[a].update() + }, c.Particles.Arcade.Emitter.prototype.makeParticles = function(a, b, c, d, e) { + void 0 === b && (b = 0), void 0 === c && (c = this.maxParticles), void 0 === d && (d = !1), void 0 === e && (e = !1); + var f, g = 0, + h = a, + i = b; + for (this._frames = b, c > this.maxParticles && (this.maxParticles = c); g < c;) Array.isArray(a) && (h = this.game.rnd.pick(a)), Array.isArray(b) && (i = this.game.rnd.pick(b)), f = new this.particleClass(this.game, 0, 0, h, i), this.game.physics.arcade.enable(f, !1), d ? (f.body.checkCollision.any = !0, f.body.checkCollision.none = !1) : f.body.checkCollision.none = !0, f.body.collideWorldBounds = e, f.body.skipQuadTree = !0, f.exists = !1, f.visible = !1, f.anchor.copyFrom(this.particleAnchor), this.add(f), g++; + return this + }, c.Particles.Arcade.Emitter.prototype.kill = function() { + return this.on = !1, this.alive = !1, this.exists = !1, this + }, c.Particles.Arcade.Emitter.prototype.revive = function() { + return this.alive = !0, this.exists = !0, this + }, c.Particles.Arcade.Emitter.prototype.explode = function(a, b) { + return this._flowTotal = 0, this.start(!0, a, 0, b, !1), this + }, c.Particles.Arcade.Emitter.prototype.flow = function(a, b, c, d, e) { + return void 0 !== c && 0 !== c || (c = 1), void 0 === d && (d = -1), void 0 === e && (e = !0), c > this.maxParticles && (c = this.maxParticles), this._counter = 0, this._flowQuantity = c, this._flowTotal = d, e ? (this.start(!0, a, b, c), this._counter += c, this.on = !0, this._timer = this.game.time.time + b * this.game.time.slowMotion) : this.start(!1, a, b, c), this + }, c.Particles.Arcade.Emitter.prototype.start = function(a, b, c, d, e) { + if (void 0 === a && (a = !0), void 0 === b && (b = 0), void 0 !== c && null !== c || (c = 250), void 0 === d && (d = 0), void 0 === e && (e = !1), d > this.maxParticles && (d = this.maxParticles), this.revive(), this.visible = !0, this.lifespan = b, this.frequency = c, a || e) + for (var f = 0; f < d; f++) this.emitParticle(); + else this.on = !0, this._quantity = d, this._counter = 0, this._timer = this.game.time.time + c * this.game.time.slowMotion; + return this + }, c.Particles.Arcade.Emitter.prototype.emitParticle = function(a, b, c, d) { + void 0 === a && (a = null), void 0 === b && (b = null); + var e = this.getFirstExists(!1); + if (null === e) return !1; + var f = this.game.rnd; + void 0 !== c && void 0 !== d ? e.loadTexture(c, d) : void 0 !== c && e.loadTexture(c); + var g = this.emitX, + h = this.emitY; + null !== a ? g = a : this.width > 1 && (g = f.between(this.left, this.right)), null !== b ? h = b : this.height > 1 && (h = f.between(this.top, this.bottom)), e.reset(g, h), e.angle = 0, e.lifespan = this.lifespan, this.particleBringToTop ? this.bringToTop(e) : this.particleSendToBack && this.sendToBack(e), this.autoScale ? e.setScaleData(this.scaleData) : 1 !== this.minParticleScale || 1 !== this.maxParticleScale ? e.scale.set(f.realInRange(this.minParticleScale, this.maxParticleScale)) : this._minParticleScale.x === this._maxParticleScale.x && this._minParticleScale.y === this._maxParticleScale.y || e.scale.set(f.realInRange(this._minParticleScale.x, this._maxParticleScale.x), f.realInRange(this._minParticleScale.y, this._maxParticleScale.y)), void 0 === d && (Array.isArray(this._frames) ? e.frame = this.game.rnd.pick(this._frames) : e.frame = this._frames), this.autoAlpha ? e.setAlphaData(this.alphaData) : e.alpha = f.realInRange(this.minParticleAlpha, this.maxParticleAlpha), e.blendMode = this.blendMode; + var i = e.body; + return i.updateBounds(), i.bounce.copyFrom(this.bounce), i.drag.copyFrom(this.particleDrag), i.velocity.x = f.between(this.minParticleSpeed.x, this.maxParticleSpeed.x), i.velocity.y = f.between(this.minParticleSpeed.y, this.maxParticleSpeed.y), i.angularVelocity = f.between(this.minRotation, this.maxRotation), i.gravity.y = this.gravity, i.angularDrag = this.angularDrag, e.onEmit(), !0 + }, c.Particles.Arcade.Emitter.prototype.destroy = function() { + this.game.particles.remove(this), c.Group.prototype.destroy.call(this, !0, !1) + }, c.Particles.Arcade.Emitter.prototype.setSize = function(a, b) { + return this.area.width = a, this.area.height = b, this + }, c.Particles.Arcade.Emitter.prototype.setXSpeed = function(a, b) { + return a = a || 0, b = b || 0, this.minParticleSpeed.x = a, this.maxParticleSpeed.x = b, this + }, c.Particles.Arcade.Emitter.prototype.setYSpeed = function(a, b) { + return a = a || 0, b = b || 0, this.minParticleSpeed.y = a, this.maxParticleSpeed.y = b, this + }, c.Particles.Arcade.Emitter.prototype.setRotation = function(a, b) { + return a = a || 0, b = b || 0, this.minRotation = a, this.maxRotation = b, this + }, c.Particles.Arcade.Emitter.prototype.setAlpha = function(a, b, d, e, f) { + if (void 0 === a && (a = 1), void 0 === b && (b = 1), void 0 === d && (d = 0), void 0 === e && (e = c.Easing.Linear.None), void 0 === f && (f = !1), this.minParticleAlpha = a, this.maxParticleAlpha = b, this.autoAlpha = !1, d > 0 && a !== b) { + var g = { + v: a + }, + h = this.game.make.tween(g).to({ + v: b + }, d, e); + h.yoyo(f), this.alphaData = h.generateData(60), this.alphaData.reverse(), this.autoAlpha = !0 + } + return this + }, c.Particles.Arcade.Emitter.prototype.setScale = function(a, b, d, e, f, g, h) { + if (void 0 === a && (a = 1), void 0 === b && (b = 1), void 0 === d && (d = 1), void 0 === e && (e = 1), void 0 === f && (f = 0), void 0 === g && (g = c.Easing.Linear.None), void 0 === h && (h = !1), this.minParticleScale = 1, this.maxParticleScale = 1, this._minParticleScale.set(a, d), this._maxParticleScale.set(b, e), this.autoScale = !1, f > 0 && (a !== b || d !== e)) { + var i = { + x: a, + y: d + }, + j = this.game.make.tween(i).to({ + x: b, + y: e + }, f, g); + j.yoyo(h), this.scaleData = j.generateData(60), this.scaleData.reverse(), this.autoScale = !0 + } + return this + }, c.Particles.Arcade.Emitter.prototype.at = function(a) { + return a.center ? (this.emitX = a.center.x, this.emitY = a.center.y) : (this.emitX = a.world.x + a.anchor.x * a.width, this.emitY = a.world.y + a.anchor.y * a.height), this + }, Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "width", { + get: function() { + return this.area.width + }, + set: function(a) { + this.area.width = a + } + }), Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "height", { + get: function() { + return this.area.height + }, + set: function(a) { + this.area.height = a + } + }), Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "x", { + get: function() { + return this.emitX + }, + set: function(a) { + this.emitX = a + } + }), Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "y", { + get: function() { + return this.emitY + }, + set: function(a) { + this.emitY = a + } + }), Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "left", { + get: function() { + return Math.floor(this.x - this.area.width / 2) + } + }), Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "right", { + get: function() { + return Math.floor(this.x + this.area.width / 2) + } + }), Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "top", { + get: function() { + return Math.floor(this.y - this.area.height / 2) + } + }), Object.defineProperty(c.Particles.Arcade.Emitter.prototype, "bottom", { + get: function() { + return Math.floor(this.y + this.area.height / 2); + } + }), c.Weapon = function(a, b) { + c.Plugin.call(this, a, b), this.bullets = null, this.autoExpandBulletsGroup = !1, this.autofire = !1, this.shots = 0, this.fireLimit = 0, this.fireRate = 100, this.fireRateVariance = 0, this.fireFrom = new c.Rectangle(0, 0, 1, 1), this.fireAngle = c.ANGLE_UP, this.bulletInheritSpriteSpeed = !1, this.bulletAnimation = "", this.bulletFrameRandom = !1, this.bulletFrameCycle = !1, this.bulletWorldWrap = !1, this.bulletWorldWrapPadding = 0, this.bulletAngleOffset = 0, this.bulletAngleVariance = 0, this.bulletSpeed = 200, this.bulletSpeedVariance = 0, this.bulletLifespan = 0, this.bulletKillDistance = 0, this.bulletGravity = new c.Point(0, 0), this.bulletRotateToVelocity = !1, this.bulletKey = "", this.bulletFrame = "", this._bulletClass = c.Bullet, this._bulletCollideWorldBounds = !1, this._bulletKillType = c.Weapon.KILL_WORLD_BOUNDS, this._data = { + customBody: !1, + width: 0, + height: 0, + offsetX: 0, + offsetY: 0 + }, this.bounds = new c.Rectangle, this.bulletBounds = a.world.bounds, this.bulletFrames = [], this.bulletFrameIndex = 0, this.anims = {}, this.onFire = new c.Signal, this.onKill = new c.Signal, this.onFireLimit = new c.Signal, this.trackedSprite = null, this.trackedPointer = null, this.trackRotation = !1, this.trackOffset = new c.Point, this._nextFire = 0, this._rotatedPoint = new c.Point + }, c.Weapon.prototype = Object.create(c.Plugin.prototype), c.Weapon.prototype.constructor = c.Weapon, c.Weapon.KILL_NEVER = 0, c.Weapon.KILL_LIFESPAN = 1, c.Weapon.KILL_DISTANCE = 2, c.Weapon.KILL_WEAPON_BOUNDS = 3, c.Weapon.KILL_CAMERA_BOUNDS = 4, c.Weapon.KILL_WORLD_BOUNDS = 5, c.Weapon.KILL_STATIC_BOUNDS = 6, c.Weapon.prototype.createBullets = function(a, b, d, e) { + return void 0 === a && (a = 1), void 0 === e && (e = this.game.world), this.bullets || (this.bullets = this.game.add.physicsGroup(c.Physics.ARCADE, e), this.bullets.classType = this._bulletClass), 0 !== a && (a === -1 && (this.autoExpandBulletsGroup = !0, a = 1), this.bullets.createMultiple(a, b, d), this.bullets.setAll("data.bulletManager", this), this.bulletKey = b, this.bulletFrame = d), this + }, c.Weapon.prototype.forEach = function(a, b) { + return this.bullets.forEachExists(a, b, arguments), this + }, c.Weapon.prototype.pauseAll = function() { + return this.bullets.setAll("body.enable", !1), this + }, c.Weapon.prototype.resumeAll = function() { + return this.bullets.setAll("body.enable", !0), this + }, c.Weapon.prototype.killAll = function() { + return this.bullets.callAllExists("kill", !0), this.bullets.setAll("body.enable", !0), this + }, c.Weapon.prototype.resetShots = function(a) { + return this.shots = 0, void 0 !== a && (this.fireLimit = a), this + }, c.Weapon.prototype.destroy = function() { + this.parent.remove(this, !1), this.bullets.destroy(), this.game = null, this.parent = null, this.active = !1, this.visible = !1 + }, c.Weapon.prototype.update = function() { + this._bulletKillType === c.Weapon.KILL_WEAPON_BOUNDS && (this.trackedSprite ? (this.trackedSprite.updateTransform(), this.bounds.centerOn(this.trackedSprite.worldPosition.x, this.trackedSprite.worldPosition.y)) : this.trackedPointer && this.bounds.centerOn(this.trackedPointer.worldX, this.trackedPointer.worldY)), this.autofire && this.fire() + }, c.Weapon.prototype.trackSprite = function(a, b, c, d) { + return void 0 === b && (b = 0), void 0 === c && (c = 0), void 0 === d && (d = !1), this.trackedPointer = null, this.trackedSprite = a, this.trackRotation = d, this.trackOffset.set(b, c), this + }, c.Weapon.prototype.trackPointer = function(a, b, c) { + return void 0 === a && (a = this.game.input.activePointer), void 0 === b && (b = 0), void 0 === c && (c = 0), this.trackedPointer = a, this.trackedSprite = null, this.trackRotation = !1, this.trackOffset.set(b, c), this + }, c.Weapon.prototype.fire = function(a, b, d) { + if (this.game.time.now < this._nextFire || this.fireLimit > 0 && this.shots === this.fireLimit) return !1; + var e = this.bulletSpeed; + 0 !== this.bulletSpeedVariance && (e += c.Math.between(-this.bulletSpeedVariance, this.bulletSpeedVariance)), a ? this.fireFrom.width > 1 ? this.fireFrom.centerOn(a.x, a.y) : (this.fireFrom.x = a.x, this.fireFrom.y = a.y) : this.trackedSprite ? (this.trackRotation ? (this._rotatedPoint.set(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y), this._rotatedPoint.rotate(this.trackedSprite.world.x, this.trackedSprite.world.y, this.trackedSprite.rotation), this.fireFrom.width > 1 ? this.fireFrom.centerOn(this._rotatedPoint.x, this._rotatedPoint.y) : (this.fireFrom.x = this._rotatedPoint.x, this.fireFrom.y = this._rotatedPoint.y)) : this.fireFrom.width > 1 ? this.fireFrom.centerOn(this.trackedSprite.world.x + this.trackOffset.x, this.trackedSprite.world.y + this.trackOffset.y) : (this.fireFrom.x = this.trackedSprite.world.x + this.trackOffset.x, this.fireFrom.y = this.trackedSprite.world.y + this.trackOffset.y), this.bulletInheritSpriteSpeed && (e += this.trackedSprite.body.speed)) : this.trackedPointer && (this.fireFrom.width > 1 ? this.fireFrom.centerOn(this.trackedPointer.world.x + this.trackOffset.x, this.trackedPointer.world.y + this.trackOffset.y) : (this.fireFrom.x = this.trackedPointer.world.x + this.trackOffset.x, this.fireFrom.y = this.trackedPointer.world.y + this.trackOffset.y)); + var f = this.fireFrom.width > 1 ? this.fireFrom.randomX : this.fireFrom.x, + g = this.fireFrom.height > 1 ? this.fireFrom.randomY : this.fireFrom.y, + h = this.trackRotation ? this.trackedSprite.angle : this.fireAngle; + void 0 !== b && void 0 !== d && (h = this.game.math.radToDeg(Math.atan2(d - g, b - f))), 0 !== this.bulletAngleVariance && (h += c.Math.between(-this.bulletAngleVariance, this.bulletAngleVariance)); + var i = 0, + j = 0; + 0 === h || 180 === h ? i = Math.cos(this.game.math.degToRad(h)) * e : 90 === h || 270 === h ? j = Math.sin(this.game.math.degToRad(h)) * e : (i = Math.cos(this.game.math.degToRad(h)) * e, j = Math.sin(this.game.math.degToRad(h)) * e); + var k = null; + if (this.autoExpandBulletsGroup ? (k = this.bullets.getFirstExists(!1, !0, f, g, this.bulletKey, this.bulletFrame), k.data.bulletManager = this) : k = this.bullets.getFirstExists(!1), k) { + if (k.reset(f, g), k.data.fromX = f, k.data.fromY = g, k.data.killType = this.bulletKillType, k.data.killDistance = this.bulletKillDistance, k.data.rotateToVelocity = this.bulletRotateToVelocity, this.bulletKillType === c.Weapon.KILL_LIFESPAN && (k.lifespan = this.bulletLifespan), k.angle = h + this.bulletAngleOffset, "" !== this.bulletAnimation) { + if (null === k.animations.getAnimation(this.bulletAnimation)) { + var l = this.anims[this.bulletAnimation]; + k.animations.add(l.name, l.frames, l.frameRate, l.loop, l.useNumericIndex) + } + k.animations.play(this.bulletAnimation) + } else this.bulletFrameCycle ? (k.frame = this.bulletFrames[this.bulletFrameIndex], this.bulletFrameIndex++, this.bulletFrameIndex >= this.bulletFrames.length && (this.bulletFrameIndex = 0)) : this.bulletFrameRandom && (k.frame = this.bulletFrames[Math.floor(Math.random() * this.bulletFrames.length)]); + if (k.data.bodyDirty && (this._data.customBody && k.body.setSize(this._data.width, this._data.height, this._data.offsetX, this._data.offsetY), k.body.collideWorldBounds = this.bulletCollideWorldBounds, k.data.bodyDirty = !1), k.body.velocity.set(i, j), k.body.gravity.set(this.bulletGravity.x, this.bulletGravity.y), 0 !== this.bulletSpeedVariance) { + var m = this.fireRate; + m += c.Math.between(-this.fireRateVariance, this.fireRateVariance), m < 0 && (m = 0), this._nextFire = this.game.time.now + m + } else this._nextFire = this.game.time.now + this.fireRate; + this.shots++, this.onFire.dispatch(k, this, e), this.fireLimit > 0 && this.shots === this.fireLimit && this.onFireLimit.dispatch(this, this.fireLimit) + } + return k + }, c.Weapon.prototype.fireAtPointer = function(a) { + return void 0 === a && (a = this.game.input.activePointer), this.fire(null, a.worldX, a.worldY) + }, c.Weapon.prototype.fireAtSprite = function(a) { + return this.fire(null, a.world.x, a.world.y) + }, c.Weapon.prototype.fireAtXY = function(a, b) { + return this.fire(null, a, b) + }, c.Weapon.prototype.setBulletBodyOffset = function(a, b, c, d) { + return void 0 === c && (c = 0), void 0 === d && (d = 0), this._data.customBody = !0, this._data.width = a, this._data.height = b, this._data.offsetX = c, this._data.offsetY = d, this.bullets.callAll("body.setSize", "body", a, b, c, d), this.bullets.setAll("data.bodyDirty", !1), this + }, c.Weapon.prototype.setBulletFrames = function(a, b, d, e) { + return void 0 === d && (d = !0), void 0 === e && (e = !1), this.bulletFrames = c.ArrayUtils.numberArray(a, b), this.bulletFrameIndex = 0, this.bulletFrameCycle = d, this.bulletFrameRandom = e, this + }, c.Weapon.prototype.addBulletAnimation = function(a, b, c, d, e) { + return this.anims[a] = { + name: a, + frames: b, + frameRate: c, + loop: d, + useNumericIndex: e + }, this.bullets.callAll("animations.add", "animations", a, b, c, d, e), this.bulletAnimation = a, this + }, c.Weapon.prototype.debug = function(a, b, c) { + void 0 === a && (a = 16), void 0 === b && (b = 32), void 0 === c && (c = !1), this.game.debug.text("Weapon Plugin", a, b), this.game.debug.text("Bullets Alive: " + this.bullets.total + " - Total: " + this.bullets.length, a, b + 24), c && this.bullets.forEachExists(this.game.debug.body, this.game.debug, "rgba(255, 0, 255, 0.8)") + }, Object.defineProperty(c.Weapon.prototype, "bulletClass", { + get: function() { + return this._bulletClass + }, + set: function(a) { + this._bulletClass = a, this.bullets.classType = this._bulletClass + } + }), Object.defineProperty(c.Weapon.prototype, "bulletKillType", { + get: function() { + return this._bulletKillType + }, + set: function(a) { + switch (a) { + case c.Weapon.KILL_STATIC_BOUNDS: + case c.Weapon.KILL_WEAPON_BOUNDS: + this.bulletBounds = this.bounds; + break; + case c.Weapon.KILL_CAMERA_BOUNDS: + this.bulletBounds = this.game.camera.view; + break; + case c.Weapon.KILL_WORLD_BOUNDS: + this.bulletBounds = this.game.world.bounds + } + this._bulletKillType = a + } + }), Object.defineProperty(c.Weapon.prototype, "bulletCollideWorldBounds", { + get: function() { + return this._bulletCollideWorldBounds + }, + set: function(a) { + this._bulletCollideWorldBounds = a, this.bullets.setAll("body.collideWorldBounds", a), this.bullets.setAll("data.bodyDirty", !1) + } + }), Object.defineProperty(c.Weapon.prototype, "x", { + get: function() { + return this.fireFrom.x + }, + set: function(a) { + this.fireFrom.x = a + } + }), Object.defineProperty(c.Weapon.prototype, "y", { + get: function() { + return this.fireFrom.y + }, + set: function(a) { + this.fireFrom.y = a + } + }), c.Bullet = function(a, b, d, e, f) { + c.Sprite.call(this, a, b, d, e, f), this.anchor.set(.5), this.data = { + bulletManager: null, + fromX: 0, + fromY: 0, + bodyDirty: !0, + rotateToVelocity: !1, + killType: 0, + killDistance: 0 + } + }, c.Bullet.prototype = Object.create(c.Sprite.prototype), c.Bullet.prototype.constructor = c.Bullet, c.Bullet.prototype.kill = function() { + return this.alive = !1, this.exists = !1, this.visible = !1, this.data.bulletManager.onKill.dispatch(this), this + }, c.Bullet.prototype.update = function() { + this.exists && (this.data.killType > c.Weapon.KILL_LIFESPAN && (this.data.killType === c.Weapon.KILL_DISTANCE ? this.game.physics.arcade.distanceToXY(this, this.data.fromX, this.data.fromY, !0) > this.data.killDistance && this.kill() : this.data.bulletManager.bulletBounds.intersects(this) || this.kill()), this.data.rotateToVelocity && (this.rotation = Math.atan2(this.body.velocity.y, this.body.velocity.x)), this.data.bulletManager.bulletWorldWrap && this.game.world.wrap(this, this.data.bulletManager.bulletWorldWrapPadding)) + }, c.Video = function(a, b, d) { + if (void 0 === b && (b = null), void 0 === d && (d = null), this.game = a, this.key = b, this.width = 0, this.height = 0, this.type = c.VIDEO, this.disableTextureUpload = !1, this.touchLocked = !1, this.onPlay = new c.Signal, this.onChangeSource = new c.Signal, this.onComplete = new c.Signal, this.onAccess = new c.Signal, this.onError = new c.Signal, this.onTimeout = new c.Signal, this.timeout = 15e3, this._timeOutID = null, this.video = null, this.videoStream = null, this.isStreaming = !1, this.retryLimit = 20, this.retry = 0, this.retryInterval = 500, this._retryID = null, this._codeMuted = !1, this._muted = !1, this._codePaused = !1, this._paused = !1, this._pending = !1, this._autoplay = !1, this._endCallback = null, this._playCallback = null, b && this.game.cache.checkVideoKey(b)) { + var e = this.game.cache.getVideo(b); + e.isBlob ? this.createVideoFromBlob(e.data) : this.video = e.data, this.width = this.video.videoWidth, this.height = this.video.videoHeight + } else d && this.createVideoFromURL(d, !1); + this.video && !d ? (this.baseTexture = new PIXI.BaseTexture(this.video), this.baseTexture.forceLoaded(this.width, this.height)) : (this.baseTexture = new PIXI.BaseTexture(c.Cache.DEFAULT.baseTexture.source), this.baseTexture.forceLoaded(this.width, this.height)), this.texture = new PIXI.Texture(this.baseTexture), this.textureFrame = new c.Frame(0, 0, 0, this.width, this.height, "video"), this.texture.setFrame(this.textureFrame), this.texture.valid = !1, null !== b && this.video && (this.texture.valid = this.video.canplay), this.snapshot = null, c.BitmapData && (this.snapshot = new c.BitmapData(this.game, "", this.width, this.height)), !this.game.device.cocoonJS && (this.game.device.iOS || this.game.device.android) || window.PhaserGlobal && window.PhaserGlobal.fakeiOSTouchLock ? this.setTouchLock() : e && (e.locked = !1) + }, c.Video.prototype = { + connectToMediaStream: function(a, b) { + return a && b && (this.video = a, this.videoStream = b, this.isStreaming = !0, this.baseTexture.source = this.video, this.updateTexture(null, this.video.videoWidth, this.video.videoHeight), this.onAccess.dispatch(this)), this + }, + startMediaStream: function(a, b, c) { + if (void 0 === a && (a = !1), void 0 === b && (b = null), void 0 === c && (c = null), !this.game.device.getUserMedia) return this.onError.dispatch(this, "No getUserMedia"), !1; + null !== this.videoStream && (this.videoStream.active ? this.videoStream.active = !1 : this.videoStream.stop()), this.removeVideoElement(), this.video = document.createElement("video"), this.video.setAttribute("autoplay", "autoplay"), null !== b && (this.video.width = b), null !== c && (this.video.height = c), this._timeOutID = window.setTimeout(this.getUserMediaTimeout.bind(this), this.timeout); + try { + navigator.getUserMedia({ + audio: a, + video: !0 + }, this.getUserMediaSuccess.bind(this), this.getUserMediaError.bind(this)) + } catch (a) { + this.getUserMediaError(a) + } + return this + }, + getUserMediaTimeout: function() { + clearTimeout(this._timeOutID), this.onTimeout.dispatch(this) + }, + getUserMediaError: function(a) { + clearTimeout(this._timeOutID), this.onError.dispatch(this, a) + }, + getUserMediaSuccess: function(a) { + clearTimeout(this._timeOutID), this.videoStream = a, void 0 !== this.video.mozSrcObject ? this.video.mozSrcObject = a : this.video.src = window.URL && window.URL.createObjectURL(a) || a; + var b = this; + this.video.onloadeddata = function() { + function a() { + if (c > 0) + if (b.video.videoWidth > 0) { + var d = b.video.videoWidth, + e = b.video.videoHeight; + isNaN(b.video.videoHeight) && (e = d / (4 / 3)), b.video.play(), b.isStreaming = !0, b.baseTexture.source = b.video, b.updateTexture(null, d, e), b.onAccess.dispatch(b) + } else window.setTimeout(a, 500); + else console.warn("Unable to connect to video stream. Webcam error?"); + c-- + } + var c = 10; + a() + } + }, + createVideoFromBlob: function(a) { + var b = this; + return this.video = document.createElement("video"), this.video.controls = !1, this.video.setAttribute("autoplay", "autoplay"), this.video.addEventListener("loadeddata", function(a) { + b.updateTexture(a) + }, !0), this.video.src = window.URL.createObjectURL(a), this.video.canplay = !0, this + }, + createVideoFromURL: function(a, b) { + return void 0 === b && (b = !1), this.texture && (this.texture.valid = !1), this.video = document.createElement("video"), this.video.controls = !1, b && this.video.setAttribute("autoplay", "autoplay"), this.video.src = a, this.video.canplay = !0, this.video.load(), this.retry = this.retryLimit, this._retryID = window.setTimeout(this.checkVideoProgress.bind(this), this.retryInterval), this.key = a, this + }, + updateTexture: function(a, b, c) { + var d = !1; + void 0 !== b && null !== b || (b = this.video.videoWidth, d = !0), void 0 !== c && null !== c || (c = this.video.videoHeight), this.width = b, this.height = c, this.baseTexture.source !== this.video && (this.baseTexture.source = this.video), this.baseTexture.forceLoaded(b, c), this.texture.frame.resize(b, c), this.texture.width = b, this.texture.height = c, this.texture.valid = !0, this.snapshot && this.snapshot.resize(b, c), d && null !== this.key && (this.onChangeSource.dispatch(this, b, c), this._autoplay && (this.video.play(), this.onPlay.dispatch(this, this.loop, this.playbackRate))) + }, + complete: function() { + this.onComplete.dispatch(this) + }, + play: function(a, b) { + return void 0 === a && (a = !1), void 0 === b && (b = 1), this.game.sound.onMute && (this.game.sound.onMute.add(this.setMute, this), this.game.sound.onUnMute.add(this.unsetMute, this), this.game.sound.mute && this.setMute()), this.game.onPause.add(this.setPause, this), this.game.onResume.add(this.setResume, this), this._endCallback = this.complete.bind(this), this.video.addEventListener("ended", this._endCallback, !0), this.video.addEventListener("webkitendfullscreen", this._endCallback, !0), a ? this.video.loop = "loop" : this.video.loop = "", this.video.playbackRate = b, this.touchLocked ? this._pending = !0 : (this._pending = !1, null !== this.key && (4 !== this.video.readyState ? (this.retry = this.retryLimit, this._retryID = window.setTimeout(this.checkVideoProgress.bind(this), this.retryInterval)) : (this._playCallback = this.playHandler.bind(this), this.video.addEventListener("playing", this._playCallback, !0))), this.video.play(), this.onPlay.dispatch(this, a, b)), this + }, + playHandler: function() { + this.video.removeEventListener("playing", this._playCallback, !0), this.updateTexture() + }, + stop: function() { + return this.game.sound.onMute && (this.game.sound.onMute.remove(this.setMute, this), this.game.sound.onUnMute.remove(this.unsetMute, this)), this.game.onPause.remove(this.setPause, this), this.game.onResume.remove(this.setResume, this), this.isStreaming ? (this.video.mozSrcObject ? (this.video.mozSrcObject.stop(), this.video.src = null) : (this.video.src = "", this.videoStream.active ? this.videoStream.active = !1 : this.videoStream.getTracks ? this.videoStream.getTracks().forEach(function(a) { + a.stop() + }) : this.videoStream.stop()), this.videoStream = null, this.isStreaming = !1) : (this.video.removeEventListener("ended", this._endCallback, !0), this.video.removeEventListener("webkitendfullscreen", this._endCallback, !0), this.video.removeEventListener("playing", this._playCallback, !0), this.touchLocked ? this._pending = !1 : this.video.pause()), this + }, + add: function(a) { + if (Array.isArray(a)) + for (var b = 0; b < a.length; b++) a[b].loadTexture && a[b].loadTexture(this); + else a.loadTexture(this); + return this + }, + addToWorld: function(a, b, c, d, e, f) { + e = e || 1, f = f || 1; + var g = this.game.add.image(a, b, this); + return g.anchor.set(c, d), g.scale.set(e, f), g + }, + render: function() { + !this.disableTextureUpload && this.playing && this.baseTexture.dirty() + }, + setMute: function() { + this._muted || (this._muted = !0, this.video.muted = !0) + }, + unsetMute: function() { + this._muted && !this._codeMuted && (this._muted = !1, this.video.muted = !1) + }, + setPause: function() { + this._paused || this.touchLocked || (this._paused = !0, this.video.pause()) + }, + setResume: function() { + !this._paused || this._codePaused || this.touchLocked || (this._paused = !1, this.video.ended || this.video.play()) + }, + changeSource: function(a, b) { + return void 0 === b && (b = !0), this.texture.valid = !1, this.video.pause(), this.retry = this.retryLimit, this._retryID = window.setTimeout(this.checkVideoProgress.bind(this), this.retryInterval), this.video.src = a, this.video.load(), this._autoplay = b, b || (this.paused = !0), this + }, + checkVideoProgress: function() { + 4 === this.video.readyState ? this.updateTexture() : (this.retry--, this.retry > 0 ? this._retryID = window.setTimeout(this.checkVideoProgress.bind(this), this.retryInterval) : console.warn("Phaser.Video: Unable to start downloading video in time", this.isStreaming)) + }, + setTouchLock: function() { + this.game.input.touch.addTouchLockCallback(this.unlock, this), this.touchLocked = !0 + }, + unlock: function() { + if (this.touchLocked = !1, this.video.play(), this.onPlay.dispatch(this, this.loop, this.playbackRate), this.key) { + var a = this.game.cache.getVideo(this.key); + a && !a.isBlob && (a.locked = !1) + } + return !0 + }, + grab: function(a, b, c) { + return void 0 === a && (a = !1), void 0 === b && (b = 1), void 0 === c && (c = null), null === this.snapshot ? void console.warn("Video.grab cannot run because Phaser.BitmapData is unavailable") : (a && this.snapshot.cls(), this.snapshot.copy(this.video, 0, 0, this.width, this.height, 0, 0, this.width, this.height, 0, 0, 0, 1, 1, b, c), this.snapshot) + }, + removeVideoElement: function() { + if (this.video) { + for (this.video.parentNode && this.video.parentNode.removeChild(this.video); this.video.hasChildNodes();) this.video.removeChild(this.video.firstChild); + this.video.removeAttribute("autoplay"), this.video.removeAttribute("src"), this.video = null + } + }, + destroy: function() { + this.stop(), this.removeVideoElement(), this.touchLocked && this.game.input.touch.removeTouchLockCallback(this.unlock, this), this._retryID && window.clearTimeout(this._retryID) + } + }, Object.defineProperty(c.Video.prototype, "currentTime", { + get: function() { + return this.video ? this.video.currentTime : 0 + }, + set: function(a) { + this.video.currentTime = a + } + }), Object.defineProperty(c.Video.prototype, "duration", { + get: function() { + return this.video ? this.video.duration : 0 + } + }), Object.defineProperty(c.Video.prototype, "progress", { + get: function() { + return this.video ? this.video.currentTime / this.video.duration : 0 + } + }), Object.defineProperty(c.Video.prototype, "mute", { + get: function() { + return this._muted + }, + set: function(a) { + if (a = a || null) { + if (this._muted) return; + this._codeMuted = !0, this.setMute() + } else { + if (!this._muted) return; + this._codeMuted = !1, this.unsetMute() + } + } + }), Object.defineProperty(c.Video.prototype, "paused", { + get: function() { + return this._paused + }, + set: function(a) { + if (a = a || null, !this.touchLocked) + if (a) { + if (this._paused) return; + this._codePaused = !0, this.setPause() + } else { + if (!this._paused) return; + this._codePaused = !1, this.setResume() + } + } + }), Object.defineProperty(c.Video.prototype, "volume", { + get: function() { + return this.video ? this.video.volume : 1 + }, + set: function(a) { + a < 0 ? a = 0 : a > 1 && (a = 1), this.video && (this.video.volume = a) + } + }), Object.defineProperty(c.Video.prototype, "playbackRate", { + get: function() { + return this.video ? this.video.playbackRate : 1 + }, + set: function(a) { + this.video && (this.video.playbackRate = a) + } + }), Object.defineProperty(c.Video.prototype, "loop", { + get: function() { + return !!this.video && this.video.loop + }, + set: function(a) { + a && this.video ? this.video.loop = "loop" : this.video && (this.video.loop = "") + } + }), Object.defineProperty(c.Video.prototype, "playing", { + get: function() { + return !(this.video.paused && this.video.ended) + } + }), c.Video.prototype.constructor = c.Video, void 0 === PIXI.blendModes && (PIXI.blendModes = c.blendModes), void 0 === PIXI.scaleModes && (PIXI.scaleModes = c.scaleModes), void 0 === PIXI.Texture.emptyTexture && (PIXI.Texture.emptyTexture = new PIXI.Texture(new PIXI.BaseTexture)), void 0 === PIXI.DisplayObject._tempMatrix && (PIXI.DisplayObject._tempMatrix = new PIXI.Matrix), void 0 === PIXI.RenderTexture.tempMatrix && (PIXI.RenderTexture.tempMatrix = new PIXI.Matrix), PIXI.Graphics && void 0 === PIXI.Graphics.POLY && (PIXI.Graphics.POLY = c.POLYGON, PIXI.Graphics.RECT = c.RECTANGLE, PIXI.Graphics.CIRC = c.CIRCLE, PIXI.Graphics.ELIP = c.ELLIPSE, PIXI.Graphics.RREC = c.ROUNDEDRECTANGLE), PIXI.TextureSilentFail = !0, "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = c), exports.Phaser = c) : "undefined" != typeof define && define.amd ? define("Phaser", function() { + return b.Phaser = c + }()) : b.Phaser = c, c + }.call(this); \ No newline at end of file diff --git a/jellytruck/js/main.js b/jellytruck/js/main.js new file mode 100644 index 0000000000000000000000000000000000000000..8e434d5cf3f958b6a13a5c50e4f2ea713ddc9c79 --- /dev/null +++ b/jellytruck/js/main.js @@ -0,0 +1,21 @@ +"use strict"; +Array.prototype.clear = function () { + while (this.length) { + this.pop(); + } +}; +window.JellyTruck = { + // reference to the Phaser.Game instance + game: null, + disableWebAudio: true, + // main function + main: function(){ + this.game = new Phaser.Game(800,480, Phaser.CANVAS, document.body, window.JellyTruck.state.boot); + }, + // here we will store all states + state: {} +}; + +window.addEventListener('DOMContentLoaded', function(){ + window.JellyTruck.main(); +}, false); \ No newline at end of file diff --git a/jellytruck/js/physics.json b/jellytruck/js/physics.json new file mode 100644 index 0000000000000000000000000000000000000000..4275c04a2f7903e0512196aefff0686cd0ed5ad6 --- /dev/null +++ b/jellytruck/js/physics.json @@ -0,0 +1,30357 @@ +{ "height":60, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":60, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":false, + "width":60, + "x":0, + "y":0 + }, + { + "image":"Shape\/Truck_4.png", + "name":"Auto_Truck", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/BigBall.png", + "name":"BigBall", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/shape2_9.png", + "name":"Shape9", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy.png", + "name":"Cube3", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Wheel5.png", + "name":"Wheel3", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 4.png", + "name":"Shape1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 2.png", + "name":"Cube2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka.png", + "name":"Cube1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka_guma1 copy.png", + "name":"Rect1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_trojuholnik2.png", + "name":"Triangle1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_trojuholnik.png", + "name":"Triangle2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Wheel1_1.png.png", + "name":"Wheel1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Truck1.png", + "name":"Truck1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka_guma1.png", + "name":"Rect2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/upblade.png", + "name":"BladeUp", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Ball17.png", + "name":"Ball17", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/downBlade.png", + "name":"BladDown", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 9.png", + "name":"Shape2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 5.png", + "name":"Shape3", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 15.png", + "name":"Shape4", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 6.png", + "name":"Lift1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 7.png", + "name":"Rect3", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 8.png", + "name":"Rect4", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Truck2.png", + "name":"Truck2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Shape6.png", + "name":"Shape6", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Wheel2.png", + "name":"Wheel2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/cart.png", + "name":"cart", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 11.png", + "name":"Mill", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 12.png", + "name":"Rect5", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 13.png", + "name":"Switch", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka_guma1 copy 4.png", + "name":"Bridge2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka_guma1 copy 5.png", + "name":"Bridge3", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 14.png", + "name":"Bridge1", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Ball_4.png", + "name":"Ball4", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_kocka copy 17.png", + "name":"Shape5", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/cart_wheel.png", + "name":"CartWheel", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Shape7.png", + "name":"Pusher", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Bottle.png.png", + "name":"Bottle", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/menu_gum.png", + "name":"Menu_Rect", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Truck3.png", + "name":"Truck3", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Lift8.png.png", + "name":"Lift8", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/j_koleso copy 13.png", + "name":"Balloon", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Ball11.png", + "name":"Ball11", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Hammer_Left.png.png", + "name":"Hammer_Left", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Hammer_Right.png.png", + "name":"Hammer_Right", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/LiftR.png", + "name":"LiftR", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/LiftL.png", + "name":"LiftL", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/pusher2.png", + "name":"Pusher2", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "image":"Shape\/Rect6.png", + "name":"Rect6", + "opacity":1, + "type":"imagelayer", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Pusher2", + "objects":[ + { + "height":0, + "id":1547, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":145.333, + "y":53 + }, + { + "x":125.667, + "y":-21.3333 + }, + { + "x":60.3333, + "y":-45 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.6667, + "y":395 + }, + { + "height":0, + "id":1531, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-76.6667, + "y":212.667 + }, + { + "x":-16, + "y":168 + }, + { + "x":36, + "y":16.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":94, + "y":182 + }, + { + "height":0, + "id":1532, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54.6667, + "y":-13.3333 + }, + { + "x":68.6667, + "y":56.6667 + }, + { + "x":34, + "y":38.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":61.33, + "y":143.333 + }, + { + "height":0, + "id":1533, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-37.3333, + "y":90.6667 + }, + { + "x":17.3333, + "y":78.6667 + }, + { + "x":29.3333, + "y":44.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":98.67, + "y":52 + }, + { + "height":0, + "id":1541, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-44.375, + "y":-1.875 + }, + { + "x":-15.125, + "y":42.875 + }, + { + "x":-6.75, + "y":21.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":143.13, + "y":53.88 + }, + { + "height":0, + "id":1548, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-28.9091, + "y":-21.6364 + }, + { + "x":-36.3636, + "y":1.09091 + }, + { + "x":3.45455, + "y":26.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":172.364, + "y":75.8182 + }, + { + "height":0, + "id":1549, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-94.5, + "y":0.5 + }, + { + "x":-91.25, + "y":27.75 + }, + { + "x":-25.25, + "y":52.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":267, + "y":75 + }, + { + "height":0, + "id":1546, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-35.75, + "y":22.75 + }, + { + "x":-61, + "y":75.5 + }, + { + "x":-15.25, + "y":81 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":302.5, + "y":52.5 + }, + { + "height":0, + "id":1543, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39, + "y":1.5 + }, + { + "x":-54, + "y":82.75 + }, + { + "x":-50, + "y":174.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":341.25, + "y":51 + }, + { + "height":0, + "id":1545, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-33.25, + "y":-38 + }, + { + "x":-15.5, + "y":-70.25 + }, + { + "x":-3.5, + "y":-93.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":291.25, + "y":225.75 + }, + { + "height":0, + "id":1551, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-38.3333, + "y":-19.3333 + }, + { + "x":22.6667, + "y":-52.6667 + }, + { + "x":56.3333, + "y":-14.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":235.67, + "y":240 + }, + { + "height":0, + "id":1552, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-20, + "y":-74 + }, + { + "x":34.6667, + "y":-226.667 + }, + { + "x":72.6667, + "y":-207.333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":163.333, + "y":447.333 + }, + { + "height":127, + "id":1540, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.8, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":6, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,4,5,6,7,8,9,10,11" + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":92, + "x":157.5, + "y":19 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"BigBall", + "objects":[ + { + "height":0, + "id":1667, + "name":"", + "polygon":[ + { + "x":0.909091, + "y":0.636364 + }, + { + "x":65, + "y":20 + }, + { + "x":23, + "y":84 + }, + { + "x":-2, + "y":77 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":147, + "y":15 + }, + { + "height":0, + "id":1668, + "name":"", + "polygon":[ + { + "x":2, + "y":0.0909091 + }, + { + "x":46, + "y":51 + }, + { + "x":-19.5455, + "y":85 + }, + { + "x":-40.0909, + "y":64.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":210, + "y":35 + }, + { + "height":0, + "id":1669, + "name":"", + "polygon":[ + { + "x":1.90909, + "y":0 + }, + { + "x":16, + "y":62 + }, + { + "x":-58.7273, + "y":60.2727 + }, + { + "x":-63.3636, + "y":33.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":254, + "y":86 + }, + { + "height":0, + "id":1670, + "name":"", + "polygon":[ + { + "x":1, + "y":2 + }, + { + "x":-17.9091, + "y":64.5455 + }, + { + "x":-81.7273, + "y":26.0909 + }, + { + "x":-73.7273, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":269, + "y":146 + }, + { + "height":0, + "id":1671, + "name":"", + "polygon":[ + { + "x":1.18182, + "y":0.545455 + }, + { + "x":-47.2727, + "y":45.9091 + }, + { + "x":-83, + "y":-20 + }, + { + "x":-62.5455, + "y":-37.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":250, + "y":210 + }, + { + "height":0, + "id":1672, + "name":"", + "polygon":[ + { + "x":0.818182, + "y":1.90909 + }, + { + "x":-60.8182, + "y":16.0909 + }, + { + "x":-60, + "y":-60 + }, + { + "x":-35, + "y":-64 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":202, + "y":254 + }, + { + "height":0, + "id":1673, + "name":"", + "polygon":[ + { + "x":-1.81818, + "y":2.09091 + }, + { + "x":-67.9091, + "y":-15.7273 + }, + { + "x":-26, + "y":-80 + }, + { + "x":-1, + "y":-74 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":143, + "y":268 + }, + { + "height":0, + "id":1674, + "name":"", + "polygon":[ + { + "x":-1.81818, + "y":0 + }, + { + "x":-47.8182, + "y":-49.6364 + }, + { + "x":19.9091, + "y":-84.5455 + }, + { + "x":40, + "y":-64 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77, + "y":252 + }, + { + "height":0, + "id":1675, + "name":"", + "polygon":[ + { + "x":-3.72727, + "y":-0.636364 + }, + { + "x":-18.0909, + "y":-65.9091 + }, + { + "x":59, + "y":-61 + }, + { + "x":63.9091, + "y":-35.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":33, + "y":203 + }, + { + "height":0, + "id":1676, + "name":"", + "polygon":[ + { + "x":-2.90909, + "y":-0.909091 + }, + { + "x":15.9432, + "y":-62.3182 + }, + { + "x":82.5, + "y":-23 + }, + { + "x":74, + "y":4 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":18, + "y":138 + }, + { + "height":0, + "id":1677, + "name":"", + "polygon":[ + { + "x":-3.02273, + "y":-4.86364 + }, + { + "x":46.6364, + "y":-51.0909 + }, + { + "x":84.2273, + "y":16.8182 + }, + { + "x":63.6364, + "y":34.5909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":37, + "y":80.5 + }, + { + "height":0, + "id":1678, + "name":"", + "polygon":[ + { + "x":2.90909, + "y":-4.90909 + }, + { + "x":66.8636, + "y":-18.8182 + }, + { + "x":64.0909, + "y":57.4545 + }, + { + "x":40.1818, + "y":62.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":81, + "y":34.5 + }, + { + "height":41, + "id":1679, + "name":"", + "properties": + { + "angulardamp":0, + "arc":10, + "bounce":0, + "bullet":false, + "categorybit":32, + "density":0.3, + "fixed":false, + "friction":100, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":true, + "joint_motor_speed":50, + "joint_motor_torque":10, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"0,3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":45, + "x":120, + "y":123 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape9", + "objects":[ + { + "height":0, + "id":1564, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":67, + "y":0 + }, + { + "x":63.3333, + "y":15.6667 + }, + { + "x":22.3333, + "y":19.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6, + "y":7 + }, + { + "height":0, + "id":1565, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":16.3333, + "y":13 + }, + { + "x":16, + "y":25 + }, + { + "x":-3.33333, + "y":15 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":72.6667, + "y":7.66667 + }, + { + "height":0, + "id":1566, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":42.6667, + "y":0 + }, + { + "x":42.3333, + "y":12 + }, + { + "x":0.666667, + "y":12 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":88.3333, + "y":20.6667 + }, + { + "height":0, + "id":1567, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":49.3333, + "y":-0.333333 + }, + { + "x":49.3333, + "y":11.6667 + }, + { + "x":0, + "y":12 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":130.667, + "y":20.6667 + }, + { + "height":0, + "id":1568, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54.6667, + "y":0 + }, + { + "x":54, + "y":12 + }, + { + "x":0.333333, + "y":11.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":179.667, + "y":20.3333 + }, + { + "height":0, + "id":1569, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":14.6667, + "y":-15.6667 + }, + { + "x":20.3333, + "y":1 + }, + { + "x":1, + "y":11 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":233.333, + "y":21.3333 + }, + { + "height":0, + "id":1570, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":60, + "y":-0.333333 + }, + { + "x":39.6667, + "y":18 + }, + { + "x":6, + "y":16 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":247.667, + "y":6 + }, + { + "height":0, + "id":1571, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":60.6667 + }, + { + "x":-19.3333, + "y":42 + }, + { + "x":-18.6667, + "y":18 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":306.667, + "y":6 + }, + { + "height":0, + "id":1572, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-56.6667, + "y":1 + }, + { + "x":-51.6667, + "y":-18.6667 + }, + { + "x":-19.3333, + "y":-17.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":306, + "y":65.6667 + }, + { + "height":0, + "id":1573, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-17.3333, + "y":-12.6667 + }, + { + "x":-15, + "y":-25.6667 + }, + { + "x":4, + "y":-19 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":250.333, + "y":66.3333 + }, + { + "height":0, + "id":1574, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-53.3333, + "y":0.666667 + }, + { + "x":-55, + "y":-14 + }, + { + "x":1.33333, + "y":-12.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":234.333, + "y":53.3333 + }, + { + "height":0, + "id":1575, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-51, + "y":-0.333333 + }, + { + "x":-50.3333, + "y":-11.3333 + }, + { + "x":-2.33333, + "y":-13.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":182, + "y":53 + }, + { + "height":0, + "id":1576, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-42.6667, + "y":0.333333 + }, + { + "x":-42.6667, + "y":-10.3333 + }, + { + "x":-0.333333, + "y":-10.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":132, + "y":52 + }, + { + "height":0, + "id":1577, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-16.6667, + "y":15 + }, + { + "x":-22, + "y":-1.66667 + }, + { + "x":-0.666667, + "y":-10.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90, + "y":52 + }, + { + "height":0, + "id":1578, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-67.6667, + "y":1.33333 + }, + { + "x":-44.6667, + "y":-14 + }, + { + "x":-5.66667, + "y":-16 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":74, + "y":66.3333 + }, + { + "height":0, + "id":1579, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2, + "y":-60.6667 + }, + { + "x":21, + "y":-40.6667 + }, + { + "x":21.3333, + "y":-14.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":7.33333, + "y":67.3333 + }, + { + "height":11.3333, + "id":1580, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":32, + "density":0.8, + "fixed":false, + "friction":2, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":62, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"2,10,15,6", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":18.6667, + "x":150, + "y":30.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"LiftL", + "objects":[ + { + "height":0, + "id":1431, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-53.6667, + "y":0 + }, + { + "x":-53, + "y":28.3333 + }, + { + "x":0, + "y":28 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":186, + "y":63.6667 + }, + { + "height":0, + "id":1432, + "name":"", + "polygon":[ + { + "x":-0.625, + "y":-0.375 + }, + { + "x":-51.125, + "y":-0.166667 + }, + { + "x":-45.6667, + "y":27.6667 + }, + { + "x":-0.333333, + "y":28 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":133, + "y":64 + }, + { + "height":0, + "id":1433, + "name":"", + "polygon":[ + { + "x":-0.375, + "y":0 + }, + { + "x":-71.0568, + "y":-0.25 + }, + { + "x":-41, + "y":27.875 + }, + { + "x":5.125, + "y":27.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":82.375, + "y":64.125 + }, + { + "height":0, + "id":1434, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.545455, + "y":81.0909 + }, + { + "x":30, + "y":79.8182 + }, + { + "x":29.4545, + "y":27.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.8182, + "y":64.1818 + }, + { + "height":0, + "id":1435, + "name":"", + "polygon":[ + { + "x":-0.181818, + "y":0.181818 + }, + { + "x":-0.181818, + "y":80.5455 + }, + { + "x":30.1818, + "y":79.6364 + }, + { + "x":30.3636, + "y":-0.909091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.6364, + "y":145.091 + }, + { + "height":0, + "id":1436, + "name":"", + "polygon":[ + { + "x":-0.363636, + "y":0.363636 + }, + { + "x":-0.181818, + "y":68.3636 + }, + { + "x":29.8182, + "y":36.7273 + }, + { + "x":30.1818, + "y":-0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.6364, + "y":225.273 + }, + { + "height":0, + "id":1437, + "name":"", + "polygon":[ + { + "x":-0.363636, + "y":0.636364 + }, + { + "x":73.4545, + "y":0.363636 + }, + { + "x":76.9091, + "y":-31.0909 + }, + { + "x":29.8182, + "y":-31.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.6364, + "y":293.091 + }, + { + "height":0, + "id":1438, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":50.9091, + "y":0.181818 + }, + { + "x":46.9091, + "y":-31.2727 + }, + { + "x":3.63636, + "y":-31.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.9091, + "y":293.273 + }, + { + "height":0, + "id":1439, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":50.9091, + "y":0.181818 + }, + { + "x":50.5455, + "y":-31.2727 + }, + { + "x":-3.63636, + "y":-31.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":135.455, + "y":293.273 + }, + { + "height":0, + "id":1440, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.181818, + "y":-31.0909 + }, + { + "x":-4.54545, + "y":-25.8182 + }, + { + "x":-3.81818, + "y":-4.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":186.182, + "y":293.091 + }, + { + "height":0, + "id":1441, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-54.1818, + "y":0 + }, + { + "x":-50.3636, + "y":31.2727 + }, + { + "x":0.363636, + "y":31.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":185.818, + "y":262 + }, + { + "height":0, + "id":1442, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-43.4545, + "y":-0.272727 + }, + { + "x":-47, + "y":31.1818 + }, + { + "x":3.63636, + "y":31.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":132, + "y":262.273 + }, + { + "height":0, + "id":1443, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-47.3636, + "y":0 + }, + { + "x":-77.3636, + "y":31.5455 + }, + { + "x":-3.90909, + "y":31.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":88.8182, + "y":262 + }, + { + "height":0, + "id":1444, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.272727, + "y":-37.3636 + }, + { + "x":-30.3636, + "y":-36.6364 + }, + { + "x":-30.2727, + "y":31.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41.5455, + "y":262.273 + }, + { + "height":0, + "id":1445, + "name":"", + "polygon":[ + { + "x":0.272727, + "y":-0.545455 + }, + { + "x":0.181818, + "y":-81.3636 + }, + { + "x":-30.3636, + "y":-80.2727 + }, + { + "x":-30.3636, + "y":0.272727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41.6364, + "y":225.455 + }, + { + "height":0, + "id":1446, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.454545, + "y":-52.5455 + }, + { + "x":-29.9091, + "y":-80.1818 + }, + { + "x":-30.3636, + "y":0.818182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41.6364, + "y":144.364 + }, + { + "height":0, + "id":1447, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":46.4545, + "y":-0.0909091 + }, + { + "x":41.0909, + "y":-27.9091 + }, + { + "x":-29.2727, + "y":-27.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41, + "y":91.9091 + }, + { + "height":0, + "id":1448, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":53.6364, + "y":0.181818 + }, + { + "x":53.5455, + "y":-27.7273 + }, + { + "x":-0.181818, + "y":-28 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":132.455, + "y":91.6364 + }, + { + "height":0, + "id":1449, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.181818, + "y":-27.9091 + }, + { + "x":-4.09091, + "y":-21.5455 + }, + { + "x":-3.63636, + "y":-4.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":186.091, + "y":91.7273 + }, + { + "ellipse":true, + "height":3, + "id":1451, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":18 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":153.75, + "y":76 + }, + { + "ellipse":true, + "height":2.75, + "id":1452, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":17 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.75, + "x":104, + "y":77.25 + }, + { + "ellipse":true, + "height":2.75, + "id":1453, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":16 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.75, + "x":53.25, + "y":77.25 + }, + { + "ellipse":true, + "height":2.5, + "id":1454, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":15 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.5, + "x":22.25, + "y":109.75 + }, + { + "ellipse":true, + "height":3, + "id":1455, + "name":"", + "properties": + { + "bodyA":4, + "bodyB":14 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3.25, + "x":22.25, + "y":182 + }, + { + "ellipse":true, + "height":2.5, + "id":1456, + "name":"", + "properties": + { + "bodyA":5, + "bodyB":13 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.5, + "x":23, + "y":249 + }, + { + "ellipse":true, + "height":2.5, + "id":1457, + "name":"", + "properties": + { + "bodyA":6, + "bodyB":12 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.75, + "x":52.5, + "y":278 + }, + { + "ellipse":true, + "height":3, + "id":1458, + "name":"", + "properties": + { + "bodyA":7, + "bodyB":11 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":102.75, + "y":277.25 + }, + { + "ellipse":true, + "height":3.25, + "id":1459, + "name":"", + "properties": + { + "bodyA":8, + "bodyB":10 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.75, + "x":156, + "y":277.5 + }, + { + "height":239, + "id":1460, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":true, + "friction":0.3, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"0,4,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":26, + "x":97, + "y":4 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"LiftR", + "objects":[ + { + "height":0, + "id":1401, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":50.5, + "y":0 + }, + { + "x":54, + "y":31.5 + }, + { + "x":1, + "y":32 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":23.5, + "y":48 + }, + { + "height":0, + "id":1402, + "name":"", + "polygon":[ + { + "x":0, + "y":-0.375 + }, + { + "x":50.125, + "y":-0.375 + }, + { + "x":47.5, + "y":31.25 + }, + { + "x":4, + "y":31 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":73.75, + "y":48.5 + }, + { + "height":0, + "id":1403, + "name":"", + "polygon":[ + { + "x":-0.25, + "y":-0.375 + }, + { + "x":74.5, + "y":-0.5 + }, + { + "x":44, + "y":31.25 + }, + { + "x":-2.875, + "y":31.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":124.25, + "y":48.5 + }, + { + "height":0, + "id":1404, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":67.4545 + }, + { + "x":-30, + "y":68.1818 + }, + { + "x":-29.8182, + "y":31.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":198.182, + "y":48.1818 + }, + { + "height":0, + "id":1405, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":80.3636 + }, + { + "x":-29.8182, + "y":81.8182 + }, + { + "x":-29.8182, + "y":0.909091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":198, + "y":115.455 + }, + { + "height":0, + "id":1406, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.727273 + }, + { + "x":0.181818, + "y":82 + }, + { + "x":-29.4545, + "y":52.7273 + }, + { + "x":-29.6364, + "y":1.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":198, + "y":195.455 + }, + { + "height":0, + "id":1407, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-69.8182, + "y":0.181818 + }, + { + "x":-75.2727, + "y":-29.2727 + }, + { + "x":-29.2727, + "y":-29.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":198, + "y":277.455 + }, + { + "height":0, + "id":1408, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-51.0909, + "y":0 + }, + { + "x":-51.6364, + "y":-29.2727 + }, + { + "x":-5.63636, + "y":-29.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.364, + "y":277.455 + }, + { + "height":0, + "id":1409, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-54.3636, + "y":0.181818 + }, + { + "x":-54, + "y":-29.2727 + }, + { + "x":-1.09091, + "y":-29.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.8182, + "y":277.273 + }, + { + "height":0, + "id":1410, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":-28.6667 + }, + { + "x":3.66667, + "y":-23.3333 + }, + { + "x":4.66667, + "y":-4 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":23.3333, + "y":277 + }, + { + "height":0, + "id":1411, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":52.3333, + "y":0 + }, + { + "x":54, + "y":29 + }, + { + "x":-0.666667, + "y":29.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":24, + "y":248 + }, + { + "height":0, + "id":1412, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":46.3333, + "y":-0.333333 + }, + { + "x":52, + "y":28.6667 + }, + { + "x":1, + "y":28.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":76.3333, + "y":248.667 + }, + { + "height":0, + "id":1413, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":46.3333, + "y":-0.333333 + }, + { + "x":75.6667, + "y":29 + }, + { + "x":6.33333, + "y":29.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":122.333, + "y":248.667 + }, + { + "height":0, + "id":1414, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.333333, + "y":-51.6667 + }, + { + "x":29.3333, + "y":-52.3333 + }, + { + "x":29.3333, + "y":29 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":169, + "y":248.667 + }, + { + "height":0, + "id":1415, + "name":"", + "polygon":[ + { + "x":-0.333333, + "y":-1 + }, + { + "x":-1, + "y":-81.6667 + }, + { + "x":28.6667, + "y":-82.6667 + }, + { + "x":29.3333, + "y":-2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":169, + "y":198 + }, + { + "height":0, + "id":1416, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.333333, + "y":-37.3333 + }, + { + "x":30, + "y":-69 + }, + { + "x":29.6667, + "y":-1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":168.667, + "y":117 + }, + { + "height":0, + "id":1417, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-47.3333, + "y":-0.333333 + }, + { + "x":-45, + "y":-31.6667 + }, + { + "x":30.3333, + "y":-32 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":168.667, + "y":80 + }, + { + "height":0, + "id":1418, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-44.3333, + "y":0 + }, + { + "x":-48.3333, + "y":-31.3333 + }, + { + "x":2, + "y":-31.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":122.333, + "y":79.6667 + }, + { + "height":0, + "id":1419, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-54, + "y":0.666667 + }, + { + "x":-54.6667, + "y":-31 + }, + { + "x":-5, + "y":-31.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":78.6667, + "y":79.3333 + }, + { + "height":0, + "id":1420, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1.33333, + "y":-31.6667 + }, + { + "x":4, + "y":-24 + }, + { + "x":4.66667, + "y":-6 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":25, + "y":79.3333 + }, + { + "ellipse":true, + "height":5.33333, + "id":1421, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":18 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.66667, + "x":50, + "y":63.3333 + }, + { + "ellipse":true, + "height":4.66667, + "id":1422, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":17 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.66667, + "x":95.3333, + "y":62 + }, + { + "ellipse":true, + "height":4, + "id":1423, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":16 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4, + "x":148, + "y":63.3333 + }, + { + "ellipse":true, + "height":4, + "id":1424, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":15 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4, + "x":182, + "y":90.6667 + }, + { + "ellipse":true, + "height":5.33333, + "id":1425, + "name":"", + "properties": + { + "bodyA":4, + "bodyB":14 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5.33333, + "x":179.333, + "y":154.667 + }, + { + "ellipse":true, + "height":6, + "id":1426, + "name":"", + "properties": + { + "bodyA":5, + "bodyB":13 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5.33333, + "x":181.333, + "y":224.667 + }, + { + "ellipse":true, + "height":5.33333, + "id":1427, + "name":"", + "properties": + { + "bodyA":6, + "bodyB":12 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.66667, + "x":150.667, + "y":262.667 + }, + { + "ellipse":true, + "height":4.66667, + "id":1428, + "name":"", + "properties": + { + "bodyA":7, + "bodyB":11 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.66667, + "x":98.6667, + "y":262.667 + }, + { + "ellipse":true, + "height":5.33333, + "id":1429, + "name":"", + "properties": + { + "bodyA":8, + "bodyB":10 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5.33333, + "x":44, + "y":262 + }, + { + "height":239.333, + "id":1430, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":true, + "friction":0.3, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"0,4,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":22.6667, + "x":83.3333, + "y":5.33333 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ball17", + "objects":[ + { + "height":0, + "id":1608, + "name":"", + "polygon":[ + { + "x":-1.25, + "y":-1 + }, + { + "x":57.5, + "y":16.5 + }, + { + "x":29.75, + "y":57.25 + }, + { + "x":-3.25, + "y":48 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":136.637, + "y":15.5451 + }, + { + "height":0, + "id":1609, + "name":"", + "polygon":[ + { + "x":4.375, + "y":-1.625 + }, + { + "x":45.75, + "y":45.75 + }, + { + "x":2.75, + "y":67.5 + }, + { + "x":-23.375, + "y":39.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":189.637, + "y":33.5451 + }, + { + "height":0, + "id":1610, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.25, + "y":56.75 + }, + { + "x":-36, + "y":55.75 + }, + { + "x":-43, + "y":21.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":235.387, + "y":79.0451 + }, + { + "height":0, + "id":1611, + "name":"", + "polygon":[ + { + "x":0.375, + "y":0.25 + }, + { + "x":-15.9432, + "y":56.8409 + }, + { + "x":-56.5341, + "y":33.2159 + }, + { + "x":-46.7273, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":246.273, + "y":135.545 + }, + { + "height":0, + "id":1612, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-44, + "y":41.875 + }, + { + "x":-68, + "y":-0.909091 + }, + { + "x":-40.4205, + "y":-23.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":230.092, + "y":192.454 + }, + { + "height":0, + "id":1613, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-56.5455, + "y":11.8182 + }, + { + "x":-57.4545, + "y":-36.5455 + }, + { + "x":-23.8182, + "y":-42.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":185.91, + "y":234.09 + }, + { + "height":0, + "id":1614, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-60.2273, + "y":-15.4091 + }, + { + "x":-31.8182, + "y":-56.7273 + }, + { + "x":-0.727273, + "y":-48.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":129.182, + "y":245.727 + }, + { + "height":0, + "id":1615, + "name":"", + "polygon":[ + { + "x":0.375, + "y":-0.25 + }, + { + "x":-41.4545, + "y":-45.4545 + }, + { + "x":2.36364, + "y":-68 + }, + { + "x":28.6023, + "y":-41.4432 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":68.6367, + "y":230.454 + }, + { + "height":0, + "id":1616, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-11.4545, + "y":-60 + }, + { + "x":37.6364, + "y":-56.5455 + }, + { + "x":43.6364, + "y":-22.3636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":27.1822, + "y":184.818 + }, + { + "height":0, + "id":1617, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":17.8182, + "y":-53.4545 + }, + { + "x":58.9091, + "y":-30.1818 + }, + { + "x":49.0909, + "y":3.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":15.7276, + "y":124.636 + }, + { + "height":0, + "id":1618, + "name":"", + "polygon":[ + { + "x":0, + "y":0.25 + }, + { + "x":42, + "y":-42.0568 + }, + { + "x":68.1591, + "y":-0.522727 + }, + { + "x":40.9091, + "y":23.4545 + }, + { + "x":40.9091, + "y":23.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":33.7276, + "y":70.8178 + }, + { + "height":0, + "id":1619, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":59.75, + "y":-14.125 + }, + { + "x":57.625, + "y":34.875 + }, + { + "x":26.125, + "y":41.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":75.7617, + "y":28.6701 + }, + { + "height":38.1818, + "id":1620, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":10, + "bounce":0, + "bullet":false, + "categorybit":16, + "density":0.2, + "fixed":false, + "friction":0.2, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"1,4,9,12", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":43.2727, + "x":107.364, + "y":109.909 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Hammer_Right", + "objects":[ + { + "height":0, + "id":1222, + "name":"", + "polygon":[ + { + "x":-2.27273, + "y":0 + }, + { + "x":52, + "y":0 + }, + { + "x":31.3333, + "y":19 + }, + { + "x":17.3333, + "y":20.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":95.6667, + "y":12 + }, + { + "height":0, + "id":1223, + "name":"", + "polygon":[ + { + "x":0.818182, + "y":0.181818 + }, + { + "x":0.666667, + "y":208 + }, + { + "x":-17.6667, + "y":231 + }, + { + "x":-18.6364, + "y":18.1515 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":146.667, + "y":12 + }, + { + "height":0, + "id":1224, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":69.9167, + "y":0.791667 + }, + { + "x":25, + "y":25 + }, + { + "x":-18, + "y":22.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":146.667, + "y":220 + }, + { + "height":0, + "id":1225, + "name":"", + "polygon":[ + { + "x":-0.25, + "y":-0.75 + }, + { + "x":-0.666667, + "y":55.6667 + }, + { + "x":-45, + "y":56.6667 + }, + { + "x":-44.5, + "y":23.0833 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":216.667, + "y":221.667 + }, + { + "height":0, + "id":1226, + "name":"", + "polygon":[ + { + "x":0.125, + "y":0.5 + }, + { + "x":-0.375, + "y":59.625 + }, + { + "x":-43.25, + "y":40.25 + }, + { + "x":-44, + "y":1.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":215.75, + "y":276.75 + }, + { + "height":0, + "id":1227, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-65, + "y":0 + }, + { + "x":-68.375, + "y":-24.125 + }, + { + "x":-43.125, + "y":-19.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":215.25, + "y":336.125 + }, + { + "height":0, + "id":1228, + "name":"", + "polygon":[ + { + "x":-0.545455, + "y":0.363636 + }, + { + "x":-99.0909, + "y":0.363636 + }, + { + "x":-73.6364, + "y":-21.0909 + }, + { + "x":-3.81818, + "y":-23.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":150.727, + "y":335.818 + }, + { + "height":0, + "id":1229, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-21.0909, + "y":-51.4545 + }, + { + "x":10, + "y":-61.9091 + }, + { + "x":25, + "y":-21.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51.9091, + "y":336 + }, + { + "height":0, + "id":1230, + "name":"", + "polygon":[ + { + "x":-0.272727, + "y":-0.363636 + }, + { + "x":-20.7273, + "y":-59.9091 + }, + { + "x":24.9091, + "y":-35.6364 + }, + { + "x":30.7273, + "y":-10.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":31.1818, + "y":284.818 + }, + { + "height":0, + "id":1231, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":82.2727, + "y":-0.181818 + }, + { + "x":96.2727, + "y":20.7273 + }, + { + "x":45.2727, + "y":23.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.8182, + "y":225.364 + }, + { + "height":0, + "id":1233, + "name":"", + "polygon":[ + { + "x":0.363636, + "y":-0.0909091 + }, + { + "x":0.636364, + "y":-213.364 + }, + { + "x":19.9091, + "y":-193.273 + }, + { + "x":14.1818, + "y":20.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":92.9091, + "y":225.455 + }, + { + "height":33.3333, + "id":1234, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":true, + "categorybit":8, + "density":1.2, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2, 6, 7", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":33.3333, + "x":106.667, + "y":20 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Hammer_Left", + "objects":[ + { + "height":0, + "id":1206, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":56.5, + "y":0.5 + }, + { + "x":34.5, + "y":19 + }, + { + "x":21.75, + "y":19.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":69.5, + "y":12 + }, + { + "height":0, + "id":1207, + "name":"", + "polygon":[ + { + "x":1, + "y":0.181818 + }, + { + "x":-0.75, + "y":73 + }, + { + "x":-21.75, + "y":72.75 + }, + { + "x":-21.1591, + "y":18.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":125, + "y":12.25 + }, + { + "height":0, + "id":1208, + "name":"", + "polygon":[ + { + "x":0.304348, + "y":0.304348 + }, + { + "x":-0.727273, + "y":70.3636 + }, + { + "x":-22.7273, + "y":71.3636 + }, + { + "x":-20.6719, + "y":0.0434783 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.909, + "y":84.9091 + }, + { + "height":0, + "id":1209, + "name":"", + "polygon":[ + { + "x":0.25, + "y":0 + }, + { + "x":-0.5, + "y":68.75 + }, + { + "x":-8.375, + "y":90.625 + }, + { + "x":-21.75, + "y":1.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":122.875, + "y":155.125 + }, + { + "height":0, + "id":1210, + "name":"", + "polygon":[ + { + "x":0.75, + "y":0.5 + }, + { + "x":100.5, + "y":-1.25 + }, + { + "x":50.5, + "y":21 + }, + { + "x":-7, + "y":22.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":121.75, + "y":223.25 + }, + { + "height":0, + "id":1211, + "name":"", + "polygon":[ + { + "x":0.375, + "y":0.625 + }, + { + "x":-20.5, + "y":55.25 + }, + { + "x":-62, + "y":56.5 + }, + { + "x":-49, + "y":22.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":221.5, + "y":221.5 + }, + { + "height":0, + "id":1212, + "name":"", + "polygon":[ + { + "x":0.272727, + "y":0.727273 + }, + { + "x":-21.75, + "y":64.5 + }, + { + "x":-51.75, + "y":41 + }, + { + "x":-41.0909, + "y":2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":200.75, + "y":276 + }, + { + "height":0, + "id":1213, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-83.6364, + "y":0.181818 + }, + { + "x":-73.0909, + "y":-31.8182 + }, + { + "x":-30.1818, + "y":-23.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":178.909, + "y":340.182 + }, + { + "height":0, + "id":1214, + "name":"", + "polygon":[ + { + "x":-0.181818, + "y":0.363636 + }, + { + "x":-82.5455, + "y":0.181818 + }, + { + "x":-42.3636, + "y":-31.4545 + }, + { + "x":10, + "y":-31.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":95.6364, + "y":339.818 + }, + { + "height":0, + "id":1215, + "name":"", + "polygon":[ + { + "x":-0.181818, + "y":-0.363636 + }, + { + "x":-0.363636, + "y":-55.0909 + }, + { + "x":38.1818, + "y":-56.3636 + }, + { + "x":39.2727, + "y":-31.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":13.8182, + "y":340 + }, + { + "height":0, + "id":1216, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.727273, + "y":-61.0909 + }, + { + "x":38.9091, + "y":-34.7273 + }, + { + "x":38.1818, + "y":-1.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":13.8182, + "y":285.273 + }, + { + "height":0, + "id":1217, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":-0.545455 + }, + { + "x":56.1818, + "y":-1.45455 + }, + { + "x":70.5455, + "y":20.5455 + }, + { + "x":39.4545, + "y":25.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":13.2727, + "y":224.909 + }, + { + "height":0, + "id":1218, + "name":"", + "polygon":[ + { + "x":0.727273, + "y":-0.181818 + }, + { + "x":0.727273, + "y":-65.6364 + }, + { + "x":18.1818, + "y":-59.6364 + }, + { + "x":14.7273, + "y":21.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":69.0909, + "y":223.818 + }, + { + "height":0, + "id":1219, + "name":"", + "polygon":[ + { + "x":1.42109e-14, + "y":-0.727273 + }, + { + "x":-0.545455, + "y":-64.7273 + }, + { + "x":21.6364, + "y":-71.6364 + }, + { + "x":17.2727, + "y":5.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":70.1818, + "y":158.909 + }, + { + "height":0, + "id":1220, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.363636, + "y":-82.7273 + }, + { + "x":21.2727, + "y":-63.4545 + }, + { + "x":21.8182, + "y":-7.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":69.8182, + "y":94.5455 + }, + { + "height":28, + "id":1221, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":true, + "categorybit":8, + "density":1.8, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2, 6, 7", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":28, + "x":86.3333, + "y":23 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Bottle_11", + "objects":[ + { + "height":0, + "id":924, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":7.75, + "y":-6.25 + }, + { + "x":13, + "y":10.75 + }, + { + "x":8.5, + "y":12.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":60.25, + "y":13.5 + }, + { + "height":0, + "id":925, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":10, + "y":-2.5 + }, + { + "x":9.25, + "y":14.75 + }, + { + "x":5.25, + "y":16.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":67.75, + "y":7.75 + }, + { + "height":0, + "id":926, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":12.5, + "y":2.25 + }, + { + "x":5.5, + "y":19 + }, + { + "x":-0.5, + "y":16.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.25, + "y":6 + }, + { + "height":0, + "id":927, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":10, + "y":7.25 + }, + { + "x":-2.25, + "y":21 + }, + { + "x":-6.25, + "y":16.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":89.25, + "y":8 + }, + { + "height":0, + "id":928, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":7, + "y":14.75 + }, + { + "x":-9, + "y":20.5 + }, + { + "x":-12.25, + "y":13.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":99.5, + "y":15.75 + }, + { + "height":0, + "id":929, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.25, + "y":17.5 + }, + { + "x":-18, + "y":13.25 + }, + { + "x":-15.5, + "y":5.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":106.5, + "y":30.25 + }, + { + "height":0, + "id":930, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.75, + "y":20.75 + }, + { + "x":-22.8409, + "y":20.75 + }, + { + "x":-17.5, + "y":-4 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":106.25, + "y":47.75 + }, + { + "height":0, + "id":931, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.75, + "y":23 + }, + { + "x":-16.5, + "y":24 + }, + { + "x":-15, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":98.25, + "y":68.25 + }, + { + "height":0, + "id":932, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3.25, + "y":14 + }, + { + "x":-11.6364, + "y":19.0909 + }, + { + "x":-12.75, + "y":1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":94.5, + "y":91 + }, + { + "height":0, + "id":933, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":5, + "y":10.25 + }, + { + "x":-7.75, + "y":17.25 + }, + { + "x":-14.5, + "y":5.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":97.5, + "y":105 + }, + { + "height":0, + "id":934, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":13, + "y":21.5 + }, + { + "x":-6.5, + "y":30 + }, + { + "x":-13, + "y":7.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":102.5, + "y":114.75 + }, + { + "height":0, + "id":935, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":9.25, + "y":21.5 + }, + { + "x":-18.5, + "y":26 + }, + { + "x":-18, + "y":8.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":114.75, + "y":136 + }, + { + "height":0, + "id":937, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3.75, + "y":15.25 + }, + { + "x":-26.5, + "y":19.25 + }, + { + "x":-26.75, + "y":4.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123, + "y":157.25 + }, + { + "height":0, + "id":938, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.5, + "y":16 + }, + { + "x":-26.75, + "y":15.5 + }, + { + "x":-30, + "y":3.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":126.5, + "y":172.5 + }, + { + "height":0, + "id":939, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1.75, + "y":21.25 + }, + { + "x":-30.25, + "y":18.5 + }, + { + "x":-28.25, + "y":-0.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128, + "y":188 + }, + { + "height":0, + "id":940, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-5, + "y":16.5 + }, + { + "x":-28.75, + "y":9.5 + }, + { + "x":-27.25, + "y":-2.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":125.75, + "y":209 + }, + { + "height":0, + "id":941, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.25, + "y":14.25 + }, + { + "x":-26, + "y":5 + }, + { + "x":-23.5, + "y":-7.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":120.5, + "y":225.5 + }, + { + "height":0, + "id":942, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-16.5, + "y":9.5 + }, + { + "x":-28, + "y":-3 + }, + { + "x":-18.75, + "y":-8.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":113.75, + "y":239.5 + }, + { + "height":0, + "id":943, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-19.5, + "y":2 + }, + { + "x":-21.5, + "y":-13.75 + }, + { + "x":-11.25, + "y":-13 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":97, + "y":248.5 + }, + { + "height":0, + "id":944, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-22.25, + "y":-1.25 + }, + { + "x":-9, + "y":-15.5 + }, + { + "x":-2, + "y":-15.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":78, + "y":250 + }, + { + "height":0, + "id":945, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.75, + "y":-4.25 + }, + { + "x":2.5, + "y":-18.5 + }, + { + "x":12.5, + "y":-14 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":56.5, + "y":248.25 + }, + { + "height":0, + "id":946, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-11.75, + "y":-17.5 + }, + { + "x":9.75, + "y":-24.5 + }, + { + "x":13, + "y":-14.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":46.25, + "y":243.75 + }, + { + "height":0, + "id":947, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-6, + "y":-19.25 + }, + { + "x":18.5, + "y":-24 + }, + { + "x":21.25, + "y":-6.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":35, + "y":226.25 + }, + { + "height":0, + "id":948, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1.5, + "y":-19.25 + }, + { + "x":23.5, + "y":-21.5 + }, + { + "x":23.75, + "y":-4.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.75, + "y":207.25 + }, + { + "height":0, + "id":949, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5, + "y":-19.25 + }, + { + "x":27.25, + "y":-19 + }, + { + "x":25, + "y":-3.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":28.5, + "y":188.75 + }, + { + "height":0, + "id":950, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.5, + "y":-16.25 + }, + { + "x":30.2955, + "y":-8.38636 + }, + { + "x":27.25, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":28.75, + "y":169.5 + }, + { + "height":0, + "id":951, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6.5, + "y":-17.5 + }, + { + "x":31.0909, + "y":-6.63636 + }, + { + "x":26.1136, + "y":7.11364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":33.25, + "y":153.75 + }, + { + "height":0, + "id":952, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":14.25, + "y":-21 + }, + { + "x":31, + "y":-13.5 + }, + { + "x":24.5227, + "y":10.6591 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":39.5, + "y":136.5 + }, + { + "height":0, + "id":953, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":7, + "y":-11.5 + }, + { + "x":20.25, + "y":-7 + }, + { + "x":17.5, + "y":6.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":53.25, + "y":116.5 + }, + { + "height":0, + "id":954, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.5, + "y":-14 + }, + { + "x":14.7727, + "y":-13.6818 + }, + { + "x":12.75, + "y":4.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":60.75, + "y":105 + }, + { + "height":0, + "id":955, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5, + "y":-12 + }, + { + "x":13.9545, + "y":-13 + }, + { + "x":13.75, + "y":-0.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":62, + "y":92 + }, + { + "height":0, + "id":956, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.45455, + "y":-11.3182 + }, + { + "x":10.4091, + "y":-13.25 + }, + { + "x":12.5909, + "y":-1.43182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":63, + "y":80.25 + }, + { + "height":0, + "id":957, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-5.75, + "y":-14.25 + }, + { + "x":12.0227, + "y":-15.7955 + }, + { + "x":14.5, + "y":-2.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":59, + "y":69 + }, + { + "height":0, + "id":958, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.75, + "y":-15 + }, + { + "x":14.25, + "y":-14.25 + }, + { + "x":17.3864, + "y":-2.04545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":53.5, + "y":55 + }, + { + "height":0, + "id":959, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1, + "y":-14.5 + }, + { + "x":16, + "y":-8 + }, + { + "x":16.5, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51.5, + "y":40.25 + }, + { + "height":0, + "id":960, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":7.5, + "y":-12.25 + }, + { + "x":16.75, + "y":0.5 + }, + { + "x":14.75, + "y":6.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.5, + "y":25.75 + }, + { + "height":24.6667, + "id":962, + "name":"", + "properties": + { + "angulardamp":0.2, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,4,5,15,16,17,18,19,20,33,34", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":14, + "x":72, + "y":124 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Bottle", + "objects":[ + { + "height":0, + "id":1379, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":22.1818, + "y":11.0909 + }, + { + "x":9.45455, + "y":24 + }, + { + "x":-0.545455, + "y":16.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.8182, + "y":5.09091 + }, + { + "height":0, + "id":1380, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8, + "y":25.6364 + }, + { + "x":-10.7273, + "y":25.0909 + }, + { + "x":-12.3636, + "y":13.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":99.6364, + "y":16.1818 + }, + { + "height":0, + "id":1381, + "name":"", + "polygon":[ + { + "x":-0.181818, + "y":0.363636 + }, + { + "x":-8.54545, + "y":27.0909 + }, + { + "x":-25.6364, + "y":27.0909 + }, + { + "x":-18.5455, + "y":-0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":107.455, + "y":41.4545 + }, + { + "height":0, + "id":1382, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.18182, + "y":23.8182 + }, + { + "x":-16.7273, + "y":23.8182 + }, + { + "x":-16.7273, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":98.7273, + "y":68.1818 + }, + { + "height":0, + "id":1383, + "name":"", + "polygon":[ + { + "x":0.4375, + "y":0.3125 + }, + { + "x":8.54545, + "y":23.2727 + }, + { + "x":-4, + "y":30.3636 + }, + { + "x":-12.1818, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":94.1818, + "y":91.6364 + }, + { + "height":0, + "id":1384, + "name":"", + "polygon":[ + { + "x":0.232955, + "y":0.375 + }, + { + "x":22.1818, + "y":42.9091 + }, + { + "x":-6.18182, + "y":47.4545 + }, + { + "x":-12, + "y":7.40341 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":102.364, + "y":114.545 + }, + { + "height":0, + "id":1385, + "name":"", + "polygon":[ + { + "x":0.727273, + "y":0.545455 + }, + { + "x":3.81818, + "y":30.9091 + }, + { + "x":-22.9091, + "y":30.1818 + }, + { + "x":-27.6364, + "y":4.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.818, + "y":156.909 + }, + { + "height":0, + "id":1388, + "name":"", + "polygon":[ + { + "x":0.5, + "y":0.125 + }, + { + "x":-13.392, + "y":52.2386 + }, + { + "x":-26.3636, + "y":35.8182 + }, + { + "x":-26.3636, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":127.273, + "y":187.636 + }, + { + "height":0, + "id":1389, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-12.9034, + "y":9.01705 + }, + { + "x":-18.358, + "y":-8.13068 + }, + { + "x":-12.9091, + "y":-16.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":113.818, + "y":239.818 + }, + { + "height":0, + "id":1390, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-45.6364, + "y":0 + }, + { + "x":-37.6364, + "y":-17.4545 + }, + { + "x":-5.45455, + "y":-17.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":100.909, + "y":248.909 + }, + { + "height":0, + "id":1391, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-15.4545, + "y":-11.6364 + }, + { + "x":1.63636, + "y":-27.6364 + }, + { + "x":7.63636, + "y":-17.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":55.4545, + "y":248.727 + }, + { + "height":0, + "id":1392, + "name":"", + "polygon":[ + { + "x":-0.625, + "y":-0.25 + }, + { + "x":-12.5455, + "y":-49.2727 + }, + { + "x":12.1818, + "y":-51.2727 + }, + { + "x":16.3636, + "y":-16.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":40.7273, + "y":237.273 + }, + { + "height":0, + "id":1393, + "name":"", + "polygon":[ + { + "x":-0.25, + "y":-0.5625 + }, + { + "x":4.72727, + "y":-35.2727 + }, + { + "x":34, + "y":-25.2727 + }, + { + "x":24.3636, + "y":-2.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":28.5455, + "y":188.545 + }, + { + "height":0, + "id":1394, + "name":"", + "polygon":[ + { + "x":-0.5, + "y":-0.75 + }, + { + "x":20.5455, + "y":-38.1818 + }, + { + "x":35.8182, + "y":-31.0909 + }, + { + "x":28.9091, + "y":9.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":33.8182, + "y":154 + }, + { + "height":0, + "id":1395, + "name":"", + "polygon":[ + { + "x":-0.414773, + "y":-0.965909 + }, + { + "x":7.81818, + "y":-25.6364 + }, + { + "x":21.4545, + "y":-25.6364 + }, + { + "x":14.9091, + "y":6.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":54.7273, + "y":116.727 + }, + { + "height":0, + "id":1396, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.72727, + "y":-22.3636 + }, + { + "x":11.6364, + "y":-23.2727 + }, + { + "x":13.2727, + "y":-0.545455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":62.9091, + "y":91.6364 + }, + { + "height":0, + "id":1397, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.63636, + "y":-29.2727 + }, + { + "x":9.63636, + "y":-29.2727 + }, + { + "x":15.8182, + "y":-1.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":58.7273, + "y":69.8182 + }, + { + "height":0, + "id":1398, + "name":"", + "polygon":[ + { + "x":-0.545455, + "y":-0.727273 + }, + { + "x":9.27273, + "y":-27.2727 + }, + { + "x":17.4545, + "y":-15.8182 + }, + { + "x":16.5455, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51.6364, + "y":41.2727 + }, + { + "height":0, + "id":1399, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":17.0909, + "y":-9.09091 + }, + { + "x":16.3636, + "y":7.45455 + }, + { + "x":8.54545, + "y":11.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":60.7273, + "y":14.3636 + }, + { + "height":22, + "id":1400, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":5.5, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.5, + "fixed":false, + "friction":0.5, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":2, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"2,4,6,10,12,14,16,18", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":10, + "x":74, + "y":127 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Bottle14", + "objects":[ + { + "height":0, + "id":1474, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":22.1818, + "y":11.0909 + }, + { + "x":9.45455, + "y":24 + }, + { + "x":-0.545455, + "y":16.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.8182, + "y":5.09091 + }, + { + "height":0, + "id":1475, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8, + "y":25.6364 + }, + { + "x":-10.7273, + "y":25.0909 + }, + { + "x":-12.3636, + "y":13.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":99.6364, + "y":16.1818 + }, + { + "height":0, + "id":1476, + "name":"", + "polygon":[ + { + "x":-0.181818, + "y":0.363636 + }, + { + "x":-8.54545, + "y":27.0909 + }, + { + "x":-25.6364, + "y":27.0909 + }, + { + "x":-18.5455, + "y":-0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":107.455, + "y":41.4545 + }, + { + "height":0, + "id":1477, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.18182, + "y":23.8182 + }, + { + "x":-16.7273, + "y":23.8182 + }, + { + "x":-16.7273, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":98.7273, + "y":68.1818 + }, + { + "height":0, + "id":1478, + "name":"", + "polygon":[ + { + "x":0.4375, + "y":0.3125 + }, + { + "x":8.54545, + "y":23.2727 + }, + { + "x":-4, + "y":30.3636 + }, + { + "x":-12.1818, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":94.1818, + "y":91.6364 + }, + { + "height":0, + "id":1479, + "name":"", + "polygon":[ + { + "x":0.232955, + "y":0.375 + }, + { + "x":22.1818, + "y":42.9091 + }, + { + "x":-6.18182, + "y":47.4545 + }, + { + "x":-12, + "y":7.40341 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":102.364, + "y":114.545 + }, + { + "height":0, + "id":1480, + "name":"", + "polygon":[ + { + "x":0.727273, + "y":0.545455 + }, + { + "x":3.81818, + "y":30.9091 + }, + { + "x":-22.9091, + "y":30.1818 + }, + { + "x":-27.6364, + "y":4.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.818, + "y":156.909 + }, + { + "height":0, + "id":1481, + "name":"", + "polygon":[ + { + "x":0.5, + "y":0.125 + }, + { + "x":-13.392, + "y":52.2386 + }, + { + "x":-26.3636, + "y":35.8182 + }, + { + "x":-26.3636, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":127.273, + "y":187.636 + }, + { + "height":0, + "id":1482, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-12.9034, + "y":9.01705 + }, + { + "x":-18.358, + "y":-8.13068 + }, + { + "x":-12.9091, + "y":-16.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":113.818, + "y":239.818 + }, + { + "height":0, + "id":1483, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-45.6364, + "y":0 + }, + { + "x":-37.6364, + "y":-17.4545 + }, + { + "x":-5.45455, + "y":-17.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":100.909, + "y":248.909 + }, + { + "height":0, + "id":1484, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-15.4545, + "y":-11.6364 + }, + { + "x":1.63636, + "y":-27.6364 + }, + { + "x":7.63636, + "y":-17.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":55.4545, + "y":248.727 + }, + { + "height":0, + "id":1485, + "name":"", + "polygon":[ + { + "x":-0.625, + "y":-0.25 + }, + { + "x":-12.5455, + "y":-49.2727 + }, + { + "x":12.1818, + "y":-51.2727 + }, + { + "x":16.3636, + "y":-16.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":40.7273, + "y":237.273 + }, + { + "height":0, + "id":1486, + "name":"", + "polygon":[ + { + "x":-0.25, + "y":-0.5625 + }, + { + "x":4.72727, + "y":-35.2727 + }, + { + "x":34, + "y":-25.2727 + }, + { + "x":24.3636, + "y":-2.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":28.5455, + "y":188.545 + }, + { + "height":0, + "id":1487, + "name":"", + "polygon":[ + { + "x":-0.5, + "y":-0.75 + }, + { + "x":20.5455, + "y":-38.1818 + }, + { + "x":35.8182, + "y":-31.0909 + }, + { + "x":28.9091, + "y":9.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":33.8182, + "y":154 + }, + { + "height":0, + "id":1488, + "name":"", + "polygon":[ + { + "x":-0.414773, + "y":-0.965909 + }, + { + "x":7.81818, + "y":-25.6364 + }, + { + "x":21.4545, + "y":-25.6364 + }, + { + "x":14.9091, + "y":6.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":54.7273, + "y":116.727 + }, + { + "height":0, + "id":1489, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.72727, + "y":-22.3636 + }, + { + "x":11.6364, + "y":-23.2727 + }, + { + "x":13.2727, + "y":-0.545455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":62.9091, + "y":91.6364 + }, + { + "height":0, + "id":1490, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.63636, + "y":-29.2727 + }, + { + "x":9.63636, + "y":-29.2727 + }, + { + "x":15.8182, + "y":-1.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":58.7273, + "y":69.8182 + }, + { + "height":0, + "id":1491, + "name":"", + "polygon":[ + { + "x":-0.545455, + "y":-0.727273 + }, + { + "x":9.27273, + "y":-27.2727 + }, + { + "x":17.4545, + "y":-15.8182 + }, + { + "x":16.5455, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51.6364, + "y":41.2727 + }, + { + "height":0, + "id":1492, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":17.0909, + "y":-9.09091 + }, + { + "x":16.3636, + "y":7.45455 + }, + { + "x":8.54545, + "y":11.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":60.7273, + "y":14.3636 + }, + { + "height":22, + "id":1493, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":5.5, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":1, + "fixed":false, + "friction":0.2, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.25, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"2,4,6,10,12,14,16,18", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":10, + "x":74, + "y":127 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Bottle12", + "objects":[ + { + "height":0, + "id":1494, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":22.1818, + "y":11.0909 + }, + { + "x":9.45455, + "y":24 + }, + { + "x":-0.545455, + "y":16.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.8182, + "y":5.09091 + }, + { + "height":0, + "id":1495, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8, + "y":25.6364 + }, + { + "x":-10.7273, + "y":25.0909 + }, + { + "x":-12.3636, + "y":13.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":99.6364, + "y":16.1818 + }, + { + "height":0, + "id":1496, + "name":"", + "polygon":[ + { + "x":-0.181818, + "y":0.363636 + }, + { + "x":-8.54545, + "y":27.0909 + }, + { + "x":-25.6364, + "y":27.0909 + }, + { + "x":-18.5455, + "y":-0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":107.455, + "y":41.4545 + }, + { + "height":0, + "id":1497, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.18182, + "y":23.8182 + }, + { + "x":-16.7273, + "y":23.8182 + }, + { + "x":-16.7273, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":98.7273, + "y":68.1818 + }, + { + "height":0, + "id":1498, + "name":"", + "polygon":[ + { + "x":0.4375, + "y":0.3125 + }, + { + "x":8.54545, + "y":23.2727 + }, + { + "x":-4, + "y":30.3636 + }, + { + "x":-12.1818, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":94.1818, + "y":91.6364 + }, + { + "height":0, + "id":1499, + "name":"", + "polygon":[ + { + "x":0.232955, + "y":0.375 + }, + { + "x":22.1818, + "y":42.9091 + }, + { + "x":-6.18182, + "y":47.4545 + }, + { + "x":-12, + "y":7.40341 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":102.364, + "y":114.545 + }, + { + "height":0, + "id":1500, + "name":"", + "polygon":[ + { + "x":0.727273, + "y":0.545455 + }, + { + "x":3.81818, + "y":30.9091 + }, + { + "x":-22.9091, + "y":30.1818 + }, + { + "x":-27.6364, + "y":4.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.818, + "y":156.909 + }, + { + "height":0, + "id":1501, + "name":"", + "polygon":[ + { + "x":0.5, + "y":0.125 + }, + { + "x":-13.392, + "y":52.2386 + }, + { + "x":-26.3636, + "y":35.8182 + }, + { + "x":-26.3636, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":127.273, + "y":187.636 + }, + { + "height":0, + "id":1502, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-12.9034, + "y":9.01705 + }, + { + "x":-18.358, + "y":-8.13068 + }, + { + "x":-12.9091, + "y":-16.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":113.818, + "y":239.818 + }, + { + "height":0, + "id":1503, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-45.6364, + "y":0 + }, + { + "x":-37.6364, + "y":-17.4545 + }, + { + "x":-5.45455, + "y":-17.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":100.909, + "y":248.909 + }, + { + "height":0, + "id":1504, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-15.4545, + "y":-11.6364 + }, + { + "x":1.63636, + "y":-27.6364 + }, + { + "x":7.63636, + "y":-17.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":55.4545, + "y":248.727 + }, + { + "height":0, + "id":1505, + "name":"", + "polygon":[ + { + "x":-0.625, + "y":-0.25 + }, + { + "x":-12.5455, + "y":-49.2727 + }, + { + "x":12.1818, + "y":-51.2727 + }, + { + "x":16.3636, + "y":-16.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":40.7273, + "y":237.273 + }, + { + "height":0, + "id":1506, + "name":"", + "polygon":[ + { + "x":-0.25, + "y":-0.5625 + }, + { + "x":4.72727, + "y":-35.2727 + }, + { + "x":34, + "y":-25.2727 + }, + { + "x":24.3636, + "y":-2.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":28.5455, + "y":188.545 + }, + { + "height":0, + "id":1507, + "name":"", + "polygon":[ + { + "x":-0.5, + "y":-0.75 + }, + { + "x":20.5455, + "y":-38.1818 + }, + { + "x":35.8182, + "y":-31.0909 + }, + { + "x":28.9091, + "y":9.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":33.8182, + "y":154 + }, + { + "height":0, + "id":1508, + "name":"", + "polygon":[ + { + "x":-0.414773, + "y":-0.965909 + }, + { + "x":7.81818, + "y":-25.6364 + }, + { + "x":21.4545, + "y":-25.6364 + }, + { + "x":14.9091, + "y":6.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":54.7273, + "y":116.727 + }, + { + "height":0, + "id":1509, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.72727, + "y":-22.3636 + }, + { + "x":11.6364, + "y":-23.2727 + }, + { + "x":13.2727, + "y":-0.545455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":62.9091, + "y":91.6364 + }, + { + "height":0, + "id":1510, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.63636, + "y":-29.2727 + }, + { + "x":9.63636, + "y":-29.2727 + }, + { + "x":15.8182, + "y":-1.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":58.7273, + "y":69.8182 + }, + { + "height":0, + "id":1511, + "name":"", + "polygon":[ + { + "x":-0.545455, + "y":-0.727273 + }, + { + "x":9.27273, + "y":-27.2727 + }, + { + "x":17.4545, + "y":-15.8182 + }, + { + "x":16.5455, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51.6364, + "y":41.2727 + }, + { + "height":0, + "id":1512, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":17.0909, + "y":-9.09091 + }, + { + "x":16.3636, + "y":7.45455 + }, + { + "x":8.54545, + "y":11.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":60.7273, + "y":14.3636 + }, + { + "height":22, + "id":1513, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":5.5, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":1, + "fixed":false, + "friction":0.1, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":1.5, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"2,4,6,10,12,14,16,18", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":10, + "x":74, + "y":127 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ball11", + "objects":[ + { + "height":0, + "id":1164, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":64.5, + "y":19.5 + }, + { + "x":43, + "y":48.75 + }, + { + "x":-2.5, + "y":34.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":148.75, + "y":16 + }, + { + "height":0, + "id":1165, + "name":"", + "polygon":[ + { + "x":0.636364, + "y":0.363636 + }, + { + "x":45, + "y":51 + }, + { + "x":17.25, + "y":66.75 + }, + { + "x":-20.25, + "y":29 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":212.5, + "y":35.25 + }, + { + "height":0, + "id":1166, + "name":"", + "polygon":[ + { + "x":0.545455, + "y":0.0909091 + }, + { + "x":14.3636, + "y":63.2727 + }, + { + "x":-18.9091, + "y":62.7273 + }, + { + "x":-27.2727, + "y":15.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":256.909, + "y":86.1818 + }, + { + "height":0, + "id":1167, + "name":"", + "polygon":[ + { + "x":0.0909091, + "y":0.272727 + }, + { + "x":-18.5, + "y":62.25 + }, + { + "x":-47.8523, + "y":46.8409 + }, + { + "x":-33, + "y":-0.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":271.125, + "y":149.125 + }, + { + "height":0, + "id":1168, + "name":"", + "polygon":[ + { + "x":0.545455, + "y":0.545455 + }, + { + "x":-48.5, + "y":46.25 + }, + { + "x":-65, + "y":17.75 + }, + { + "x":-28.7273, + "y":-14.7045 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":252, + "y":210.75 + }, + { + "height":0, + "id":1169, + "name":"", + "polygon":[ + { + "x":0, + "y":0.545455 + }, + { + "x":-61.8182, + "y":14.7273 + }, + { + "x":-63.0909, + "y":-20.3636 + }, + { + "x":-16.5455, + "y":-28.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":203.455, + "y":256.545 + }, + { + "height":0, + "id":1170, + "name":"", + "polygon":[ + { + "x":-0.0909091, + "y":0.181818 + }, + { + "x":-67.2727, + "y":-17.2727 + }, + { + "x":-45.6364, + "y":-47.0909 + }, + { + "x":-1.45455, + "y":-34.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":141.818, + "y":270.909 + }, + { + "height":0, + "id":1171, + "name":"", + "polygon":[ + { + "x":-0.727273, + "y":0.363636 + }, + { + "x":-46.5, + "y":-50.25 + }, + { + "x":-14.25, + "y":-66.5 + }, + { + "x":20.5, + "y":-29 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":75.25, + "y":253.25 + }, + { + "height":0, + "id":1172, + "name":"", + "polygon":[ + { + "x":-0.454545, + "y":-0.363636 + }, + { + "x":-12.75, + "y":-65 + }, + { + "x":22.5, + "y":-62.5 + }, + { + "x":31.4318, + "y":-16.4773 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.5, + "y":203.25 + }, + { + "height":0, + "id":1173, + "name":"", + "polygon":[ + { + "x":-0.125, + "y":-0.375 + }, + { + "x":19.125, + "y":-60.25 + }, + { + "x":48, + "y":-44.75 + }, + { + "x":34.875, + "y":2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.125, + "y":138.75 + }, + { + "height":0, + "id":1174, + "name":"", + "polygon":[ + { + "x":-0.125, + "y":-0.5 + }, + { + "x":46.25, + "y":-46.5 + }, + { + "x":67.375, + "y":-18.5 + }, + { + "x":28.5, + "y":15 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":36.375, + "y":79 + }, + { + "height":0, + "id":1175, + "name":"", + "polygon":[ + { + "x":0.25, + "y":-0.125 + }, + { + "x":66, + "y":-16.75 + }, + { + "x":63.75, + "y":18 + }, + { + "x":21.25, + "y":27.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":82.5, + "y":32.75 + }, + { + "height":47, + "id":1205, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0, + "bullet":false, + "categorybit":32, + "density":0.5, + "fixed":false, + "friction":50, + "gravity":0.5, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":62, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,4,5,6,7,8,9,10", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":51, + "x":113, + "y":118 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Balloon", + "objects":[ + { + "height":24.6667, + "id":1123, + "name":"", + "properties": + { + "angulardamp":0, + "arc":5, + "bounce":0, + "bullet":false, + "categorybit":32, + "density":0.5, + "fixed":false, + "friction":0.5, + "gravity":0, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":2, + "maskbit":62, + "object_type":6, + "second":0, + "sensor":false, + "spojene":"1,3,9,13,15,19", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":29, + "x":66.3334, + "y":158 + }, + { + "height":0, + "id":1365, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":40.25, + "y":10.5 + }, + { + "x":18, + "y":44.25 + }, + { + "x":-0.5, + "y":38.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":85.75, + "y":11 + }, + { + "height":0, + "id":1366, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":28.75, + "y":30.75 + }, + { + "x":-5, + "y":49.5 + }, + { + "x":-21.25, + "y":32.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":125.25, + "y":22 + }, + { + "height":0, + "id":1368, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1, + "y":39 + }, + { + "x":-30, + "y":39.25 + }, + { + "x":-33.75, + "y":19.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":154, + "y":52.5 + }, + { + "height":0, + "id":1369, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-11.25, + "y":38 + }, + { + "x":-35.25, + "y":21 + }, + { + "x":-28.5, + "y":0.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":152.75, + "y":91 + }, + { + "height":0, + "id":1370, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-23.75, + "y":32.5 + }, + { + "x":-39.25, + "y":-3 + }, + { + "x":-24, + "y":-16.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":141.25, + "y":128.5 + }, + { + "height":0, + "id":1371, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-35.5, + "y":18.75 + }, + { + "x":-35.75, + "y":-17.25 + }, + { + "x":-15.25, + "y":-35 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":117.833, + "y":160.583 + }, + { + "height":0, + "id":1372, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-33.5, + "y":-15.75 + }, + { + "x":-19.25, + "y":-54.25 + }, + { + "x":-0.5, + "y":-35.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":82.25, + "y":178.25 + }, + { + "height":0, + "id":1373, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27, + "y":-38 + }, + { + "x":-1, + "y":-53.5 + }, + { + "x":13.5, + "y":-37.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":49.25, + "y":162 + }, + { + "height":0, + "id":1374, + "name":"", + "polygon":[ + { + "x":-0.25, + "y":-0.5 + }, + { + "x":-14.25, + "y":-37 + }, + { + "x":21.25, + "y":-36 + }, + { + "x":25.25, + "y":-15.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":22.75, + "y":124.25 + }, + { + "height":0, + "id":1375, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.75, + "y":-39.25 + }, + { + "x":41, + "y":-19.75 + }, + { + "x":35, + "y":0.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":87.5 + }, + { + "height":0, + "id":1376, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.75, + "y":-30.25 + }, + { + "x":47.5, + "y":4.5 + }, + { + "x":32, + "y":18.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":18, + "y":49.5 + }, + { + "height":0, + "id":1377, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":40, + "y":-9 + }, + { + "x":39.5, + "y":29.5 + }, + { + "x":19.75, + "y":34 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.75, + "y":20 + }, + { + "height":19, + "id":1514, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":5, + "bounce":0, + "bullet":false, + "categorybit":8, + "density":0.2, + "fixed":true, + "friction":0.5, + "gravity":0, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,3,9,13,15,19", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"center", + "visible":true, + "width":19, + "x":74.5, + "y":82.8333 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"BladeUp", + "objects":[ + { + "height":0, + "id":878, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":207.333, + "y":1.66667 + }, + { + "x":204.333, + "y":41.6667 + }, + { + "x":33.6667, + "y":32.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":13.3333, + "y":12.3333 + }, + { + "height":0, + "id":879, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":204.333, + "y":-3 + }, + { + "x":157.667, + "y":41.3333 + }, + { + "x":-2.33333, + "y":39.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":220, + "y":14.3333 + }, + { + "height":0, + "id":880, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.33333, + "y":101.333 + }, + { + "x":-32, + "y":97.3333 + }, + { + "x":-46.3333, + "y":43.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":424, + "y":11.6667 + }, + { + "height":0, + "id":881, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":10.3333, + "y":117.667 + }, + { + "x":-12.3333, + "y":102.333 + }, + { + "x":-36, + "y":-4 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":428, + "y":112.667 + }, + { + "height":0, + "id":882, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-65, + "y":66.3333 + }, + { + "x":-63.6667, + "y":37.3333 + }, + { + "x":-22, + "y":-14.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":438, + "y":230 + }, + { + "height":0, + "id":883, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-78.6667, + "y":-74.6667 + }, + { + "x":-77, + "y":-105.333 + }, + { + "x":1.33333, + "y":-28.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":373, + "y":296 + }, + { + "height":0, + "id":884, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-76, + "y":79 + }, + { + "x":-69.6667, + "y":52.3333 + }, + { + "x":1, + "y":-30.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":295, + "y":221.667 + }, + { + "height":0, + "id":885, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-64.6667, + "y":-73.3333 + }, + { + "x":-58.6667, + "y":-101.333 + }, + { + "x":6, + "y":-26.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":219.333, + "y":300.667 + }, + { + "height":0, + "id":886, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-64, + "y":79 + }, + { + "x":-63.6667, + "y":52 + }, + { + "x":6.33333, + "y":-28 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":154.667, + "y":227 + }, + { + "height":0, + "id":887, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-70.3333, + "y":-69.6667 + }, + { + "x":-57.3333, + "y":-94 + }, + { + "x":0, + "y":-27.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":91, + "y":305.667 + }, + { + "height":0, + "id":888, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10, + "y":-130.667 + }, + { + "x":24.3333, + "y":-127 + }, + { + "x":12.3333, + "y":-24.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":21.3333, + "y":236.333 + }, + { + "height":0, + "id":889, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.33333, + "y":-94 + }, + { + "x":35.3333, + "y":-62 + }, + { + "x":34, + "y":3 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.6667, + "y":106.667 + }, + { + "height":34, + "id":890, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.8, + "fixed":true, + "friction":0.2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,7,11,12", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":343, + "x":53, + "y":175 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Pusher", + "objects":[ + { + "height":0, + "id":904, + "name":"", + "polygon":[ + { + "x":-0.75, + "y":4.5 + }, + { + "x":-154.5, + "y":4.5 + }, + { + "x":-114.25, + "y":-59.75 + }, + { + "x":-45.75, + "y":-61 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":224.25, + "y":438.75 + }, + { + "height":0, + "id":905, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7, + "y":-226.5 + }, + { + "x":34, + "y":-223.25 + }, + { + "x":40, + "y":-64 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":70, + "y":443.25 + }, + { + "height":0, + "id":906, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-43.5, + "y":-24.75 + }, + { + "x":2.5, + "y":-56.25 + }, + { + "x":41, + "y":3 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":63.25, + "y":217 + }, + { + "height":0, + "id":908, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2.5, + "y":-125.25 + }, + { + "x":43.75, + "y":-67.5 + }, + { + "x":45.5, + "y":-31.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.25, + "y":192.25 + }, + { + "height":0, + "id":909, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":43.5, + "y":0 + }, + { + "x":46, + "y":34.5 + }, + { + "x":45.75, + "y":57 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":18, + "y":67.75 + }, + { + "height":0, + "id":910, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":29, + "y":16.75 + }, + { + "x":49.25, + "y":44.5 + }, + { + "x":3, + "y":34.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":61.25, + "y":68.25 + }, + { + "height":0, + "id":911, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":94.25, + "y":-0.5 + }, + { + "x":91, + "y":27.25 + }, + { + "x":20, + "y":27 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.5, + "y":85.5 + }, + { + "height":0, + "id":912, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":33.75, + "y":-23.75 + }, + { + "x":41.25, + "y":16.25 + }, + { + "x":-2.25, + "y":27.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":184.25, + "y":85.5 + }, + { + "height":0, + "id":913, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":41.5, + "y":2 + }, + { + "x":5.5, + "y":64.75 + }, + { + "x":7.75, + "y":39.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":217.75, + "y":62.25 + }, + { + "height":0, + "id":914, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3.5, + "y":121 + }, + { + "x":-39.25, + "y":98.5 + }, + { + "x":-35.25, + "y":61.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":258.75, + "y":64.5 + }, + { + "height":0, + "id":915, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-44.75, + "y":34.75 + }, + { + "x":-87.75, + "y":30 + }, + { + "x":-42, + "y":-21.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":261.75, + "y":184.75 + }, + { + "height":0, + "id":916, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6.75, + "y":223.75 + }, + { + "x":-38, + "y":158.5 + }, + { + "x":-42.25, + "y":-4.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":216.75, + "y":219.25 + }, + { + "height":169.333, + "id":918, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.8, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,7,11,12", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":66.6667, + "x":104, + "y":-6.66667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"BladeDown", + "objects":[ + { + "height":0, + "id":891, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":204.5, + "y":-2.5 + }, + { + "x":207.25, + "y":-42.5 + }, + { + "x":46.75, + "y":-43.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":14.5, + "y":227.5 + }, + { + "height":0, + "id":892, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":207.5, + "y":2 + }, + { + "x":174, + "y":-30.5 + }, + { + "x":2.75, + "y":-39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":218.75, + "y":224.5 + }, + { + "height":0, + "id":893, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3, + "y":-92.5 + }, + { + "x":-23, + "y":-88 + }, + { + "x":-33, + "y":-31.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":425.75, + "y":225.75 + }, + { + "height":0, + "id":894, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.5, + "y":-114.75 + }, + { + "x":-10.75, + "y":-69.75 + }, + { + "x":-26, + "y":4 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":428.5, + "y":133.75 + }, + { + "height":0, + "id":895, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-65.25, + "y":65 + }, + { + "x":-70.75, + "y":89 + }, + { + "x":-15, + "y":44.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":432.75, + "y":19 + }, + { + "height":0, + "id":896, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-83.5, + "y":-73 + }, + { + "x":-77.75, + "y":-48.5 + }, + { + "x":-5.25, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":367.5, + "y":84 + }, + { + "height":0, + "id":897, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-75.5, + "y":77.25 + }, + { + "x":-68.75, + "y":100 + }, + { + "x":5.25, + "y":23 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":284.5, + "y":12 + }, + { + "height":0, + "id":898, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-65.25, + "y":-72 + }, + { + "x":-61.5, + "y":-39.25 + }, + { + "x":6.5, + "y":23 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":209.75, + "y":89.25 + }, + { + "height":0, + "id":899, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-62, + "y":83.75 + }, + { + "x":-61.25, + "y":108.5 + }, + { + "x":3.25, + "y":32 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":144.75, + "y":17.75 + }, + { + "height":0, + "id":900, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-70.5, + "y":-73.5 + }, + { + "x":-54.25, + "y":-32.5 + }, + { + "x":0, + "y":25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":83.25, + "y":101.25 + }, + { + "height":0, + "id":901, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2, + "y":97.5 + }, + { + "x":33.75, + "y":101.25 + }, + { + "x":15.75, + "y":40.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":13.25, + "y":28.5 + }, + { + "height":0, + "id":902, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2.75, + "y":102 + }, + { + "x":49.5, + "y":58.25 + }, + { + "x":35, + "y":3.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.75, + "y":125.5 + }, + { + "height":35, + "id":903, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.8, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,7,11,12", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":382, + "x":31, + "y":116 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ball4", + "objects":[ + { + "height":0, + "id":610, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39, + "y":12 + }, + { + "x":13.25, + "y":50.25 + }, + { + "x":-2.25, + "y":46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.25, + "y":9.5 + }, + { + "height":0, + "id":611, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.5, + "y":30 + }, + { + "x":-12.75, + "y":51.5 + }, + { + "x":-25.25, + "y":38.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.75, + "y":21.75 + }, + { + "height":0, + "id":612, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.75, + "y":39 + }, + { + "x":-36.75, + "y":37.75 + }, + { + "x":-39.75, + "y":21.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":155.75, + "y":51.5 + }, + { + "height":0, + "id":613, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.75, + "y":38.25 + }, + { + "x":-50, + "y":14.75 + }, + { + "x":-45, + "y":-1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":164.25, + "y":90.25 + }, + { + "height":0, + "id":614, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-30, + "y":28 + }, + { + "x":-52.25, + "y":-12.25 + }, + { + "x":-39, + "y":-23 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":153.5, + "y":128.25 + }, + { + "height":0, + "id":615, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":9.75 + }, + { + "x":-38, + "y":-36.75 + }, + { + "x":-22, + "y":-40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.5, + "y":155.75 + }, + { + "height":0, + "id":616, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":-11.25 + }, + { + "x":-13.25, + "y":-50.75 + }, + { + "x":1.5, + "y":-46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.5, + "y":165.5 + }, + { + "height":0, + "id":617, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-28.25, + "y":-30.75 + }, + { + "x":13.5, + "y":-52 + }, + { + "x":25.75, + "y":-39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.5, + "y":154.25 + }, + { + "height":0, + "id":618, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-9.25, + "y":-39.5 + }, + { + "x":38, + "y":-37.25 + }, + { + "x":41.5, + "y":-21.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.75, + "y":123.5 + }, + { + "height":0, + "id":619, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.5, + "y":-39 + }, + { + "x":51.25, + "y":-14.5 + }, + { + "x":47.5, + "y":1.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":84.75 + }, + { + "height":0, + "id":621, + "name":"", + "polygon":[ + { + "x":0.75, + "y":-0.5 + }, + { + "x":30, + "y":-27.5 + }, + { + "x":53.25, + "y":12.5 + }, + { + "x":40, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.25, + "y":46.5 + }, + { + "height":0, + "id":622, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39.75, + "y":-10 + }, + { + "x":38, + "y":36.25 + }, + { + "x":23.5, + "y":39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":50.25, + "y":19.5 + }, + { + "height":24.6667, + "id":623, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":5.5, + "bounce":0.1, + "bullet":false, + "categorybit":32, + "density":0.5, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":25, + "x":73.3333, + "y":74.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ball19", + "objects":[ + { + "height":0, + "id":1461, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39, + "y":12 + }, + { + "x":13.25, + "y":50.25 + }, + { + "x":-2.25, + "y":46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.25, + "y":9.5 + }, + { + "height":0, + "id":1462, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.5, + "y":30 + }, + { + "x":-12.75, + "y":51.5 + }, + { + "x":-25.25, + "y":38.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.75, + "y":21.75 + }, + { + "height":0, + "id":1463, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.75, + "y":39 + }, + { + "x":-36.75, + "y":37.75 + }, + { + "x":-39.75, + "y":21.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":155.75, + "y":51.5 + }, + { + "height":0, + "id":1464, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.75, + "y":38.25 + }, + { + "x":-50, + "y":14.75 + }, + { + "x":-45, + "y":-1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":164.25, + "y":90.25 + }, + { + "height":0, + "id":1465, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-30, + "y":28 + }, + { + "x":-52.25, + "y":-12.25 + }, + { + "x":-39, + "y":-23 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":153.5, + "y":128.25 + }, + { + "height":0, + "id":1466, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":9.75 + }, + { + "x":-38, + "y":-36.75 + }, + { + "x":-22, + "y":-40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.5, + "y":155.75 + }, + { + "height":0, + "id":1467, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":-11.25 + }, + { + "x":-13.25, + "y":-50.75 + }, + { + "x":1.5, + "y":-46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.5, + "y":165.5 + }, + { + "height":0, + "id":1468, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-28.25, + "y":-30.75 + }, + { + "x":13.5, + "y":-52 + }, + { + "x":25.75, + "y":-39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.5, + "y":154.25 + }, + { + "height":0, + "id":1469, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-9.25, + "y":-39.5 + }, + { + "x":38, + "y":-37.25 + }, + { + "x":41.5, + "y":-21.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.75, + "y":123.5 + }, + { + "height":0, + "id":1470, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.5, + "y":-39 + }, + { + "x":51.25, + "y":-14.5 + }, + { + "x":47.5, + "y":1.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":84.75 + }, + { + "height":0, + "id":1471, + "name":"", + "polygon":[ + { + "x":0.75, + "y":-0.5 + }, + { + "x":30, + "y":-27.5 + }, + { + "x":53.25, + "y":12.5 + }, + { + "x":40, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.25, + "y":46.5 + }, + { + "height":0, + "id":1472, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39.75, + "y":-10 + }, + { + "x":38, + "y":36.25 + }, + { + "x":23.5, + "y":39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":50.25, + "y":19.5 + }, + { + "height":24.6667, + "id":1473, + "name":"", + "properties": + { + "angulardamp":1, + "arc":5.5, + "bounce":0, + "bullet":false, + "categorybit":32, + "density":0.3, + "fixed":false, + "friction":0.02, + "gravity":1.05, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":1, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":25, + "x":73.3333, + "y":74.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ball14", + "objects":[ + { + "height":0, + "id":1289, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39, + "y":12 + }, + { + "x":13.25, + "y":50.25 + }, + { + "x":-2.25, + "y":46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.25, + "y":9.5 + }, + { + "height":0, + "id":1290, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.5, + "y":30 + }, + { + "x":-12.75, + "y":51.5 + }, + { + "x":-25.25, + "y":38.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.75, + "y":21.75 + }, + { + "height":0, + "id":1291, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.75, + "y":39 + }, + { + "x":-36.75, + "y":37.75 + }, + { + "x":-39.75, + "y":21.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":155.75, + "y":51.5 + }, + { + "height":0, + "id":1292, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.75, + "y":38.25 + }, + { + "x":-50, + "y":14.75 + }, + { + "x":-45, + "y":-1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":164.25, + "y":90.25 + }, + { + "height":0, + "id":1293, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-30, + "y":28 + }, + { + "x":-52.25, + "y":-12.25 + }, + { + "x":-39, + "y":-23 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":153.5, + "y":128.25 + }, + { + "height":0, + "id":1294, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":9.75 + }, + { + "x":-38, + "y":-36.75 + }, + { + "x":-22, + "y":-40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.5, + "y":155.75 + }, + { + "height":0, + "id":1295, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":-11.25 + }, + { + "x":-13.25, + "y":-50.75 + }, + { + "x":1.5, + "y":-46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.5, + "y":165.5 + }, + { + "height":0, + "id":1296, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-28.25, + "y":-30.75 + }, + { + "x":13.5, + "y":-52 + }, + { + "x":25.75, + "y":-39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.5, + "y":154.25 + }, + { + "height":0, + "id":1297, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-9.25, + "y":-39.5 + }, + { + "x":38, + "y":-37.25 + }, + { + "x":41.5, + "y":-21.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.75, + "y":123.5 + }, + { + "height":0, + "id":1298, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.5, + "y":-39 + }, + { + "x":51.25, + "y":-14.5 + }, + { + "x":47.5, + "y":1.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":84.75 + }, + { + "height":0, + "id":1299, + "name":"", + "polygon":[ + { + "x":0.75, + "y":-0.5 + }, + { + "x":30, + "y":-27.5 + }, + { + "x":53.25, + "y":12.5 + }, + { + "x":40, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.25, + "y":46.5 + }, + { + "height":0, + "id":1300, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39.75, + "y":-10 + }, + { + "x":38, + "y":36.25 + }, + { + "x":23.5, + "y":39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":50.25, + "y":19.5 + }, + { + "height":24.6667, + "id":1301, + "name":"", + "properties": + { + "angulardamp":0.1, + "arc":10, + "bounce":0, + "bullet":false, + "categorybit":32, + "density":1, + "fixed":false, + "friction":0, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.1, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":25, + "x":73.3333, + "y":74.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Ball8", + "objects":[ + { + "height":0, + "id":1235, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39, + "y":12 + }, + { + "x":13.25, + "y":50.25 + }, + { + "x":-2.25, + "y":46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.25, + "y":9.5 + }, + { + "height":0, + "id":1236, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.5, + "y":30 + }, + { + "x":-12.75, + "y":51.5 + }, + { + "x":-25.25, + "y":38.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.75, + "y":21.75 + }, + { + "height":0, + "id":1237, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.75, + "y":39 + }, + { + "x":-36.75, + "y":37.75 + }, + { + "x":-39.75, + "y":21.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":155.75, + "y":51.5 + }, + { + "height":0, + "id":1238, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.75, + "y":38.25 + }, + { + "x":-50, + "y":14.75 + }, + { + "x":-45, + "y":-1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":164.25, + "y":90.25 + }, + { + "height":0, + "id":1239, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-30, + "y":28 + }, + { + "x":-52.25, + "y":-12.25 + }, + { + "x":-39, + "y":-23 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":153.5, + "y":128.25 + }, + { + "height":0, + "id":1240, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":9.75 + }, + { + "x":-38, + "y":-36.75 + }, + { + "x":-22, + "y":-40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.5, + "y":155.75 + }, + { + "height":0, + "id":1241, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":-11.25 + }, + { + "x":-13.25, + "y":-50.75 + }, + { + "x":1.5, + "y":-46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.5, + "y":165.5 + }, + { + "height":0, + "id":1242, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-28.25, + "y":-30.75 + }, + { + "x":13.5, + "y":-52 + }, + { + "x":25.75, + "y":-39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.5, + "y":154.25 + }, + { + "height":0, + "id":1243, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-9.25, + "y":-39.5 + }, + { + "x":38, + "y":-37.25 + }, + { + "x":41.5, + "y":-21.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.75, + "y":123.5 + }, + { + "height":0, + "id":1244, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.5, + "y":-39 + }, + { + "x":51.25, + "y":-14.5 + }, + { + "x":47.5, + "y":1.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":84.75 + }, + { + "height":0, + "id":1245, + "name":"", + "polygon":[ + { + "x":0.75, + "y":-0.5 + }, + { + "x":30, + "y":-27.5 + }, + { + "x":53.25, + "y":12.5 + }, + { + "x":40, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.25, + "y":46.5 + }, + { + "height":0, + "id":1246, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39.75, + "y":-10 + }, + { + "x":38, + "y":36.25 + }, + { + "x":23.5, + "y":39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":50.25, + "y":19.5 + }, + { + "height":24.6667, + "id":1247, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":5, + "bounce":0.1, + "bullet":false, + "categorybit":32, + "density":0.6, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":25, + "x":73.3333, + "y":74.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"MenuBall", + "objects":[ + { + "height":0, + "id":1010, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39, + "y":12 + }, + { + "x":13.25, + "y":50.25 + }, + { + "x":-2.25, + "y":46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.25, + "y":9.5 + }, + { + "height":0, + "id":1011, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.5, + "y":30 + }, + { + "x":-12.75, + "y":51.5 + }, + { + "x":-25.25, + "y":38.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.75, + "y":21.75 + }, + { + "height":0, + "id":1012, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.75, + "y":39 + }, + { + "x":-36.75, + "y":37.75 + }, + { + "x":-39.75, + "y":21.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":155.75, + "y":51.5 + }, + { + "height":0, + "id":1013, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.75, + "y":38.25 + }, + { + "x":-50, + "y":14.75 + }, + { + "x":-45, + "y":-1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":164.25, + "y":90.25 + }, + { + "height":0, + "id":1014, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-30, + "y":28 + }, + { + "x":-52.25, + "y":-12.25 + }, + { + "x":-39, + "y":-23 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":153.5, + "y":128.25 + }, + { + "height":0, + "id":1015, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":9.75 + }, + { + "x":-38, + "y":-36.75 + }, + { + "x":-22, + "y":-40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.5, + "y":155.75 + }, + { + "height":0, + "id":1016, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39.5, + "y":-11.25 + }, + { + "x":-13.25, + "y":-50.75 + }, + { + "x":1.5, + "y":-46.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.5, + "y":165.5 + }, + { + "height":0, + "id":1017, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-28.25, + "y":-30.75 + }, + { + "x":13.5, + "y":-52 + }, + { + "x":25.75, + "y":-39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.5, + "y":154.25 + }, + { + "height":0, + "id":1018, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-9.25, + "y":-39.5 + }, + { + "x":38, + "y":-37.25 + }, + { + "x":41.5, + "y":-21.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.75, + "y":123.5 + }, + { + "height":0, + "id":1019, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.5, + "y":-39 + }, + { + "x":51.25, + "y":-14.5 + }, + { + "x":47.5, + "y":1.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":84.75 + }, + { + "height":0, + "id":1020, + "name":"", + "polygon":[ + { + "x":0.75, + "y":-0.5 + }, + { + "x":30, + "y":-27.5 + }, + { + "x":53.25, + "y":12.5 + }, + { + "x":40, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.25, + "y":46.5 + }, + { + "height":0, + "id":1021, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39.75, + "y":-10 + }, + { + "x":38, + "y":36.25 + }, + { + "x":23.5, + "y":39.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":50.25, + "y":19.5 + }, + { + "height":24.6667, + "id":1022, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":5.5, + "bounce":0.1, + "bullet":false, + "categorybit":32, + "density":0.3, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":25, + "x":73.3333, + "y":74.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Cart", + "objects":[ + { + "height":0, + "id":749, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.046875, + "y":32.2813 + }, + { + "x":23.25, + "y":32.2344 + }, + { + "x":23.25, + "y":-0.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.25, + "y":10.75 + }, + { + "height":0, + "id":751, + "name":"", + "polygon":[ + { + "x":-0.26087, + "y":-0.73913 + }, + { + "x":-0.46875, + "y":23.25 + }, + { + "x":29.0217, + "y":-0.782609 + }, + { + "x":22.9239, + "y":-0.782609 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.5, + "y":43.75 + }, + { + "height":0, + "id":752, + "name":"", + "polygon":[ + { + "x":0.3125, + "y":0.71875 + }, + { + "x":46.125, + "y":0.71875 + }, + { + "x":54.3804, + "y":-23.3152 + }, + { + "x":29.913, + "y":-23.337 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.75, + "y":66.25 + }, + { + "height":0, + "id":753, + "name":"", + "polygon":[ + { + "x":0.125, + "y":1 + }, + { + "x":32.7813, + "y":1 + }, + { + "x":26, + "y":-23 + }, + { + "x":8.42391, + "y":-23.0543 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51.75, + "y":66 + }, + { + "height":0, + "id":754, + "name":"", + "polygon":[ + { + "x":0.03125, + "y":0.75 + }, + { + "x":36.6563, + "y":0.78125 + }, + { + "x":13.25, + "y":-23.25 + }, + { + "x":-6.86957, + "y":-23.3043 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.5, + "y":66.25 + }, + { + "height":0, + "id":755, + "name":"", + "polygon":[ + { + "x":0.28125, + "y":0.71875 + }, + { + "x":0.1875, + "y":-21.6875 + }, + { + "x":-23, + "y":-31.587 + }, + { + "x":-22.9674, + "y":-23.2826 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":120.75, + "y":66.25 + }, + { + "height":0, + "id":756, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.268775, + "y":-34.2964 + }, + { + "x":-23.2242, + "y":-34.2774 + }, + { + "x":-23.2174, + "y":-9.82609 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":120.913, + "y":44.5217 + }, + { + "height":0, + "id":758, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-23.0909, + "y":0 + }, + { + "x":-20.5455, + "y":3.45455 + }, + { + "x":-2.18182, + "y":3.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":120.909, + "y":10.1818 + }, + { + "height":0, + "id":760, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":24.3636 + }, + { + "x":23.2727, + "y":34.1818 + }, + { + "x":23.2727, + "y":-0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":97.6364, + "y":10.3636 + }, + { + "height":0, + "id":761, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":8.36364 + }, + { + "x":23.4545, + "y":32.5455 + }, + { + "x":23.0909, + "y":10 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":97.6364, + "y":34.5455 + }, + { + "height":0, + "id":762, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-20.1818, + "y":0 + }, + { + "x":-13.4545, + "y":24 + }, + { + "x":23.0909, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":97.8182, + "y":43.0909 + }, + { + "height":0, + "id":763, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-18.1818, + "y":-0.181818 + }, + { + "x":-26.3636, + "y":24.1818 + }, + { + "x":6.18182, + "y":23.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":78.1818, + "y":43.0909 + }, + { + "height":0, + "id":764, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-24.7273, + "y":-0.181818 + }, + { + "x":-54.1818, + "y":24 + }, + { + "x":-8.18182, + "y":23.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":60.1818, + "y":43.0909 + }, + { + "height":0, + "id":765, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-6.36364, + "y":-0.181818 + }, + { + "x":-29.2727, + "y":0 + }, + { + "x":-29.4545, + "y":24.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":35.2727, + "y":42.9091 + }, + { + "height":0, + "id":766, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":-32 + }, + { + "x":-23.2727, + "y":-32 + }, + { + "x":-23.2727, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.4545, + "y":42.7273 + }, + { + "height":0, + "id":767, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-23.2727, + "y":0 + }, + { + "x":-17.8182, + "y":2.72727 + }, + { + "x":-4.90909, + "y":2.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.4545, + "y":10.9091 + }, + { + "height":12.5455, + "id":768, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":4, + "density":0.3, + "fixed":false, + "friction":0.1, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":60, + "object_type":3, + "second":0, + "sensor":false, + "spojene":"1,2,3,7,8,9", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":95.8182, + "x":15.0909, + "y":73.2727 + }, + { + "ellipse":true, + "height":1.81818, + "id":769, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":14 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.63636, + "x":16.1818, + "y":28.7273 + }, + { + "ellipse":true, + "height":1.45455, + "id":770, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":13 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.45455, + "x":15.6364, + "y":51.0909 + }, + { + "ellipse":true, + "height":2.18182, + "id":771, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":12 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.18182, + "x":34.5455, + "y":54 + }, + { + "ellipse":true, + "height":1.81818, + "id":772, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":11 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.81818, + "x":65.8182, + "y":53.2727 + }, + { + "ellipse":true, + "height":2, + "id":773, + "name":"", + "properties": + { + "bodyA":4, + "bodyB":10 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.18182, + "x":92.3636, + "y":53.6364 + }, + { + "ellipse":true, + "height":1.81818, + "id":774, + "name":"", + "properties": + { + "bodyA":5, + "bodyB":9 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.63636, + "x":108.909, + "y":45.8182 + }, + { + "ellipse":true, + "height":1.81818, + "id":775, + "name":"", + "properties": + { + "bodyA":6, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.63636, + "x":108.727, + "y":24.9091 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"CartWheel", + "objects":[ + { + "height":0, + "id":795, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.6364, + "y":4 + }, + { + "x":4, + "y":16.6364 + }, + { + "x":-1.09091, + "y":15.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":27.2727, + "y":2.27273 + }, + { + "height":0, + "id":796, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.36364, + "y":9.54545 + }, + { + "x":-3.54545, + "y":16.3636 + }, + { + "x":-7.54545, + "y":12.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38.9091, + "y":6.36364 + }, + { + "height":0, + "id":797, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2.36364, + "y":11.5455 + }, + { + "x":-11.0909, + "y":12.1818 + }, + { + "x":-12, + "y":6.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":47.2727, + "y":15.9091 + }, + { + "height":0, + "id":798, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.90909, + "y":11.9091 + }, + { + "x":-15.1818, + "y":4.81818 + }, + { + "x":-13.3636, + "y":0.545455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":49.6364, + "y":27.4545 + }, + { + "height":0, + "id":799, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.90909, + "y":7.72727 + }, + { + "x":-15.2727, + "y":-4.18182 + }, + { + "x":-11.1818, + "y":-7.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.7273, + "y":39.2727 + }, + { + "height":0, + "id":800, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-12, + "y":3.45455 + }, + { + "x":-12.9091, + "y":-11.2727 + }, + { + "x":-7.36364, + "y":-11.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":37.8182, + "y":46.8182 + }, + { + "height":0, + "id":801, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-13.6364, + "y":-4.09091 + }, + { + "x":-5.09091, + "y":-16.3636 + }, + { + "x":-1.09091, + "y":-14.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":26, + "y":50.1818 + }, + { + "height":0, + "id":802, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-8.09091, + "y":-9 + }, + { + "x":5.18182, + "y":-16.1818 + }, + { + "x":8.09091, + "y":-12.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":12.6364, + "y":46.0909 + }, + { + "height":0, + "id":803, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2.63636, + "y":-12.3636 + }, + { + "x":12.5455, + "y":-12.6364 + }, + { + "x":13.0909, + "y":-7.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.72727, + "y":37.1818 + }, + { + "height":0, + "id":804, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3.63636, + "y":-11.8182 + }, + { + "x":15.9091, + "y":-4.27273 + }, + { + "x":15.2727, + "y":-0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":2.27273, + "y":24.9091 + }, + { + "height":0, + "id":805, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.45455, + "y":-8 + }, + { + "x":15.3636, + "y":4.54545 + }, + { + "x":12.2727, + "y":7.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6, + "y":13.2727 + }, + { + "height":0, + "id":806, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":12.8182, + "y":-3.18182 + }, + { + "x":11.8182, + "y":11.9091 + }, + { + "x":6.90909, + "y":12.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":14.4545, + "y":5.45455 + }, + { + "height":7.81818, + "id":808, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":2, + "bounce":0.1, + "bullet":true, + "categorybit":2, + "density":0.3, + "fixed":false, + "friction":0.3, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":58, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"0,4,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":8.09091, + "x":21.8182, + "y":21.7273 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Bridge3", + "objects":[ + { + "height":0, + "id":588, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":5, + "y":0.666667 + }, + { + "x":3.33333, + "y":66.6667 + }, + { + "x":-0.333333, + "y":30.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":7.33333, + "y":11 + }, + { + "height":0, + "id":589, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":45.6667, + "y":1.66667 + }, + { + "x":45.3333, + "y":31.3333 + }, + { + "x":-1, + "y":65.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":12, + "y":12 + }, + { + "height":0, + "id":590, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54.6667, + "y":2.33333 + }, + { + "x":53.3333, + "y":32.3333 + }, + { + "x":0.333333, + "y":28.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":57.3333, + "y":14 + }, + { + "height":0, + "id":591, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":60.3333, + "y":3.33333 + }, + { + "x":59, + "y":33.3333 + }, + { + "x":-1.33333, + "y":30.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":111.667, + "y":16.3333 + }, + { + "height":0, + "id":592, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":48.3333, + "y":1.66667 + }, + { + "x":46.3333, + "y":31.6667 + }, + { + "x":-0.333333, + "y":29.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":171.333, + "y":20 + }, + { + "height":0, + "id":593, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":49.3333, + "y":2 + }, + { + "x":47.3333, + "y":31.6667 + }, + { + "x":-1, + "y":29.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":219, + "y":22 + }, + { + "height":0, + "id":594, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":47.3333, + "y":1.33333 + }, + { + "x":45.3333, + "y":32 + }, + { + "x":-1, + "y":29 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":267.333, + "y":24.6667 + }, + { + "height":0, + "id":595, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":43.6667, + "y":1.66667 + }, + { + "x":39.6667, + "y":33.6667 + }, + { + "x":-1, + "y":29.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":314, + "y":26.6667 + }, + { + "height":0, + "id":596, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":26.3333, + "y":0.333333 + }, + { + "x":38.6667, + "y":66 + }, + { + "x":-3.66667, + "y":31 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":357.333, + "y":29.3333 + }, + { + "height":0, + "id":597, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":12.3333, + "y":65.3333 + }, + { + "x":-0.333333, + "y":45.3333 + }, + { + "x":-4.33333, + "y":10.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":383.667, + "y":30 + }, + { + "height":0, + "id":599, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-42.3333, + "y":-35 + }, + { + "x":-39, + "y":-65.3333 + }, + { + "x":-12.3333, + "y":-65.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":396, + "y":95 + }, + { + "height":0, + "id":600, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-40.6667, + "y":-4 + }, + { + "x":-39.3333, + "y":-33.6667 + }, + { + "x":3, + "y":-31.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":354, + "y":60.3333 + }, + { + "height":0, + "id":601, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-47.3333, + "y":-2.33333 + }, + { + "x":-46, + "y":-31 + }, + { + "x":0.333333, + "y":-29.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":313.667, + "y":56 + }, + { + "height":0, + "id":602, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-49, + "y":-2 + }, + { + "x":-48.3333, + "y":-31.6667 + }, + { + "x":0.666667, + "y":-29.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":267, + "y":53.6667 + }, + { + "height":0, + "id":603, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-47.6667, + "y":-2 + }, + { + "x":-47.3333, + "y":-31.6667 + }, + { + "x":0.666667, + "y":-29.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":218.333, + "y":51.3333 + }, + { + "height":0, + "id":604, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-60, + "y":-3 + }, + { + "x":-58.6667, + "y":-33.3333 + }, + { + "x":1, + "y":-29.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":170.667, + "y":49.3333 + }, + { + "height":0, + "id":605, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-53.6667, + "y":-3.33333 + }, + { + "x":-53.6667, + "y":-32.3333 + }, + { + "x":0.333333, + "y":-30.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":111.333, + "y":46.3333 + }, + { + "height":0, + "id":606, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-47.6667, + "y":35 + }, + { + "x":-46, + "y":-30 + }, + { + "x":-1.33333, + "y":-29.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":58.3333, + "y":42.6667 + }, + { + "height":0, + "id":607, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.66667, + "y":-36 + }, + { + "x":-3.33333, + "y":-66 + }, + { + "x":1.66667, + "y":-65.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.6667, + "y":77.6667 + }, + { + "height":0, + "id":608, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1, + "y":-31 + }, + { + "x":4.33333, + "y":-25 + }, + { + "x":3, + "y":-2.66667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.33333, + "y":41.6667 + }, + { + "height":20, + "id":609, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.2, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":2, + "second":0, + "sensor":false, + "spojene":"0,1,8,9", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":25, + "x":244, + "y":17 + }, + { + "ellipse":true, + "height":6, + "id":728, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":17 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":6, + "x":29.3333, + "y":31.3333 + }, + { + "ellipse":true, + "height":5.33333, + "id":729, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":16 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":6, + "x":80.6667, + "y":28 + }, + { + "ellipse":true, + "height":4.66667, + "id":730, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":15 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.66667, + "x":138, + "y":31.3333 + }, + { + "ellipse":true, + "height":5.33333, + "id":731, + "name":"", + "properties": + { + "bodyA":4, + "bodyB":14 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.66667, + "x":192, + "y":32.6667 + }, + { + "ellipse":true, + "height":4.66667, + "id":732, + "name":"", + "properties": + { + "bodyA":5, + "bodyB":13 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.66667, + "x":239.333, + "y":38.6667 + }, + { + "ellipse":true, + "height":3.33333, + "id":733, + "name":"", + "properties": + { + "bodyA":6, + "bodyB":12 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4, + "x":288.667, + "y":40 + }, + { + "ellipse":true, + "height":4.66667, + "id":734, + "name":"", + "properties": + { + "bodyA":7, + "bodyB":11 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4, + "x":331.333, + "y":42 + }, + { + "ellipse":true, + "height":5.33333, + "id":735, + "name":"", + "properties": + { + "bodyA":8, + "bodyB":10 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":6, + "x":365.333, + "y":45.3333 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Bridge2", + "objects":[ + { + "height":0, + "id":666, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6.25, + "y":0.25 + }, + { + "x":8, + "y":66.25 + }, + { + "x":0, + "y":30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11, + "y":11.25 + }, + { + "height":0, + "id":667, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":58.25, + "y":0.25 + }, + { + "x":59.25, + "y":30.5 + }, + { + "x":1.5, + "y":66 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.5, + "y":11.5 + }, + { + "height":0, + "id":668, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":25.5, + "y":-0.25 + }, + { + "x":27, + "y":30.25 + }, + { + "x":1.25, + "y":30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":75.5, + "y":11.75 + }, + { + "height":0, + "id":669, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.25, + "y":-0.75 + }, + { + "x":28.75, + "y":30.25 + }, + { + "x":2.25, + "y":30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":100.75, + "y":12 + }, + { + "height":0, + "id":670, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":26.75, + "y":-0.5 + }, + { + "x":27.5, + "y":30 + }, + { + "x":1.25, + "y":30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.5, + "y":11.75 + }, + { + "height":0, + "id":671, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":28.25, + "y":-0.75 + }, + { + "x":29.5, + "y":30.25 + }, + { + "x":0.25, + "y":30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":155.75, + "y":11.75 + }, + { + "height":0, + "id":672, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":30.25, + "y":0.25 + }, + { + "x":32, + "y":30.75 + }, + { + "x":0.5, + "y":30.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":184.25, + "y":11 + }, + { + "height":0, + "id":673, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":25.5, + "y":-0.25 + }, + { + "x":26.5, + "y":30 + }, + { + "x":2.5, + "y":30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":214, + "y":11.75 + }, + { + "height":0, + "id":674, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":32.75, + "y":-0.25 + }, + { + "x":34.25, + "y":30.25 + }, + { + "x":1.5, + "y":30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":239.25, + "y":11.75 + }, + { + "height":0, + "id":675, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":38, + "y":-0.25 + }, + { + "x":40, + "y":30.25 + }, + { + "x":2, + "y":30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":271.5, + "y":11.75 + }, + { + "height":0, + "id":676, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":35.75, + "y":0 + }, + { + "x":37, + "y":29.75 + }, + { + "x":2.25, + "y":30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":309.5, + "y":11.5 + }, + { + "height":0, + "id":677, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":36.5, + "y":-0.25 + }, + { + "x":38.5, + "y":30.25 + }, + { + "x":1.25, + "y":29.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":345.25, + "y":11.75 + }, + { + "height":0, + "id":678, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":34.5, + "y":0 + }, + { + "x":36.5, + "y":29.75 + }, + { + "x":2.25, + "y":30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":381.5, + "y":11.75 + }, + { + "height":0, + "id":679, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":28.75, + "y":-0.75 + }, + { + "x":59, + "y":67.25 + }, + { + "x":2, + "y":29 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":416, + "y":12.5 + }, + { + "height":0, + "id":680, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":68.75, + "y":-0.25 + }, + { + "x":70, + "y":70.75 + }, + { + "x":30.75, + "y":67.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":444.5, + "y":12.25 + }, + { + "height":0, + "id":681, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.5, + "y":70.25 + }, + { + "x":-5.5, + "y":70 + }, + { + "x":-7.5, + "y":0.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":513.25, + "y":12.25 + }, + { + "height":0, + "id":682, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-40.25, + "y":-3.25 + }, + { + "x":-70, + "y":-71.5 + }, + { + "x":-1.75, + "y":-71.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":515, + "y":83.25 + }, + { + "height":0, + "id":683, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-57.5, + "y":-37.75 + }, + { + "x":-59, + "y":-67 + }, + { + "x":-29.75, + "y":-67.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":475, + "y":79.25 + }, + { + "height":0, + "id":684, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-33.75, + "y":0.5 + }, + { + "x":-36.25, + "y":-29.75 + }, + { + "x":-2.25, + "y":-29.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":417.75, + "y":41.5 + }, + { + "height":0, + "id":685, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-37.75, + "y":0 + }, + { + "x":-39, + "y":-30 + }, + { + "x":-3.25, + "y":-30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":384.25, + "y":41.75 + }, + { + "height":0, + "id":686, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-35.25, + "y":0.5 + }, + { + "x":-37.25, + "y":-29.75 + }, + { + "x":-1.5, + "y":-30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":346.75, + "y":41.5 + }, + { + "height":0, + "id":687, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-38.5, + "y":0.25 + }, + { + "x":-40.5, + "y":-30 + }, + { + "x":-3, + "y":-30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":312, + "y":41.75 + }, + { + "height":0, + "id":688, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-32.75, + "y":0.25 + }, + { + "x":-34.25, + "y":-30 + }, + { + "x":-2.25, + "y":-30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":273.5, + "y":41.75 + }, + { + "height":0, + "id":689, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-24.25, + "y":0.25 + }, + { + "x":-26.75, + "y":-29.5 + }, + { + "x":-2, + "y":-30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":241, + "y":41.5 + }, + { + "height":0, + "id":690, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-31.75, + "y":0.25 + }, + { + "x":-33, + "y":-30.75 + }, + { + "x":-3, + "y":-30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":217, + "y":41.5 + }, + { + "height":0, + "id":691, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-29, + "y":0.25 + }, + { + "x":-29.25, + "y":-29.5 + }, + { + "x":-0.75, + "y":-30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":185.25, + "y":41.5 + }, + { + "height":0, + "id":692, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-26.5, + "y":0.75 + }, + { + "x":-28.25, + "y":-30 + }, + { + "x":-0.5, + "y":-29.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":156.5, + "y":41.75 + }, + { + "height":0, + "id":693, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-26.5, + "y":-0.25 + }, + { + "x":-29, + "y":-30 + }, + { + "x":-0.75, + "y":-30.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":129.5, + "y":42.25 + }, + { + "height":0, + "id":694, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-26.25, + "y":0.25 + }, + { + "x":-27.25, + "y":-29.75 + }, + { + "x":-1.75, + "y":-30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":103, + "y":42 + }, + { + "height":0, + "id":695, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-57.75, + "y":35.75 + }, + { + "x":-59.25, + "y":-30 + }, + { + "x":-1, + "y":-30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":76.75, + "y":41.75 + }, + { + "height":0, + "id":696, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.75, + "y":-34 + }, + { + "x":-8, + "y":-64.5 + }, + { + "x":-1.5, + "y":-64.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":19, + "y":76.25 + }, + { + "height":0, + "id":697, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-31 + }, + { + "x":7, + "y":-31 + }, + { + "x":8, + "y":33.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11, + "y":43.25 + }, + { + "height":16, + "id":698, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.5, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":2, + "second":0, + "sensor":false, + "spojene":"2,4,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":19, + "x":246, + "y":19 + }, + { + "ellipse":true, + "height":4.5, + "id":713, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":29 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4, + "x":43, + "y":31.5 + }, + { + "ellipse":true, + "height":4, + "id":714, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":28 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.5, + "x":86, + "y":27 + }, + { + "ellipse":true, + "height":4.5, + "id":716, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":27 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.5, + "x":113, + "y":26 + }, + { + "ellipse":true, + "height":4.5, + "id":717, + "name":"", + "properties": + { + "bodyA":4, + "bodyB":26 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.5, + "x":140, + "y":26 + }, + { + "ellipse":true, + "height":4.5, + "id":718, + "name":"", + "properties": + { + "bodyA":5, + "bodyB":25 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5, + "x":166, + "y":26 + }, + { + "ellipse":true, + "height":5, + "id":719, + "name":"", + "properties": + { + "bodyA":6, + "bodyB":24 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5, + "x":196.5, + "y":26 + }, + { + "ellipse":true, + "height":5, + "id":720, + "name":"", + "properties": + { + "bodyA":7, + "bodyB":23 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5.5, + "x":223, + "y":25.5 + }, + { + "ellipse":true, + "height":5, + "id":721, + "name":"", + "properties": + { + "bodyA":9, + "bodyB":21 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5, + "x":286.5, + "y":25.5 + }, + { + "ellipse":true, + "height":5, + "id":722, + "name":"", + "properties": + { + "bodyA":10, + "bodyB":20 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4.5, + "x":324.5, + "y":24.5 + }, + { + "ellipse":true, + "height":6, + "id":723, + "name":"", + "properties": + { + "bodyA":11, + "bodyB":19 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":6, + "x":361, + "y":24 + }, + { + "ellipse":true, + "height":5, + "id":724, + "name":"", + "properties": + { + "bodyA":12, + "bodyB":18 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":5, + "x":397, + "y":26 + }, + { + "ellipse":true, + "height":5, + "id":725, + "name":"", + "properties": + { + "bodyA":13, + "bodyB":17 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":4, + "x":432.5, + "y":33.5 + }, + { + "ellipse":true, + "height":6, + "id":726, + "name":"", + "properties": + { + "bodyA":14, + "bodyB":16 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":6, + "x":480, + "y":36 + }, + { + "ellipse":true, + "height":3, + "id":727, + "name":"", + "properties": + { + "bodyA":8, + "bodyB":22 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":254, + "y":37 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Bridge1", + "objects":[ + { + "height":45.25, + "id":487, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.5, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":2, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,4,5,6", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":19.5, + "x":332.25, + "y":379.167 + }, + { + "height":0, + "id":571, + "name":"", + "polygon":[ + { + "x":-1, + "y":0 + }, + { + "x":28.3333, + "y":-0.333333 + }, + { + "x":28, + "y":-19.6667 + }, + { + "x":-0.333333, + "y":-19.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":326, + "y":454 + }, + { + "height":0, + "id":572, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1, + "y":-65.6667 + }, + { + "x":28, + "y":-65.6667 + }, + { + "x":28, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":326, + "y":434.333 + }, + { + "height":0, + "id":573, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-63.6667 + }, + { + "x":27.3333, + "y":-52 + }, + { + "x":28.6667, + "y":-0.666667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":325.333, + "y":369 + }, + { + "height":0, + "id":574, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.333333, + "y":-69.6667 + }, + { + "x":27, + "y":-57 + }, + { + "x":27, + "y":11 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":325.333, + "y":305.667 + }, + { + "height":0, + "id":575, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.333333, + "y":-71 + }, + { + "x":27.6667, + "y":-52.3333 + }, + { + "x":26.6667, + "y":11.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":325.333, + "y":237 + }, + { + "height":0, + "id":576, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":-73.6667 + }, + { + "x":28.6667, + "y":-73.6667 + }, + { + "x":27.3333, + "y":18 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":325.333, + "y":166.667 + }, + { + "height":0, + "id":577, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.674419, + "y":-73.6667 + }, + { + "x":27.314, + "y":-42 + }, + { + "x":28.3256, + "y":-0.666667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":325.674, + "y":93.3333 + }, + { + "height":0, + "id":579, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.6667, + "y":31.3333 + }, + { + "x":23.6667, + "y":34 + }, + { + "x":3.33333, + "y":9.66667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":325.333, + "y":20.3333 + }, + { + "height":0, + "id":580, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27.3333, + "y":-31.3333 + }, + { + "x":-27, + "y":41.6667 + }, + { + "x":1, + "y":41.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":352.667, + "y":51.3333 + }, + { + "height":0, + "id":581, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-28.3333, + "y":0 + }, + { + "x":-28.3333, + "y":74.3333 + }, + { + "x":-1.33333, + "y":92 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":353.667, + "y":92.3333 + }, + { + "height":0, + "id":582, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27.6667, + "y":-18 + }, + { + "x":-27, + "y":52.3333 + }, + { + "x":-0.333333, + "y":64.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":352.667, + "y":184 + }, + { + "height":0, + "id":583, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27.6667, + "y":-11.6667 + }, + { + "x":-26.6667, + "y":57.3333 + }, + { + "x":-0.333333, + "y":68 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":352.333, + "y":248.333 + }, + { + "height":0, + "id":584, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27.3333, + "y":-11 + }, + { + "x":-27, + "y":53 + }, + { + "x":1.66667, + "y":52.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":352.333, + "y":316 + }, + { + "height":0, + "id":585, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27.3333, + "y":1.33333 + }, + { + "x":-27.3333, + "y":66.6667 + }, + { + "x":0.666667, + "y":66.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":353.667, + "y":368 + }, + { + "height":0, + "id":586, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":19.3333 + }, + { + "x":-28.6667, + "y":20.3333 + }, + { + "x":-28, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":354, + "y":433.667 + }, + { + "height":0, + "id":587, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-29.6667, + "y":0 + }, + { + "x":-26.6667, + "y":-7 + }, + { + "x":-3, + "y":-7 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":355, + "y":453.667 + }, + { + "ellipse":true, + "height":2.75, + "id":742, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":14 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.75, + "x":337.5, + "y":439 + }, + { + "ellipse":true, + "height":2.25, + "id":743, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":13 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.5, + "x":337.75, + "y":402.25 + }, + { + "ellipse":true, + "height":2.5, + "id":744, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":12 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.25, + "x":337, + "y":339.75 + }, + { + "ellipse":true, + "height":2.75, + "id":745, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":11 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.25, + "x":337.25, + "y":272.25 + }, + { + "ellipse":true, + "height":2.75, + "id":746, + "name":"", + "properties": + { + "bodyA":4, + "bodyB":10 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.25, + "x":337, + "y":203.25 + }, + { + "ellipse":true, + "height":3, + "id":747, + "name":"", + "properties": + { + "bodyA":5, + "bodyB":9 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.5, + "x":335.75, + "y":128.25 + }, + { + "ellipse":true, + "height":3, + "id":748, + "name":"", + "properties": + { + "bodyA":6, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.75, + "x":334.25, + "y":66.25 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Switch", + "objects":[ + { + "height":0, + "id":489, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":42.5, + "y":0.5 + }, + { + "x":46.5, + "y":6.5 + }, + { + "x":28.5, + "y":7.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":39.75, + "y":40.75 + }, + { + "height":0, + "id":490, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":33, + "y":0.25 + }, + { + "x":32.5, + "y":6 + }, + { + "x":4.5, + "y":6 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":82.25, + "y":41.5 + }, + { + "height":0, + "id":491, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":42, + "y":-0.25 + }, + { + "x":18.5, + "y":7.5 + }, + { + "x":0, + "y":6 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":114.75, + "y":41.75 + }, + { + "height":0, + "id":492, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":14.5, + "y":10.25 + }, + { + "x":-16.75, + "y":10.75 + }, + { + "x":-24, + "y":7.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":156.5, + "y":41.5 + }, + { + "height":0, + "id":494, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":18, + "y":12.5 + }, + { + "x":-34.5, + "y":5.5 + }, + { + "x":-29.25, + "y":1 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":169.75, + "y":51.25 + }, + { + "height":0, + "id":495, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-62, + "y":0.75 + }, + { + "x":-71, + "y":-5.25 + }, + { + "x":-51, + "y":-6.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":187.25, + "y":63.25 + }, + { + "height":0, + "id":496, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-52.5, + "y":0.5 + }, + { + "x":-44.75, + "y":-5.75 + }, + { + "x":-10, + "y":-6.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":125.25, + "y":63.75 + }, + { + "height":0, + "id":497, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-59.5, + "y":0.5 + }, + { + "x":-5.5, + "y":-7.75 + }, + { + "x":7.25, + "y":-6.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":73.25, + "y":64.25 + }, + { + "height":0, + "id":498, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":13, + "y":-13.5 + }, + { + "x":47.75, + "y":-12 + }, + { + "x":53, + "y":-7.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":14.25, + "y":64.5 + }, + { + "height":0, + "id":499, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":12.5, + "y":-11 + }, + { + "x":41, + "y":-2.5 + }, + { + "x":34.75, + "y":1.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":27.5, + "y":51 + }, + { + "height":30.5, + "id":500, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":51.5, + "x":78.5, + "y":4.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Mill", + "objects":[ + { + "height":0, + "id":422, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":17.8182, + "y":0.0909091 + }, + { + "x":12.0909, + "y":12.9091 + }, + { + "x":6.09091, + "y":13 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":179.091, + "y":12.0909 + }, + { + "height":0, + "id":423, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":12.0909, + "y":56.7273 + }, + { + "x":-5, + "y":54 + }, + { + "x":-5.36364, + "y":12.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":196.727, + "y":12.1818 + }, + { + "height":0, + "id":424, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.272727, + "y":50.3636 + }, + { + "x":-16.5455, + "y":50.4545 + }, + { + "x":-16.7273, + "y":-2.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":208.545, + "y":68.7273 + }, + { + "height":0, + "id":425, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.54545, + "y":55.8182 + }, + { + "x":-18.0909, + "y":66.9091 + }, + { + "x":-16.8182, + "y":0.0909091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":208.727, + "y":119 + }, + { + "height":0, + "id":426, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":51.0909, + "y":-4.81818 + }, + { + "x":51.0909, + "y":10.6364 + }, + { + "x":-14.3636, + "y":11.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":205, + "y":174.818 + }, + { + "height":0, + "id":427, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":59, + "y":-0.0909091 + }, + { + "x":59.8182, + "y":15.2727 + }, + { + "x":0.0909091, + "y":15.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":255.909, + "y":170.091 + }, + { + "height":0, + "id":428, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":53.2727, + "y":8.45455 + }, + { + "x":42.9091, + "y":15.6364 + }, + { + "x":0.909091, + "y":15.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":314.818, + "y":170.091 + }, + { + "height":0, + "id":429, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.0909091, + "y":23.1818 + }, + { + "x":-9.81818, + "y":15.3636 + }, + { + "x":-10.1818, + "y":7.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":367.909, + "y":178.545 + }, + { + "height":0, + "id":430, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-50.7273, + "y":9.63636 + }, + { + "x":-52.0909, + "y":-7.09091 + }, + { + "x":-9.63636, + "y":-7.72727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":367.636, + "y":201.545 + }, + { + "height":0, + "id":431, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-58.9091, + "y":-0.0909091 + }, + { + "x":-57.9091, + "y":-17 + }, + { + "x":-1.09091, + "y":-16.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":316.818, + "y":211 + }, + { + "height":0, + "id":432, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-51.0909, + "y":-3.27273 + }, + { + "x":-64.1818, + "y":-16.5455 + }, + { + "x":1, + "y":-16.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":258.091, + "y":210.636 + }, + { + "height":0, + "id":433, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2.54545, + "y":56.1818 + }, + { + "x":-13.0909, + "y":55.7273 + }, + { + "x":-13.1818, + "y":-13.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":207, + "y":207.273 + }, + { + "height":0, + "id":434, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.636364, + "y":51.7273 + }, + { + "x":-15.4545, + "y":50.7273 + }, + { + "x":-15.2727, + "y":-0.272727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":209.273, + "y":263.182 + }, + { + "height":0, + "id":435, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-9.54545, + "y":56.4545 + }, + { + "x":-15.6364, + "y":41.4545 + }, + { + "x":-15.8182, + "y":-0.636364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":209.636, + "y":314.636 + }, + { + "height":0, + "id":436, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-20.5455, + "y":-0.0909091 + }, + { + "x":-16.1818, + "y":-15 + }, + { + "x":-6.09091, + "y":-14.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":200.091, + "y":371.091 + }, + { + "height":0, + "id":437, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.1818, + "y":-58.1818 + }, + { + "x":4.18182, + "y":-58.2727 + }, + { + "x":4.18182, + "y":-14.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":179.727, + "y":370.818 + }, + { + "height":0, + "id":438, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.181818, + "y":-53.3636 + }, + { + "x":14.3636, + "y":-53.4545 + }, + { + "x":14.2727, + "y":-0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":169.636, + "y":312.818 + }, + { + "height":0, + "id":439, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.36364, + "y":-53.4545 + }, + { + "x":14.5455, + "y":-63.6364 + }, + { + "x":14.5455, + "y":-0.272727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":169.636, + "y":259.545 + }, + { + "height":0, + "id":440, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-60.1818, + "y":3.27273 + }, + { + "x":-57, + "y":-10.1818 + }, + { + "x":10.0909, + "y":-10.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":174, + "y":206.182 + }, + { + "height":0, + "id":441, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-57.6364, + "y":0.454545 + }, + { + "x":-55.5455, + "y":-13.1818 + }, + { + "x":3, + "y":-13.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":114, + "y":209.182 + }, + { + "height":0, + "id":442, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-45.2727, + "y":-10.6364 + }, + { + "x":-28.0909, + "y":-13.9091 + }, + { + "x":2.09091, + "y":-13.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":56.4545, + "y":209.364 + }, + { + "height":0, + "id":443, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.181818, + "y":-21.1818 + }, + { + "x":17.1818, + "y":-10.6364 + }, + { + "x":16.8182, + "y":-3.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.5455, + "y":198.727 + }, + { + "height":0, + "id":444, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":46, + "y":-7.09091 + }, + { + "x":46.3636, + "y":10.0909 + }, + { + "x":17.4545, + "y":10.3636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.5455, + "y":177.818 + }, + { + "height":0, + "id":445, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":56, + "y":-0.363636 + }, + { + "x":56.3636, + "y":16.9091 + }, + { + "x":0.727273, + "y":17 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":57.2727, + "y":170.909 + }, + { + "height":0, + "id":446, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":60.6364, + "y":3.90909 + }, + { + "x":71.9091, + "y":17.2727 + }, + { + "x":0.636364, + "y":17.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":113.091, + "y":170.727 + }, + { + "height":0, + "id":447, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.54545, + "y":-59.8182 + }, + { + "x":11.2727, + "y":-55.0909 + }, + { + "x":11.1818, + "y":13.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":173.636, + "y":174.727 + }, + { + "height":0, + "id":448, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.272727, + "y":-49.2727 + }, + { + "x":15.7273, + "y":-50 + }, + { + "x":15.6364, + "y":4.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":169.273, + "y":115 + }, + { + "height":0, + "id":449, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":9.90909, + "y":-53.8182 + }, + { + "x":16.0909, + "y":-40.9091 + }, + { + "x":15.8182, + "y":-0.818182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":169.182, + "y":65.9091 + }, + { + "height":26.5455, + "id":451, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":1.5, + "fixed":false, + "friction":2, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"3, 4, 10, 11, 17, 18, 24, 25", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":26.2727, + "x":176.455, + "y":178 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lift1", + "objects":[ + { + "height":39.8182, + "id":194, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":true, + "friction":0.3, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,2,3,7,8,9", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":48, + "x":61.9697, + "y":54.9091 + }, + { + "height":0, + "id":624, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.333333, + "y":48.6667 + }, + { + "x":23, + "y":25.3333 + }, + { + "x":23.6667, + "y":0.333333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.3333, + "y":67.3333 + }, + { + "height":0, + "id":625, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":53.6667, + "y":-0.333333 + }, + { + "x":56.6667, + "y":-24 + }, + { + "x":22.6667, + "y":-24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.3333, + "y":116.667 + }, + { + "height":0, + "id":626, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":47, + "y":-0.333333 + }, + { + "x":45, + "y":-23.6667 + }, + { + "x":3.33333, + "y":-23.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":65, + "y":116.333 + }, + { + "height":0, + "id":627, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":45, + "y":0 + }, + { + "x":22, + "y":-23.3333 + }, + { + "x":-1.66667, + "y":-23.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":112, + "y":116.333 + }, + { + "height":0, + "id":628, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":-49 + }, + { + "x":-22, + "y":-49.3333 + }, + { + "x":-23, + "y":-22.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":157, + "y":116 + }, + { + "height":0, + "id":631, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-21.6667, + "y":-0.333333 + }, + { + "x":-14.6667, + "y":5 + }, + { + "x":-6.33333, + "y":5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":157, + "y":67 + }, + { + "height":0, + "id":632, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.666667, + "y":26.3333 + }, + { + "x":22, + "y":49.6667 + }, + { + "x":22.3333, + "y":0.333333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":135, + "y":66.3333 + }, + { + "height":0, + "id":633, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-24.3333, + "y":0 + }, + { + "x":-23, + "y":24 + }, + { + "x":22.6667, + "y":23.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":134.667, + "y":92.6667 + }, + { + "height":0, + "id":634, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-43, + "y":0 + }, + { + "x":-46, + "y":23.3333 + }, + { + "x":0.333333, + "y":23.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":111, + "y":93 + }, + { + "height":0, + "id":635, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-33.6667, + "y":0 + }, + { + "x":-57, + "y":24.3333 + }, + { + "x":-3, + "y":23.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":68, + "y":92.6667 + }, + { + "height":0, + "id":636, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1, + "y":-24.6667 + }, + { + "x":-22.6667, + "y":-25.3333 + }, + { + "x":-23, + "y":24.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":34, + "y":92.6667 + }, + { + "height":0, + "id":637, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-22.6667, + "y":-0.666667 + }, + { + "x":-16.6667, + "y":5.33333 + }, + { + "x":-6, + "y":5.33333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":34.6667, + "y":68 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Menu_Rect", + "objects":[ + { + "height":0, + "id":964, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":66.1818, + "y":0 + }, + { + "x":66, + "y":30.7273 + }, + { + "x":-0.545455, + "y":30.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.9091, + "y":11.2727 + }, + { + "height":0, + "id":965, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":70.7273, + "y":0 + }, + { + "x":70.5455, + "y":30.5455 + }, + { + "x":0, + "y":30.3636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":76.7273, + "y":11.6364 + }, + { + "height":0, + "id":966, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":78.9091, + "y":-0.181818 + }, + { + "x":78.5455, + "y":30.7273 + }, + { + "x":0.181818, + "y":30.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":146.909, + "y":11.6364 + }, + { + "height":0, + "id":967, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":48.7273, + "y":0 + }, + { + "x":48.7273, + "y":30.9091 + }, + { + "x":-0.181818, + "y":30.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":225.636, + "y":11.4545 + }, + { + "height":0, + "id":968, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":31.0909 + }, + { + "x":-6.18182, + "y":24.9091 + }, + { + "x":-5.27273, + "y":7.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":274.182, + "y":11.0909 + }, + { + "height":0, + "id":969, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-49.125, + "y":0 + }, + { + "x":-48.5, + "y":-31 + }, + { + "x":0.125, + "y":-30.875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":274.25, + "y":42.25 + }, + { + "height":0, + "id":970, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-78.5, + "y":0.125 + }, + { + "x":-78.625, + "y":-30.5 + }, + { + "x":0.375, + "y":-30.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":225.375, + "y":42.125 + }, + { + "height":0, + "id":971, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-70.375, + "y":-0.125 + }, + { + "x":-70.25, + "y":-30.625 + }, + { + "x":-0.375, + "y":-30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":147.125, + "y":42 + }, + { + "height":0, + "id":972, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-66.625, + "y":0 + }, + { + "x":-66.125, + "y":-30.625 + }, + { + "x":0, + "y":-30.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77, + "y":42 + }, + { + "height":0, + "id":973, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":7.125, + "y":-4.75 + }, + { + "x":7.75, + "y":-25.375 + }, + { + "x":0.5, + "y":-31 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.25, + "y":41.875 + }, + { + "ellipse":true, + "height":6.66667, + "id":974, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":6, + "x":40, + "y":22.6667 + }, + { + "ellipse":true, + "height":6.66667, + "id":975, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":7 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":6.66667, + "x":106, + "y":23.3333 + }, + { + "ellipse":true, + "height":5.33333, + "id":976, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":6, + "x":176, + "y":24.6667 + }, + { + "ellipse":true, + "height":6, + "id":977, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":5 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"", + "visible":true, + "width":6.66667, + "x":244, + "y":25.3333 + }, + { + "height":21.3333, + "id":978, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.3, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"0,1,2,6,7,8,9", + "static":true + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":26.6667, + "x":30, + "y":16 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect5", + "objects":[ + { + "height":22.7273, + "id":469, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.2, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,4,5,8,9,12,13", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":19.4545, + "x":15.4091, + "y":26.1364 + }, + { + "height":0, + "id":539, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":11.0909 + }, + { + "x":-27.2727, + "y":11.0909 + }, + { + "x":-26.9091, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38.3636, + "y":10.5455 + }, + { + "height":0, + "id":540, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.363636, + "y":32.7273 + }, + { + "x":-25.6364, + "y":32.7273 + }, + { + "x":-26.7273, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":37.8182, + "y":21.4545 + }, + { + "height":0, + "id":544, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.727273, + "y":33.0909 + }, + { + "x":-26, + "y":26.7273 + }, + { + "x":-25.8182, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38, + "y":54 + }, + { + "height":0, + "id":545, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6, + "y":37.8182 + }, + { + "x":-33.2727, + "y":37.8182 + }, + { + "x":-26.1818, + "y":-6 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38.3636, + "y":86.7273 + }, + { + "height":0, + "id":546, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":34.9091 + }, + { + "x":-39.0909, + "y":32 + }, + { + "x":-38.7273, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":44.1818, + "y":124.545 + }, + { + "height":0, + "id":547, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10, + "y":32.7273 + }, + { + "x":-28.3636, + "y":33.4545 + }, + { + "x":-39.2727, + "y":-2.72727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":44.3636, + "y":159.455 + }, + { + "height":0, + "id":548, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.09091, + "y":-6 + }, + { + "x":-14.5455, + "y":-5.81818 + }, + { + "x":-18.1818, + "y":0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":34.1818, + "y":192.182 + }, + { + "height":0, + "id":549, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.9091, + "y":-36 + }, + { + "x":28.5455, + "y":-33.4545 + }, + { + "x":18.1818, + "y":-0.545455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":16.1818, + "y":192.909 + }, + { + "height":0, + "id":550, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.545455, + "y":-32.7273 + }, + { + "x":38.9091, + "y":-32.5455 + }, + { + "x":39.0909, + "y":2.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.63636, + "y":157.273 + }, + { + "height":0, + "id":551, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6.90909, + "y":-44.3636 + }, + { + "x":33.2727, + "y":-38.1818 + }, + { + "x":39.4545, + "y":-0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.27273, + "y":125.091 + }, + { + "height":0, + "id":552, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":-26.7273 + }, + { + "x":26, + "y":-26.9091 + }, + { + "x":26.5455, + "y":6 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":12.1818, + "y":80.9091 + }, + { + "height":0, + "id":553, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1.09091, + "y":-32.9091 + }, + { + "x":25.6364, + "y":-33.0909 + }, + { + "x":26, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":12.1818, + "y":54.5455 + }, + { + "height":0, + "id":554, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-10.1818 + }, + { + "x":27.2727, + "y":-10.9091 + }, + { + "x":26.9091, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.2727, + "y":21.4545 + }, + { + "height":0, + "id":555, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.0909, + "y":-0.909091 + }, + { + "x":20.1818, + "y":3.09091 + }, + { + "x":7.81818, + "y":3.63636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.4545, + "y":11.2727 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect6", + "objects":[ + { + "height":0, + "id":1651, + "name":"", + "polygon":[ + { + "x":0.125, + "y":-0.375 + }, + { + "x":6.875, + "y":-3.125 + }, + { + "x":20, + "y":26.75 + }, + { + "x":12.125, + "y":29.875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.25, + "y":86.875 + }, + { + "height":0, + "id":1652, + "name":"", + "polygon":[ + { + "x":-0.375, + "y":-0.5 + }, + { + "x":54.125, + "y":-21.4293 + }, + { + "x":67.5417, + "y":8.75 + }, + { + "x":12.75, + "y":29.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":16.5, + "y":84.25 + }, + { + "height":0, + "id":1653, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":68.25, + "y":-25.125 + }, + { + "x":80.4583, + "y":4.91667 + }, + { + "x":13.4167, + "y":30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":70.625, + "y":62.75 + }, + { + "height":0, + "id":1654, + "name":"", + "polygon":[ + { + "x":-0.0434783, + "y":-0.565217 + }, + { + "x":74.25, + "y":-27.875 + }, + { + "x":84.625, + "y":2.125 + }, + { + "x":12, + "y":29.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":138.875, + "y":38.125 + }, + { + "height":0, + "id":1656, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":10.6667, + "y":29.8788 + }, + { + "x":4.33333, + "y":27.6667 + }, + { + "x":-3.33333, + "y":6.33333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":213, + "y":10.3333 + }, + { + "height":0, + "id":1657, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.363636 + }, + { + "x":-72.1818, + "y":27.8182 + }, + { + "x":-84.5455, + "y":-2.36364 + }, + { + "x":-10.1818, + "y":-29.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":223.273, + "y":39.8182 + }, + { + "height":0, + "id":1658, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-67.2727, + "y":25.8182 + }, + { + "x":-80.7273, + "y":-4.36364 + }, + { + "x":-12.7273, + "y":-29.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":151.455, + "y":67.2727 + }, + { + "height":0, + "id":1659, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-54.9091, + "y":20.7273 + }, + { + "x":-68, + "y":-8.90909 + }, + { + "x":-13.8182, + "y":-30 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":84.3636, + "y":92.7273 + }, + { + "height":0, + "id":1660, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-8.54545, + "y":3.63636 + }, + { + "x":-20.3636, + "y":-26.5455 + }, + { + "x":-13.6364, + "y":-29.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.8182, + "y":113.091 + }, + { + "height":0, + "id":1661, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-12.1818, + "y":-29.8182 + }, + { + "x":-7.45455, + "y":-25.6364 + }, + { + "x":1.27273, + "y":-4.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":21.4545, + "y":116.182 + }, + { + "ellipse":true, + "height":2.5, + "id":1662, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":20.5, + "y":100.5 + }, + { + "ellipse":true, + "height":2.5, + "id":1663, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":7 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.5, + "x":47.5, + "y":87.5 + }, + { + "ellipse":true, + "height":2.5, + "id":1664, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":106.5, + "y":65.5 + }, + { + "ellipse":true, + "height":3, + "id":1665, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":5 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":173, + "y":38 + }, + { + "height":16.5, + "id":1666, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.9, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"0,1,7,8", + "static":true + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":22, + "x":31.5, + "y":82 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect4", + "objects":[ + { + "height":40, + "id":210, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0, + "bullet":false, + "categorybit":8, + "density":0, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":true, + "joint_motor_speed":35, + "joint_motor_torque":15, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"0,1,14,15", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":13, + "x":12.6666, + "y":167.04 + }, + { + "height":0, + "id":1023, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-21, + "y":0 + }, + { + "x":-21.125, + "y":-35.125 + }, + { + "x":-0.125, + "y":-35.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":30.125, + "y":208.125 + }, + { + "height":0, + "id":1024, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-37.25 + }, + { + "x":-21, + "y":-37.125 + }, + { + "x":-20.875, + "y":-0.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.875, + "y":173.25 + }, + { + "height":0, + "id":1025, + "name":"", + "polygon":[ + { + "x":0.25, + "y":-0.375 + }, + { + "x":0.25, + "y":-40 + }, + { + "x":-20.875, + "y":-40.25 + }, + { + "x":-20.75, + "y":-0.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.625, + "y":136.375 + }, + { + "height":0, + "id":1027, + "name":"", + "polygon":[ + { + "x":0, + "y":0.125 + }, + { + "x":-0.25, + "y":-42.375 + }, + { + "x":-21, + "y":-42.375 + }, + { + "x":-21, + "y":-0.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.875, + "y":96.375 + }, + { + "height":0, + "id":1028, + "name":"", + "polygon":[ + { + "x":0.25, + "y":-0.375 + }, + { + "x":0.125, + "y":-40.375 + }, + { + "x":-20.875, + "y":-40.5 + }, + { + "x":-20.625, + "y":-0.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.375, + "y":54.375 + }, + { + "height":0, + "id":1029, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-21.125, + "y":-0.125 + }, + { + "x":-17.625, + "y":1.875 + }, + { + "x":-3.75, + "y":2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.5, + "y":14 + }, + { + "height":0, + "id":1030, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.25, + "y":39.875 + }, + { + "x":21.25, + "y":39.875 + }, + { + "x":21, + "y":0.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.625, + "y":14 + }, + { + "height":0, + "id":1031, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":42.5 + }, + { + "x":21, + "y":42.625 + }, + { + "x":21, + "y":0.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.875, + "y":53.75 + }, + { + "height":0, + "id":1032, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":40.25 + }, + { + "x":21, + "y":40.25 + }, + { + "x":20.875, + "y":0.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":95.875 + }, + { + "height":0, + "id":1033, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.125, + "y":37.25 + }, + { + "x":20.875, + "y":37.25 + }, + { + "x":20.625, + "y":0.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.125, + "y":135.875 + }, + { + "height":0, + "id":1034, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.125, + "y":35.25 + }, + { + "x":20.875, + "y":35.375 + }, + { + "x":20.875, + "y":0.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.25, + "y":172.75 + }, + { + "height":0, + "id":1035, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":20.875, + "y":-0.125 + }, + { + "x":17.25, + "y":-2.375 + }, + { + "x":2.625, + "y":-2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.25, + "y":208.25 + }, + { + "ellipse":true, + "height":1.75, + "id":1036, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":10 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.625, + "x":18, + "y":189 + }, + { + "ellipse":true, + "height":1.75, + "id":1037, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":9 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.75, + "x":17.875, + "y":150.75 + }, + { + "ellipse":true, + "height":2, + "id":1039, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":16.625, + "y":116.125 + }, + { + "ellipse":true, + "height":2, + "id":1040, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":7 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":17.375, + "y":73.375 + }, + { + "ellipse":true, + "height":1.875, + "id":1041, + "name":"", + "properties": + { + "bodyA":4, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":16.875, + "y":35 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect3", + "objects":[ + { + "height":22.5758, + "id":202, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0, + "fixed":false, + "friction":10, + "gravity":4, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,10", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":13.6212, + "x":13.447, + "y":152.091 + }, + { + "height":0, + "id":1042, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-20.8182, + "y":0.0909091 + }, + { + "x":-21, + "y":-42.8182 + }, + { + "x":0.181818, + "y":-42.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":30, + "y":154 + }, + { + "height":0, + "id":1043, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":-0.181818 + }, + { + "x":0.0909091, + "y":-46.0909 + }, + { + "x":-21, + "y":-48.2727 + }, + { + "x":-21, + "y":-0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":30, + "y":111.364 + }, + { + "height":0, + "id":1044, + "name":"", + "polygon":[ + { + "x":0.454545, + "y":-0.181818 + }, + { + "x":0.272727, + "y":-51.2727 + }, + { + "x":-20.8182, + "y":-51.3636 + }, + { + "x":-20.6364, + "y":-2.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.7273, + "y":65.3636 + }, + { + "height":0, + "id":1045, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-21, + "y":0 + }, + { + "x":-16.5455, + "y":2.27273 + }, + { + "x":-3.45455, + "y":2.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.9091, + "y":14.0909 + }, + { + "height":0, + "id":1046, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.0909091, + "y":48.9091 + }, + { + "x":21, + "y":50.9091 + }, + { + "x":21.0909, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9, + "y":14.1818 + }, + { + "height":0, + "id":1047, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.181818, + "y":48.1818 + }, + { + "x":20.9091, + "y":48.2727 + }, + { + "x":20.9091, + "y":2.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.18182, + "y":62.9091 + }, + { + "height":0, + "id":1048, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":43 + }, + { + "x":20.8182, + "y":42.9091 + }, + { + "x":21.0909, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.18182, + "y":111.091 + }, + { + "height":0, + "id":1049, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":20.9091, + "y":0 + }, + { + "x":18.2727, + "y":-2.09091 + }, + { + "x":3.90909, + "y":-1.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.18182, + "y":154.091 + }, + { + "ellipse":true, + "height":3, + "id":1050, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":19, + "y":131 + }, + { + "ellipse":true, + "height":3, + "id":1051, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":5 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":19, + "y":84.6667 + }, + { + "ellipse":true, + "height":3, + "id":1052, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":4 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.66667, + "x":19, + "y":37.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect2", + "objects":[ + { + "height":20.625, + "id":146, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.5, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"2,3,5,6", + "static":true + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":22.3333, + "x":185.375, + "y":12.9167 + }, + { + "height":0, + "id":1348, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.636364 + }, + { + "x":78.9697, + "y":0.515152 + }, + { + "x":79, + "y":-30.4545 + }, + { + "x":-0.0833333, + "y":-30.4924 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11, + "y":37.3333 + }, + { + "height":0, + "id":1350, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.181818 + }, + { + "x":72.5455, + "y":0.0909091 + }, + { + "x":70.7273, + "y":-30.4545 + }, + { + "x":0.272727, + "y":-30.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":89.7273, + "y":37.5455 + }, + { + "height":0, + "id":1351, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":58.9091, + "y":0.0909091 + }, + { + "x":56.9091, + "y":-30.5455 + }, + { + "x":-1.72727, + "y":-30.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":162.091, + "y":37.5455 + }, + { + "height":0, + "id":1352, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.181818 + }, + { + "x":6, + "y":0.181818 + }, + { + "x":6.18182, + "y":-30.4545 + }, + { + "x":-1.81818, + "y":-30.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":220.818, + "y":37.4545 + }, + { + "height":0, + "id":1353, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.272727, + "y":-30.4545 + }, + { + "x":-1.90909, + "y":-27.7273 + }, + { + "x":-1.90909, + "y":-3.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.727, + "y":37.5455 + }, + { + "height":0, + "id":1355, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-8, + "y":-0.0909091 + }, + { + "x":-5.90909, + "y":30.6364 + }, + { + "x":-0.181818, + "y":30.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.909, + "y":7.09091 + }, + { + "height":0, + "id":1356, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-58.7273, + "y":0 + }, + { + "x":-57, + "y":30.5455 + }, + { + "x":2, + "y":30.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":219.091, + "y":7.09091 + }, + { + "height":0, + "id":1357, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-70.4545, + "y":-0.272727 + }, + { + "x":-70.5455, + "y":30.6364 + }, + { + "x":1.63636, + "y":30.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":160.455, + "y":7.18182 + }, + { + "height":0, + "id":1358, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-79.2727, + "y":-0.0909091 + }, + { + "x":-79.0909, + "y":31.1818 + }, + { + "x":-0.272727, + "y":30.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.1818, + "y":6.90909 + }, + { + "height":0, + "id":1359, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":31.1818 + }, + { + "x":3, + "y":26.6364 + }, + { + "x":2.90909, + "y":5.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.9091, + "y":6.81818 + }, + { + "ellipse":true, + "height":3.33333, + "id":1361, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":47.6667, + "y":20.3333 + }, + { + "ellipse":true, + "height":3, + "id":1362, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":7 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.66667, + "x":118.333, + "y":20.3333 + }, + { + "ellipse":true, + "height":2.33333, + "id":1363, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.33333, + "x":192, + "y":21.3333 + }, + { + "ellipse":true, + "height":2, + "id":1364, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":5 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.66667, + "x":222.333, + "y":20 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect2_9", + "objects":[ + { + "height":20.625, + "id":1530, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.5, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"5,6", + "static":true + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":22.3333, + "x":185.375, + "y":12.9167 + }, + { + "height":0, + "id":1531, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.636364 + }, + { + "x":78.9697, + "y":0.515152 + }, + { + "x":79, + "y":-30.4545 + }, + { + "x":-0.0833333, + "y":-30.4924 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11, + "y":37.3333 + }, + { + "height":0, + "id":1532, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.181818 + }, + { + "x":72.5455, + "y":0.0909091 + }, + { + "x":70.7273, + "y":-30.4545 + }, + { + "x":0.272727, + "y":-30.6364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":89.7273, + "y":37.5455 + }, + { + "height":0, + "id":1533, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":58.9091, + "y":0.0909091 + }, + { + "x":56.9091, + "y":-30.5455 + }, + { + "x":-1.72727, + "y":-30.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":162.091, + "y":37.5455 + }, + { + "height":0, + "id":1534, + "name":"", + "polygon":[ + { + "x":0.181818, + "y":0.181818 + }, + { + "x":6, + "y":0.181818 + }, + { + "x":6.18182, + "y":-30.4545 + }, + { + "x":-1.81818, + "y":-30.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":220.818, + "y":37.4545 + }, + { + "height":0, + "id":1535, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.272727, + "y":-30.4545 + }, + { + "x":-1.90909, + "y":-27.7273 + }, + { + "x":-1.90909, + "y":-3.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.727, + "y":37.5455 + }, + { + "height":0, + "id":1536, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-8, + "y":-0.0909091 + }, + { + "x":-5.90909, + "y":30.6364 + }, + { + "x":-0.181818, + "y":30.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.909, + "y":7.09091 + }, + { + "height":0, + "id":1537, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-58.7273, + "y":0 + }, + { + "x":-57, + "y":30.5455 + }, + { + "x":2, + "y":30.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":219.091, + "y":7.09091 + }, + { + "height":0, + "id":1538, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-70.4545, + "y":-0.272727 + }, + { + "x":-70.5455, + "y":30.6364 + }, + { + "x":1.63636, + "y":30.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":160.455, + "y":7.18182 + }, + { + "height":0, + "id":1539, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-79.2727, + "y":-0.0909091 + }, + { + "x":-79.0909, + "y":31.1818 + }, + { + "x":-0.272727, + "y":30.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":90.1818, + "y":6.90909 + }, + { + "height":0, + "id":1540, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":31.1818 + }, + { + "x":3, + "y":26.6364 + }, + { + "x":2.90909, + "y":5.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.9091, + "y":6.81818 + }, + { + "ellipse":true, + "height":3.33333, + "id":1541, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":3, + "x":47.6667, + "y":20.3333 + }, + { + "ellipse":true, + "height":3, + "id":1542, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":7 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.66667, + "x":118.333, + "y":20.3333 + }, + { + "ellipse":true, + "height":2.33333, + "id":1543, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.33333, + "x":192, + "y":21.3333 + }, + { + "ellipse":true, + "height":2, + "id":1544, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":5 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.66667, + "x":222.333, + "y":20 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Menu_Rect2", + "objects":[ + { + "height":20, + "id":1001, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.3, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,2,3,4,5", + "static":true + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":22.3333, + "x":184.833, + "y":12.5 + }, + { + "height":0, + "id":1002, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":78, + "y":0.25 + }, + { + "x":77.25, + "y":31.75 + }, + { + "x":0, + "y":31.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.75, + "y":7 + }, + { + "height":0, + "id":1003, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":71.5, + "y":0 + }, + { + "x":72.25, + "y":31 + }, + { + "x":0, + "y":31 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":89.25, + "y":7.5 + }, + { + "height":0, + "id":1004, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":66.5, + "y":0.25 + }, + { + "x":66, + "y":31 + }, + { + "x":0.75, + "y":30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":160.75, + "y":8 + }, + { + "height":0, + "id":1005, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.25, + "y":30.25 + }, + { + "x":-4.5, + "y":30.75 + }, + { + "x":-5.5, + "y":0.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":227.25, + "y":8.25 + }, + { + "height":0, + "id":1006, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-65.25, + "y":-0.25 + }, + { + "x":-66, + "y":-30.5 + }, + { + "x":0.5, + "y":-30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.75, + "y":38.5 + }, + { + "height":0, + "id":1007, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-72.25, + "y":0 + }, + { + "x":-72.25, + "y":-31 + }, + { + "x":0, + "y":-31 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":161.5, + "y":38.25 + }, + { + "height":0, + "id":1008, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-77, + "y":0.5 + }, + { + "x":-77.5, + "y":-30.75 + }, + { + "x":0.75, + "y":-30.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":89.25, + "y":38 + }, + { + "height":0, + "id":1009, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1, + "y":-31.5 + }, + { + "x":6, + "y":-31.5 + }, + { + "x":7.5, + "y":0.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":12, + "y":38 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect1", + "objects":[ + { + "height":0, + "id":58, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6.18182, + "y":0 + }, + { + "x":8.39921, + "y":30.9091 + }, + { + "x":0.181818, + "y":30.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.9091, + "y":11.0909 + }, + { + "height":0, + "id":59, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":58.7273, + "y":0 + }, + { + "x":60.2421, + "y":30.8256 + }, + { + "x":2.18182, + "y":30.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.0909, + "y":11.0909 + }, + { + "height":0, + "id":60, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":71.8182, + "y":-0.181818 + }, + { + "x":72.1818, + "y":30.7273 + }, + { + "x":1.56126, + "y":30.6245 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":75.8182, + "y":11.2727 + }, + { + "height":0, + "id":61, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":78.9091, + "y":-0.181818 + }, + { + "x":79.1818, + "y":30.1591 + }, + { + "x":0.363636, + "y":30.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":147.636, + "y":11.2727 + }, + { + "height":21.75, + "id":135, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.9, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"0,1,7,8", + "static":true + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":21.25, + "x":30.25, + "y":17.25 + }, + { + "height":0, + "id":1322, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":30.3333 + }, + { + "x":-2.66667, + "y":26 + }, + { + "x":-3.33333, + "y":5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.667, + "y":11.3333 + }, + { + "height":0, + "id":1323, + "name":"", + "polygon":[ + { + "x":0.125, + "y":0.25 + }, + { + "x":-78.875, + "y":0.75 + }, + { + "x":-79.125, + "y":-29.875 + }, + { + "x":-0.375, + "y":-30.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.875, + "y":41.25 + }, + { + "height":0, + "id":1324, + "name":"", + "polygon":[ + { + "x":-0.0869565, + "y":0.217391 + }, + { + "x":-70.7283, + "y":0.179348 + }, + { + "x":-72.375, + "y":-30.625 + }, + { + "x":-0.625, + "y":-30.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":148.125, + "y":41.75 + }, + { + "height":0, + "id":1325, + "name":"", + "polygon":[ + { + "x":0.391304, + "y":0.434783 + }, + { + "x":-57.7065, + "y":0.505435 + }, + { + "x":-60, + "y":-30.5 + }, + { + "x":-1.25, + "y":-30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77, + "y":41.5 + }, + { + "height":0, + "id":1326, + "name":"", + "polygon":[ + { + "x":0.0434783, + "y":0.217391 + }, + { + "x":-7.99457, + "y":0.255435 + }, + { + "x":-8.375, + "y":-30.75 + }, + { + "x":-2.25, + "y":-30.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":19.25, + "y":41.75 + }, + { + "height":0, + "id":1327, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.25, + "y":-30.5 + }, + { + "x":1.5, + "y":-27.75 + }, + { + "x":1.75, + "y":-2.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.125, + "y":41.625 + }, + { + "ellipse":true, + "height":2, + "id":1328, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.5, + "x":15, + "y":26.75 + }, + { + "ellipse":true, + "height":2.25, + "id":1329, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":7 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":43.5, + "y":25.25 + }, + { + "ellipse":true, + "height":2, + "id":1330, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":109.75, + "y":25.75 + }, + { + "ellipse":true, + "height":2.75, + "id":1331, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":5 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.5, + "x":181.5, + "y":25 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Rect1_9", + "objects":[ + { + "height":0, + "id":1515, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6.18182, + "y":0 + }, + { + "x":8.39921, + "y":30.9091 + }, + { + "x":0.181818, + "y":30.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":10.9091, + "y":11.0909 + }, + { + "height":0, + "id":1516, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":58.7273, + "y":0 + }, + { + "x":60.2421, + "y":30.8256 + }, + { + "x":2.18182, + "y":30.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.0909, + "y":11.0909 + }, + { + "height":0, + "id":1517, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":71.8182, + "y":-0.181818 + }, + { + "x":72.1818, + "y":30.7273 + }, + { + "x":1.56126, + "y":30.6245 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":75.8182, + "y":11.2727 + }, + { + "height":0, + "id":1518, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":78.9091, + "y":-0.181818 + }, + { + "x":79.1818, + "y":30.1591 + }, + { + "x":0.363636, + "y":30.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":147.636, + "y":11.2727 + }, + { + "height":21.75, + "id":1519, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.9, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":1, + "second":0, + "sensor":false, + "spojene":"0,1,7,8", + "static":true + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":21.25, + "x":30.25, + "y":17.25 + }, + { + "height":0, + "id":1520, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":30.3333 + }, + { + "x":-2.66667, + "y":26 + }, + { + "x":-3.33333, + "y":5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.667, + "y":11.3333 + }, + { + "height":0, + "id":1521, + "name":"", + "polygon":[ + { + "x":0.125, + "y":0.25 + }, + { + "x":-78.875, + "y":0.75 + }, + { + "x":-79.125, + "y":-29.875 + }, + { + "x":-0.375, + "y":-30.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":226.875, + "y":41.25 + }, + { + "height":0, + "id":1522, + "name":"", + "polygon":[ + { + "x":-0.0869565, + "y":0.217391 + }, + { + "x":-70.7283, + "y":0.179348 + }, + { + "x":-72.375, + "y":-30.625 + }, + { + "x":-0.625, + "y":-30.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":148.125, + "y":41.75 + }, + { + "height":0, + "id":1523, + "name":"", + "polygon":[ + { + "x":0.391304, + "y":0.434783 + }, + { + "x":-57.7065, + "y":0.505435 + }, + { + "x":-60, + "y":-30.5 + }, + { + "x":-1.25, + "y":-30.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77, + "y":41.5 + }, + { + "height":0, + "id":1524, + "name":"", + "polygon":[ + { + "x":0.0434783, + "y":0.217391 + }, + { + "x":-7.99457, + "y":0.255435 + }, + { + "x":-8.375, + "y":-30.75 + }, + { + "x":-2.25, + "y":-30.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":19.25, + "y":41.75 + }, + { + "height":0, + "id":1525, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.25, + "y":-30.5 + }, + { + "x":1.5, + "y":-27.75 + }, + { + "x":1.75, + "y":-2.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.125, + "y":41.625 + }, + { + "ellipse":true, + "height":2, + "id":1526, + "name":"", + "properties": + { + "bodyA":0, + "bodyB":8 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":1.5, + "x":15, + "y":26.75 + }, + { + "ellipse":true, + "height":2.25, + "id":1527, + "name":"", + "properties": + { + "bodyA":1, + "bodyB":7 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":43.5, + "y":25.25 + }, + { + "ellipse":true, + "height":2, + "id":1528, + "name":"", + "properties": + { + "bodyA":2, + "bodyB":6 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2, + "x":109.75, + "y":25.75 + }, + { + "ellipse":true, + "height":2.75, + "id":1529, + "name":"", + "properties": + { + "bodyA":3, + "bodyB":5 + }, + "propertytypes": + { + "bodyA":"int", + "bodyB":"int" + }, + "rotation":0, + "type":"joint", + "visible":true, + "width":2.5, + "x":181.5, + "y":25 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape6", + "objects":[ + { + "height":0, + "id":863, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-99.3333, + "y":0 + }, + { + "x":-73, + "y":-40 + }, + { + "x":-29, + "y":-40.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":138, + "y":221.333 + }, + { + "height":0, + "id":864, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.909091, + "y":-86 + }, + { + "x":26, + "y":-84 + }, + { + "x":26.5455, + "y":-40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38.9091, + "y":221.091 + }, + { + "height":0, + "id":865, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27.0909, + "y":-17.0909 + }, + { + "x":2.90909, + "y":-37.0909 + }, + { + "x":26.7273, + "y":2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38.1818, + "y":135.273 + }, + { + "height":0, + "id":867, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.363636, + "y":-42.1818 + }, + { + "x":28.9091, + "y":-43.0909 + }, + { + "x":29.4545, + "y":-20 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.4545, + "y":118.182 + }, + { + "height":0, + "id":868, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-40.3636 + }, + { + "x":28.7273, + "y":-15.0909 + }, + { + "x":29.4545, + "y":-1.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.0909, + "y":76.1818 + }, + { + "height":0, + "id":869, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":46, + "y":-24.7273 + }, + { + "x":45.6364, + "y":-0.545455 + }, + { + "x":28.3636, + "y":24.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.2727, + "y":36.3636 + }, + { + "height":0, + "id":870, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":60.7273, + "y":-0.181818 + }, + { + "x":60.5455, + "y":25.2727 + }, + { + "x":-0.181818, + "y":24 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":57.0909, + "y":11.8182 + }, + { + "height":0, + "id":871, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":50.1818, + "y":24.1818 + }, + { + "x":26.5455, + "y":50 + }, + { + "x":0.181818, + "y":25.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":117.636, + "y":11.8182 + }, + { + "height":0, + "id":872, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.727273, + "y":39.8182 + }, + { + "x":-24.3636, + "y":41.8182 + }, + { + "x":-23.0909, + "y":25.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":167.273, + "y":36 + }, + { + "height":0, + "id":873, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":40.3636 + }, + { + "x":-27.8182, + "y":25.4545 + }, + { + "x":-24.5455, + "y":2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":167.636, + "y":75.6364 + }, + { + "height":0, + "id":874, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-29.4545, + "y":22.1818 + }, + { + "x":-56.5455, + "y":18.1818 + }, + { + "x":-27.4545, + "y":-14.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":167.636, + "y":115.636 + }, + { + "height":0, + "id":875, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":83.6364 + }, + { + "x":-29.2727, + "y":42.9091 + }, + { + "x":-26.7273, + "y":-3.63636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":138, + "y":137.636 + }, + { + "height":38.6667, + "id":877, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.8, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,2,3,7,11,12", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":44.3333, + "x":65, + "y":141.667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape5", + "objects":[ + { + "height":0, + "id":653, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-68.6667, + "y":139 + }, + { + "x":-106.333, + "y":73.6667 + }, + { + "x":-73, + "y":8.66667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":444.667, + "y":225.667 + }, + { + "height":0, + "id":654, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-202.333, + "y":-99.3333 + }, + { + "x":-181.667, + "y":-133.333 + }, + { + "x":-38.3333, + "y":-65.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":376, + "y":364 + }, + { + "height":0, + "id":655, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-44.3333, + "y":28 + }, + { + "x":-49.3333, + "y":-27.6667 + }, + { + "x":19.6667, + "y":-33 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":174.333, + "y":264 + }, + { + "height":0, + "id":656, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-57, + "y":-30 + }, + { + "x":-38, + "y":-69.6667 + }, + { + "x":-4, + "y":-55 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":129.667, + "y":291 + }, + { + "height":0, + "id":657, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-55.3333, + "y":-27.3333 + }, + { + "x":-1.33333, + "y":-51 + }, + { + "x":18.3333, + "y":-40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":73, + "y":261.333 + }, + { + "height":0, + "id":658, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":32.6667, + "y":-63.6667 + }, + { + "x":85, + "y":-59 + }, + { + "x":52.3333, + "y":-23.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":18.3333, + "y":234 + }, + { + "height":0, + "id":659, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":43.3333, + "y":-83.6667 + }, + { + "x":85, + "y":-59 + }, + { + "x":52, + "y":4.66667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51, + "y":170.667 + }, + { + "height":0, + "id":660, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":34, + "y":-70 + }, + { + "x":53, + "y":-20.3333 + }, + { + "x":41, + "y":24.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":95, + "y":87.3333 + }, + { + "height":0, + "id":661, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54, + "y":27 + }, + { + "x":39.6667, + "y":63.3333 + }, + { + "x":19.3333, + "y":49.3333 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":128.333, + "y":17.6667 + }, + { + "height":0, + "id":662, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":58, + "y":29.3333 + }, + { + "x":15, + "y":57 + }, + { + "x":-14, + "y":37 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":182, + "y":44.6667 + }, + { + "height":0, + "id":663, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":7.66667, + "y":55.3333 + }, + { + "x":-17.3333, + "y":91.6667 + }, + { + "x":-42.3333, + "y":27.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":239.333, + "y":74 + }, + { + "height":0, + "id":664, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":198, + "y":96.3333 + }, + { + "x":124.667, + "y":105.667 + }, + { + "x":-24.3333, + "y":36.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":246.333, + "y":129 + }, + { + "height":51, + "id":665, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.8, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,2,3,7,11,12", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":50, + "x":264, + "y":212 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape4", + "objects":[ + { + "height":0, + "id":639, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-76.5, + "y":-133.75 + }, + { + "x":-1.5, + "y":-129 + }, + { + "x":33.75, + "y":-64.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":93.75, + "y":375.25 + }, + { + "height":0, + "id":640, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":194.5, + "y":-114.5 + }, + { + "x":212.5, + "y":-77 + }, + { + "x":74.25, + "y":3.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":17.75, + "y":242.25 + }, + { + "height":0, + "id":641, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2.5, + "y":-50 + }, + { + "x":52.25, + "y":-24 + }, + { + "x":18, + "y":37.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":212, + "y":128.25 + }, + { + "height":0, + "id":642, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":57, + "y":-31.5 + }, + { + "x":79.5, + "y":7.25 + }, + { + "x":49.5, + "y":26 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":214.75, + "y":78.25 + }, + { + "height":0, + "id":643, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":54.5, + "y":-30.5 + }, + { + "x":43, + "y":28 + }, + { + "x":22.75, + "y":38.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":271.5, + "y":47 + }, + { + "height":0, + "id":644, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":35.5, + "y":63 + }, + { + "x":0.75, + "y":104 + }, + { + "x":-11, + "y":57.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":325.75, + "y":17 + }, + { + "height":0, + "id":645, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":45.75, + "y":82.5 + }, + { + "x":0.5, + "y":103.25 + }, + { + "x":-34, + "y":40.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":360.5, + "y":80 + }, + { + "height":0, + "id":646, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":37.25, + "y":68 + }, + { + "x":-14.75, + "y":55.25 + }, + { + "x":-44.25, + "y":21 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":405.5, + "y":162.25 + }, + { + "height":0, + "id":647, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-53, + "y":29.5 + }, + { + "x":-74, + "y":-2.5 + }, + { + "x":-51, + "y":-12.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":442.25, + "y":230 + }, + { + "height":0, + "id":648, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-56.25, + "y":32 + }, + { + "x":-54.5, + "y":-19 + }, + { + "x":-20.75, + "y":-31.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":389.5, + "y":259.25 + }, + { + "height":0, + "id":649, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-50.25, + "y":-25.25 + }, + { + "x":-66, + "y":-65.5 + }, + { + "x":1.75, + "y":-50.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":333.5, + "y":290.75 + }, + { + "height":0, + "id":650, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-189.25, + "y":110.25 + }, + { + "x":-156, + "y":45.75 + }, + { + "x":-15.5, + "y":-39.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":283.25, + "y":265 + }, + { + "height":52, + "id":651, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":16, + "density":0.8, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":54, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,2,3,7,11,12", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":50.5, + "x":142, + "y":218.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape3", + "objects":[ + { + "height":44.25, + "id":186, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.5, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,2,5,6", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":45, + "x":29.25, + "y":75.25 + }, + { + "height":0, + "id":412, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":71, + "y":-0.5 + }, + { + "x":49, + "y":-20 + }, + { + "x":1, + "y":-6 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51, + "y":188 + }, + { + "height":0, + "id":413, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-57.5 + }, + { + "x":-21, + "y":-56.5 + }, + { + "x":-21.5, + "y":-20.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":121.5, + "y":187.5 + }, + { + "height":0, + "id":414, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-59.8182 + }, + { + "x":-20.9091, + "y":-62 + }, + { + "x":-20.5455, + "y":0.545455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":121.182, + "y":130.364 + }, + { + "height":0, + "id":415, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-63.2727 + }, + { + "x":-21.6364, + "y":-63.2727 + }, + { + "x":-20.5455, + "y":-2.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":121.182, + "y":70.7273 + }, + { + "height":0, + "id":416, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-22.1818, + "y":0 + }, + { + "x":-21.8182, + "y":3.45455 + }, + { + "x":0, + "y":3.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":121.364, + "y":7.45455 + }, + { + "height":0, + "id":417, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.909091, + "y":60.9091 + }, + { + "x":22, + "y":62.7273 + }, + { + "x":21.6364, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":99.3636, + "y":7.63636 + }, + { + "height":0, + "id":418, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":62.7273 + }, + { + "x":20.7273, + "y":62.1818 + }, + { + "x":20.5455, + "y":2.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":100.636, + "y":68 + }, + { + "height":0, + "id":419, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":20.7273, + "y":-0.727273 + }, + { + "x":20.7273, + "y":56.9091 + }, + { + "x":-0.909091, + "y":36.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":100.818, + "y":130.909 + }, + { + "height":0, + "id":420, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-47.8182, + "y":14.1818 + }, + { + "x":-49.2727, + "y":20 + }, + { + "x":21.6364, + "y":20 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":100.091, + "y":167.636 + }, + { + "height":0, + "id":421, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-1.27273, + "y":5.81818 + }, + { + "x":0.909091, + "y":5.81818 + }, + { + "x":3.45455, + "y":-1.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.2727, + "y":182 + }], + "offsetx":23, + "offsety":16, + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape2", + "objects":[ + { + "height":0, + "id":167, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":96.6667, + "y":0 + }, + { + "x":73, + "y":40.3333 + }, + { + "x":27.3333, + "y":40 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41, + "y":12.6667 + }, + { + "height":0, + "id":168, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2, + "y":85.6667 + }, + { + "x":-24.6667, + "y":84 + }, + { + "x":-23.3333, + "y":38 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":138, + "y":13 + }, + { + "height":0, + "id":169, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.8182, + "y":17.6364 + }, + { + "x":-2, + "y":37.8182 + }, + { + "x":-26.1818, + "y":-1.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":139.818, + "y":98.3636 + }, + { + "height":0, + "id":170, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.363636, + "y":42.5455 + }, + { + "x":-28.9091, + "y":43.0909 + }, + { + "x":-29.0909, + "y":20 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":167.455, + "y":116 + }, + { + "height":0, + "id":171, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":40.5455 + }, + { + "x":-28.5455, + "y":15.6364 + }, + { + "x":-29.2727, + "y":0.909091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":167.455, + "y":158.182 + }, + { + "height":0, + "id":172, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-46.9091, + "y":0.363636 + }, + { + "x":-45.4545, + "y":-24.9091 + }, + { + "x":-28.1818, + "y":-25.0909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":167.273, + "y":198.909 + }, + { + "height":0, + "id":173, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-59.4545, + "y":0.181818 + }, + { + "x":-59.2727, + "y":-26.1818 + }, + { + "x":1.27273, + "y":-25.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":120.364, + "y":199.273 + }, + { + "height":0, + "id":174, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-52, + "y":0 + }, + { + "x":-27.2727, + "y":-26.1818 + }, + { + "x":-0.363636, + "y":-26.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":61.0909, + "y":199.455 + }, + { + "height":0, + "id":176, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.181818, + "y":-40.7273 + }, + { + "x":26.9091, + "y":-42.7273 + }, + { + "x":24.3636, + "y":-26.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.27273, + "y":199.636 + }, + { + "height":0, + "id":177, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-43.4545 + }, + { + "x":29.6364, + "y":-24.7273 + }, + { + "x":26.9091, + "y":-2 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.27273, + "y":158.909 + }, + { + "height":0, + "id":178, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":31.4545, + "y":-18.1818 + }, + { + "x":58.3636, + "y":-15.4545 + }, + { + "x":29.2727, + "y":18.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":9.45455, + "y":115.455 + }, + { + "height":0, + "id":179, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-84.3636 + }, + { + "x":26.9091, + "y":-44.7273 + }, + { + "x":26.5455, + "y":2.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":40.9091, + "y":97.0909 + }, + { + "height":43.6667, + "id":180, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":true, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"0,1,3,5,6,7,8,10", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":43.6667, + "x":68.6667, + "y":52.9997 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape1", + "objects":[ + { + "height":0, + "id":117, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":62, + "y":0.333333 + }, + { + "x":42.6667, + "y":21 + }, + { + "x":20.3333, + "y":21 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.66667, + "y":5.66667 + }, + { + "height":0, + "id":118, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":58.3333 + }, + { + "x":-19.3333, + "y":53 + }, + { + "x":-18, + "y":19.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":66.3333, + "y":6 + }, + { + "height":0, + "id":119, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-13.2727, + "y":15.8182 + }, + { + "x":-25.4545, + "y":13.6364 + }, + { + "x":-19.2727, + "y":-5.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":66.5455, + "y":64.3636 + }, + { + "height":0, + "id":120, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":52.9091 + }, + { + "x":-13.6364, + "y":54.7273 + }, + { + "x":-11.6364, + "y":-1.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":80 + }, + { + "height":0, + "id":121, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.363636, + "y":50.3636 + }, + { + "x":-11.4545, + "y":49.4545 + }, + { + "x":-13.2727, + "y":1.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":132.727 + }, + { + "height":0, + "id":122, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":42 + }, + { + "x":-10.9091, + "y":41.8182 + }, + { + "x":-11.2727, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":182.909 + }, + { + "height":0, + "id":123, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":15.4545, + "y":14.7273 + }, + { + "x":-2.54545, + "y":21.8182 + }, + { + "x":-11.0909, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":224.545 + }, + { + "height":0, + "id":124, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.27273, + "y":68.5455 + }, + { + "x":-16, + "y":46 + }, + { + "x":-17.6364, + "y":6.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":68, + "y":239.273 + }, + { + "height":0, + "id":125, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-62.9091, + "y":-0.545455 + }, + { + "x":-42.1818, + "y":-21.8182 + }, + { + "x":-16.9091, + "y":-22 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":69.0909, + "y":307.455 + }, + { + "height":0, + "id":126, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":-66.9091 + }, + { + "x":16.7273, + "y":-61.8182 + }, + { + "x":20.5455, + "y":-21.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.36364, + "y":306.909 + }, + { + "height":0, + "id":127, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":13.0909, + "y":-14.7273 + }, + { + "x":26, + "y":-14.3636 + }, + { + "x":16, + "y":4.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":7.27273, + "y":240.182 + }, + { + "height":0, + "id":128, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":-42.9091 + }, + { + "x":12.7273, + "y":-42.9091 + }, + { + "x":12.9091, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.1818, + "y":225.455 + }, + { + "height":0, + "id":129, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-49.2727 + }, + { + "x":12.3636, + "y":-48.9091 + }, + { + "x":12, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.7273, + "y":182.727 + }, + { + "height":0, + "id":130, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-53.8182 + }, + { + "x":12.5455, + "y":-53.6364 + }, + { + "x":12.5455, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.7273, + "y":133.455 + }, + { + "height":0, + "id":131, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-14.3636, + "y":-14.3636 + }, + { + "x":2.54545, + "y":-19.8182 + }, + { + "x":12.5455, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.5455, + "y":79.6364 + }, + { + "height":0, + "id":132, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2, + "y":-59.6364 + }, + { + "x":18.5455, + "y":-38.7273 + }, + { + "x":16.5455, + "y":-5.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.54545, + "y":65.2727 + }, + { + "height":18.25, + "id":134, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":true, + "categorybit":8, + "density":0.8, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"2,10,15,6", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":9.75, + "x":32.25, + "y":144.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape1_11", + "objects":[ + { + "height":0, + "id":1680, + "name":"", + "polygon":[ + { + "x":7.27272727272727, + "y":7.27272727272727 + }, + { + "x":56.4772727272727, + "y":6.833333 + }, + { + "x":42.6667, + "y":21 + }, + { + "x":20.3333, + "y":21 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.66667, + "y":5.66667 + }, + { + "height":0, + "id":1681, + "name":"", + "polygon":[ + { + "x":-5, + "y":6 + }, + { + "x":-4.58333366666667, + "y":56.7499666666667 + }, + { + "x":-19.3333, + "y":53 + }, + { + "x":-19.0909090909091, + "y":20.9394272727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":66.3333, + "y":6 + }, + { + "height":0, + "id":1682, + "name":"", + "polygon":[ + { + "x":-4.875, + "y":-1.5 + }, + { + "x":-13.2727, + "y":15.8182 + }, + { + "x":-25.4545, + "y":13.6364 + }, + { + "x":-19.5227, + "y":-5.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":66.5455, + "y":64.3636 + }, + { + "height":0, + "id":1683, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":52.9091 + }, + { + "x":-13.6364, + "y":54.7273 + }, + { + "x":-11.6364, + "y":-1.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":80 + }, + { + "height":0, + "id":1684, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.363636, + "y":50.3636 + }, + { + "x":-11.4545, + "y":49.4545 + }, + { + "x":-13.2727, + "y":1.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":132.727 + }, + { + "height":0, + "id":1685, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":42 + }, + { + "x":-10.9091, + "y":41.8182 + }, + { + "x":-11.2727, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":182.909 + }, + { + "height":0, + "id":1686, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.7045, + "y":16.2273 + }, + { + "x":-2.54545, + "y":21.8182 + }, + { + "x":-11.0909, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":224.545 + }, + { + "height":0, + "id":1687, + "name":"", + "polygon":[ + { + "x":-3.375, + "y":1.5 + }, + { + "x":-3.72727, + "y":61.9205 + }, + { + "x":-16, + "y":46 + }, + { + "x":-17.6364, + "y":6.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":68, + "y":239.273 + }, + { + "height":0, + "id":1688, + "name":"", + "polygon":[ + { + "x":-4.875, + "y":-6.375 + }, + { + "x":-55.2841, + "y":-7.170455 + }, + { + "x":-42.1818, + "y":-21.8182 + }, + { + "x":-16.9091, + "y":-22 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":69.0909, + "y":307.455 + }, + { + "height":0, + "id":1689, + "name":"", + "polygon":[ + { + "x":7.625, + "y":-7.125 + }, + { + "x":6.420455, + "y":-64.9091 + }, + { + "x":18.6023, + "y":-61.8182 + }, + { + "x":20.1705, + "y":-21.2045 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.36364, + "y":306.909 + }, + { + "height":0, + "id":1690, + "name":"", + "polygon":[ + { + "x":5.875, + "y":1.875 + }, + { + "x":13.0909, + "y":-14.7273 + }, + { + "x":26, + "y":-14.3636 + }, + { + "x":17.75, + "y":5.03408999999999 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":7.27273, + "y":240.182 + }, + { + "height":0, + "id":1691, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":-42.9091 + }, + { + "x":12.7273, + "y":-42.9091 + }, + { + "x":12.9091, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.1818, + "y":225.455 + }, + { + "height":0, + "id":1692, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-49.2727 + }, + { + "x":12.3636, + "y":-48.9091 + }, + { + "x":12, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.7273, + "y":182.727 + }, + { + "height":0, + "id":1693, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-53.8182 + }, + { + "x":12.5455, + "y":-53.6364 + }, + { + "x":12.5455, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.7273, + "y":133.455 + }, + { + "height":0, + "id":1694, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.8636, + "y":-16.1136 + }, + { + "x":4.79545, + "y":-20.0682 + }, + { + "x":12.5455, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.5455, + "y":79.6364 + }, + { + "height":0, + "id":1695, + "name":"", + "polygon":[ + { + "x":6.25, + "y":-1.75 + }, + { + "x":5.75, + "y":-51.6364 + }, + { + "x":18.5455, + "y":-38.7273 + }, + { + "x":18.9205, + "y":-5.70455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.54545, + "y":65.2727 + }, + { + "height":18.25, + "id":1696, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":false, + "friction":2, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"2,10,15,6", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":9.75, + "x":32.25, + "y":144.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Shape1_9", + "objects":[ + { + "height":0, + "id":1545, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":62, + "y":0.333333 + }, + { + "x":42.6667, + "y":21 + }, + { + "x":20.3333, + "y":21 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.66667, + "y":5.66667 + }, + { + "height":0, + "id":1546, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.333333, + "y":58.3333 + }, + { + "x":-19.3333, + "y":53 + }, + { + "x":-18, + "y":19.6667 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":66.3333, + "y":6 + }, + { + "height":0, + "id":1547, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-13.2727, + "y":15.8182 + }, + { + "x":-25.4545, + "y":13.6364 + }, + { + "x":-19.2727, + "y":-5.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":66.5455, + "y":64.3636 + }, + { + "height":0, + "id":1548, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":52.9091 + }, + { + "x":-13.6364, + "y":54.7273 + }, + { + "x":-11.6364, + "y":-1.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":80 + }, + { + "height":0, + "id":1549, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.363636, + "y":50.3636 + }, + { + "x":-11.4545, + "y":49.4545 + }, + { + "x":-13.2727, + "y":1.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":132.727 + }, + { + "height":0, + "id":1550, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":42 + }, + { + "x":-10.9091, + "y":41.8182 + }, + { + "x":-11.2727, + "y":-0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":182.909 + }, + { + "height":0, + "id":1551, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":15.4545, + "y":14.7273 + }, + { + "x":-2.54545, + "y":21.8182 + }, + { + "x":-11.0909, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.9091, + "y":224.545 + }, + { + "height":0, + "id":1552, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.27273, + "y":68.5455 + }, + { + "x":-16, + "y":46 + }, + { + "x":-17.6364, + "y":6.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":68, + "y":239.273 + }, + { + "height":0, + "id":1553, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-62.9091, + "y":-0.545455 + }, + { + "x":-42.1818, + "y":-21.8182 + }, + { + "x":-16.9091, + "y":-22 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":69.0909, + "y":307.455 + }, + { + "height":0, + "id":1554, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":-66.9091 + }, + { + "x":16.7273, + "y":-61.8182 + }, + { + "x":20.5455, + "y":-21.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.36364, + "y":306.909 + }, + { + "height":0, + "id":1555, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":13.0909, + "y":-14.7273 + }, + { + "x":26, + "y":-14.3636 + }, + { + "x":16, + "y":4.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":7.27273, + "y":240.182 + }, + { + "height":0, + "id":1556, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.545455, + "y":-42.9091 + }, + { + "x":12.7273, + "y":-42.9091 + }, + { + "x":12.9091, + "y":0.363636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.1818, + "y":225.455 + }, + { + "height":0, + "id":1557, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-49.2727 + }, + { + "x":12.3636, + "y":-48.9091 + }, + { + "x":12, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.7273, + "y":182.727 + }, + { + "height":0, + "id":1558, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-53.8182 + }, + { + "x":12.5455, + "y":-53.6364 + }, + { + "x":12.5455, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.7273, + "y":133.455 + }, + { + "height":0, + "id":1559, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-14.3636, + "y":-14.3636 + }, + { + "x":2.54545, + "y":-19.8182 + }, + { + "x":12.5455, + "y":0.181818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":20.5455, + "y":79.6364 + }, + { + "height":0, + "id":1560, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2, + "y":-59.6364 + }, + { + "x":18.5455, + "y":-38.7273 + }, + { + "x":16.5455, + "y":-5.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.54545, + "y":65.2727 + }, + { + "height":22, + "id":1561, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":32, + "density":1.5, + "fixed":false, + "friction":2, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":62, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"2,10,15,6", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":9.75, + "x":32.25, + "y":141.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Triangle1", + "objects":[ + { + "height":0, + "id":62, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":33.6364, + "y":-18.7273 + }, + { + "x":57.4545, + "y":-15.4545 + }, + { + "x":45.4545, + "y":-8.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.54545, + "y":40.9091 + }, + { + "height":0, + "id":63, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":30.1818, + "y":-18.9091 + }, + { + "x":31.6364, + "y":-2 + }, + { + "x":23.6364, + "y":3.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38, + "y":22.3636 + }, + { + "height":0, + "id":64, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":25.6364, + "y":20.1818 + }, + { + "x":11.8182, + "y":24.5455 + }, + { + "x":1.63636, + "y":16.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":68, + "y":3.45455 + }, + { + "height":0, + "id":65, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":26.5455, + "y":20.9091 + }, + { + "x":-2.54545, + "y":12.7273 + }, + { + "x":-13.4545, + "y":4.72727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":93.2727, + "y":23.4545 + }, + { + "height":0, + "id":67, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-56, + "y":-1.09091 + }, + { + "x":-50, + "y":-10.5455 + }, + { + "x":-29.0909, + "y":-7.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":119.818, + "y":44.1818 + }, + { + "height":0, + "id":68, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-59.6364, + "y":-1.81818 + }, + { + "x":-14, + "y":-10.5455 + }, + { + "x":5.63636, + "y":-9.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":64.1818, + "y":42.9091 + }, + { + "height":4.54545, + "id":69, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.4, + "fixed":false, + "friction":0.5, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,3", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":4.90909, + "x":67, + "y":26.7273 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Triangle2", + "objects":[ + { + "height":0, + "id":71, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":42.3636, + "y":-36.5455 + }, + { + "x":58, + "y":-25.6364 + }, + { + "x":39.4545, + "y":-14.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":2.90909, + "y":75.6364 + }, + { + "height":0, + "id":73, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":37.0909, + "y":-33.8182 + }, + { + "x":27.6364, + "y":-3.81818 + }, + { + "x":15.4545, + "y":10.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.2727, + "y":39.0909 + }, + { + "height":0, + "id":74, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.181818, + "y":35.4545 + }, + { + "x":-9.09091, + "y":39.8182 + }, + { + "x":-8.90909, + "y":29.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":82.1818, + "y":5.45455 + }, + { + "height":0, + "id":75, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.545455, + "y":34.9091 + }, + { + "x":-9.45455, + "y":20.5455 + }, + { + "x":-8.72727, + "y":4.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":82.1818, + "y":40.7273 + }, + { + "height":0, + "id":76, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-35.0909, + "y":0.181818 + }, + { + "x":-28.5455, + "y":-14 + }, + { + "x":-8.54545, + "y":-13.8182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":81.4545, + "y":75.2727 + }, + { + "height":0, + "id":78, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-43.8182, + "y":0.545455 + }, + { + "x":-4.36364, + "y":-14.5455 + }, + { + "x":6.18182, + "y":-14.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":46.7273, + "y":75.4545 + }, + { + "height":5.27273, + "id":79, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.3, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"3,5", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":5.27273, + "x":62, + "y":52 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Cube1", + "objects":[ + { + "height":0, + "id":80, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":20.1818, + "y":0 + }, + { + "x":28.9091, + "y":15.2727 + }, + { + "x":22.5455, + "y":18.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.81818, + "y":5.45455 + }, + { + "height":0, + "id":81, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":24.25, + "y":-0.0625 + }, + { + "x":21.3125, + "y":15.125 + }, + { + "x":8.6875, + "y":15.1875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":25.875, + "y":5.4375 + }, + { + "height":0, + "id":82, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.125, + "y":0.3125 + }, + { + "x":4.75, + "y":18.625 + }, + { + "x":-2.8125, + "y":15.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":50, + "y":5.375 + }, + { + "height":0, + "id":83, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5, + "y":28.3125 + }, + { + "x":-19.875, + "y":27.375 + }, + { + "x":-22.125, + "y":18.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":76.9375, + "y":5.6875 + }, + { + "height":0, + "id":84, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.0625, + "y":27.625 + }, + { + "x":-22.4375, + "y":8.125 + }, + { + "x":-20.1875, + "y":-0.8125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.3125, + "y":33.875 + }, + { + "height":0, + "id":85, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-26.3125, + "y":0.3125 + }, + { + "x":-30.3125, + "y":-16.4375 + }, + { + "x":-22.3125, + "y":-19.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.3125, + "y":61.5 + }, + { + "height":0, + "id":86, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-22, + "y":-0.0625 + }, + { + "x":-17, + "y":-16.625 + }, + { + "x":-4.0625, + "y":-16.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51, + "y":61.6875 + }, + { + "height":0, + "id":87, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-24, + "y":-0.0625 + }, + { + "x":-1.1875, + "y":-19.625 + }, + { + "x":4.8125, + "y":-16.5625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.125, + "y":61.625 + }, + { + "height":0, + "id":88, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.125, + "y":-31.375 + }, + { + "x":19.6875, + "y":-28.625 + }, + { + "x":22.6875, + "y":-19.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.1875, + "y":61.4375 + }, + { + "height":0, + "id":89, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5625, + "y":-24.6875 + }, + { + "x":23.125, + "y":-6.375 + }, + { + "x":19.5625, + "y":2.6875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.25, + "y":30.0625 + }, + { + "height":16.5, + "id":90, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.4, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":16.5, + "x":32.75, + "y":23.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Menu_Cube1", + "objects":[ + { + "height":0, + "id":990, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":20.1818, + "y":0 + }, + { + "x":28.9091, + "y":15.2727 + }, + { + "x":22.5455, + "y":18.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.81818, + "y":5.45455 + }, + { + "height":0, + "id":991, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":24.25, + "y":-0.0625 + }, + { + "x":21.3125, + "y":15.125 + }, + { + "x":8.6875, + "y":15.1875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":25.875, + "y":5.4375 + }, + { + "height":0, + "id":992, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.125, + "y":0.3125 + }, + { + "x":4.75, + "y":18.625 + }, + { + "x":-2.8125, + "y":15.125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":50, + "y":5.375 + }, + { + "height":0, + "id":993, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5, + "y":28.3125 + }, + { + "x":-19.875, + "y":27.375 + }, + { + "x":-22.125, + "y":18.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":76.9375, + "y":5.6875 + }, + { + "height":0, + "id":994, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.0625, + "y":27.625 + }, + { + "x":-22.4375, + "y":8.125 + }, + { + "x":-20.1875, + "y":-0.8125 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.3125, + "y":33.875 + }, + { + "height":0, + "id":995, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-26.3125, + "y":0.3125 + }, + { + "x":-30.3125, + "y":-16.4375 + }, + { + "x":-22.3125, + "y":-19.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":77.3125, + "y":61.5 + }, + { + "height":0, + "id":996, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-22, + "y":-0.0625 + }, + { + "x":-17, + "y":-16.625 + }, + { + "x":-4.0625, + "y":-16.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":51, + "y":61.6875 + }, + { + "height":0, + "id":997, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-24, + "y":-0.0625 + }, + { + "x":-1.1875, + "y":-19.625 + }, + { + "x":4.8125, + "y":-16.5625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":29.125, + "y":61.625 + }, + { + "height":0, + "id":998, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.125, + "y":-31.375 + }, + { + "x":19.6875, + "y":-28.625 + }, + { + "x":22.6875, + "y":-19.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.1875, + "y":61.4375 + }, + { + "height":0, + "id":999, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5625, + "y":-24.6875 + }, + { + "x":23.125, + "y":-6.375 + }, + { + "x":19.5625, + "y":2.6875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.25, + "y":30.0625 + }, + { + "height":16.5, + "id":1000, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.4, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"2,3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":16.5, + "x":32.75, + "y":23.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Cube2", + "objects":[ + { + "height":0, + "id":91, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":35.75, + "y":-7.25 + }, + { + "x":52.25, + "y":2.25 + }, + { + "x":30.5, + "y":7.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.25, + "y":28.5 + }, + { + "height":0, + "id":92, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39.25, + "y":-8.5 + }, + { + "x":39, + "y":4.5 + }, + { + "x":16.25, + "y":9.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":44.25, + "y":21.25 + }, + { + "height":0, + "id":93, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":41, + "y":0.25 + }, + { + "x":25, + "y":11 + }, + { + "x":-0.5, + "y":13 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":83.5, + "y":12.75 + }, + { + "height":0, + "id":94, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5, + "y":35.75 + }, + { + "x":-16.5, + "y":31 + }, + { + "x":-15.5, + "y":11 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.75, + "y":13 + }, + { + "height":0, + "id":95, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.25, + "y":20.75 + }, + { + "x":-21.75, + "y":8 + }, + { + "x":-16.25, + "y":-4.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":124, + "y":48.5 + }, + { + "height":0, + "id":96, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-41, + "y":-0.25 + }, + { + "x":-41.25, + "y":-12.25 + }, + { + "x":-21.5, + "y":-12.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.75, + "y":69.25 + }, + { + "height":0, + "id":97, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-35, + "y":0 + }, + { + "x":-29.75, + "y":-12.5 + }, + { + "x":-1, + "y":-12 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":83, + "y":69 + }, + { + "height":0, + "id":98, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-40, + "y":0.5 + }, + { + "x":-13.5, + "y":-13.75 + }, + { + "x":5, + "y":-12.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":48.25, + "y":69 + }, + { + "height":0, + "id":99, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-18.25 + }, + { + "x":18.25, + "y":-24.25 + }, + { + "x":25.75, + "y":-13.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.5, + "y":69.25 + }, + { + "height":0, + "id":100, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-22.75 + }, + { + "x":30.5, + "y":-15 + }, + { + "x":18.25, + "y":-6.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.5, + "y":51.25 + }, + { + "height":15.5, + "id":101, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.4, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"3,8" + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":27.25, + "x":54, + "y":38.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Menu_Cube2", + "objects":[ + { + "height":0, + "id":979, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":35.75, + "y":-7.25 + }, + { + "x":52.25, + "y":2.25 + }, + { + "x":30.5, + "y":7.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.25, + "y":28.5 + }, + { + "height":0, + "id":980, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":39.25, + "y":-8.5 + }, + { + "x":39, + "y":4.5 + }, + { + "x":16.25, + "y":9.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":44.25, + "y":21.25 + }, + { + "height":0, + "id":981, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":41, + "y":0.25 + }, + { + "x":25, + "y":11 + }, + { + "x":-0.5, + "y":13 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":83.5, + "y":12.75 + }, + { + "height":0, + "id":982, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.5, + "y":35.75 + }, + { + "x":-16.5, + "y":31 + }, + { + "x":-15.5, + "y":11 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.75, + "y":13 + }, + { + "height":0, + "id":983, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.25, + "y":20.75 + }, + { + "x":-21.75, + "y":8 + }, + { + "x":-16.25, + "y":-4.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":124, + "y":48.5 + }, + { + "height":0, + "id":984, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-41, + "y":-0.25 + }, + { + "x":-41.25, + "y":-12.25 + }, + { + "x":-21.5, + "y":-12.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":123.75, + "y":69.25 + }, + { + "height":0, + "id":985, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-35, + "y":0 + }, + { + "x":-29.75, + "y":-12.5 + }, + { + "x":-1, + "y":-12 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":83, + "y":69 + }, + { + "height":0, + "id":986, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-40, + "y":0.5 + }, + { + "x":-13.5, + "y":-13.75 + }, + { + "x":5, + "y":-12.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":48.25, + "y":69 + }, + { + "height":0, + "id":987, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-18.25 + }, + { + "x":18.25, + "y":-24.25 + }, + { + "x":25.75, + "y":-13.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.5, + "y":69.25 + }, + { + "height":0, + "id":988, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0, + "y":-22.75 + }, + { + "x":30.5, + "y":-15 + }, + { + "x":18.25, + "y":-6.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.5, + "y":51.25 + }, + { + "height":15.5, + "id":989, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.4, + "fixed":false, + "friction":0.5, + "gravity":3, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":5, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"2,3,8" + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":27.25, + "x":54, + "y":38.75 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Cube3", + "objects":[ + { + "height":0, + "id":104, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":13.375, + "y":0.25 + }, + { + "x":15.25, + "y":25.25 + }, + { + "x":9.375, + "y":30.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.625, + "y":9.5 + }, + { + "height":0, + "id":105, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":10.25, + "y":0.125 + }, + { + "x":10.75, + "y":25.125 + }, + { + "x":2, + "y":25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":24.875, + "y":9.75 + }, + { + "height":0, + "id":106, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":13.375, + "y":0.125 + }, + { + "x":6, + "y":30.75 + }, + { + "x":0.75, + "y":24.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":34.875, + "y":10 + }, + { + "height":0, + "id":107, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.375, + "y":46.5 + }, + { + "x":-5, + "y":46.125 + }, + { + "x":-7.25, + "y":30.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":48.125, + "y":10 + }, + { + "height":0, + "id":108, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.625, + "y":48 + }, + { + "x":-11.25, + "y":15.5 + }, + { + "x":-9.25, + "y":-0.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":52.375, + "y":56.5 + }, + { + "height":0, + "id":109, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-19, + "y":-0.125 + }, + { + "x":-21.375, + "y":-27.875 + }, + { + "x":-15.75, + "y":-32.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":56.875, + "y":104.375 + }, + { + "height":0, + "id":112, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-16.875, + "y":0 + }, + { + "x":-12.25, + "y":-27 + }, + { + "x":-2.5, + "y":-27.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":37.875, + "y":104.125 + }, + { + "height":0, + "id":113, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-16.75, + "y":0 + }, + { + "x":-0.125, + "y":-33.125 + }, + { + "x":4.75, + "y":-26.875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":21.125, + "y":104 + }, + { + "height":0, + "id":114, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3.875, + "y":-53 + }, + { + "x":14.5, + "y":-47.75 + }, + { + "x":16.375, + "y":-32.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.5, + "y":103.75 + }, + { + "height":0, + "id":115, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3.375, + "y":-41.5 + }, + { + "x":12.75, + "y":-11.375 + }, + { + "x":10.75, + "y":4.875 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":8.375, + "y":51.125 + }, + { + "height":28.625, + "id":116, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.4, + "fixed":false, + "friction":0.5, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"3,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":12.75, + "x":24.25, + "y":40.9583 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Wheel3", + "objects":[ + { + "height":0, + "id":1065, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":12.75, + "y":5 + }, + { + "x":7.625, + "y":11.5 + }, + { + "x":-0.125, + "y":9 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":25, + "y":4.625 + }, + { + "height":0, + "id":1073, + "name":"", + "polygon":[ + { + "x":0.0434783, + "y":0.130435 + }, + { + "x":7.52174, + "y":12.3478 + }, + { + "x":-1.47826, + "y":14.4783 + }, + { + "x":-4.95652, + "y":6.47826 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":37.6087, + "y":9.6087 + }, + { + "height":0, + "id":1074, + "name":"", + "polygon":[ + { + "x":0.130435, + "y":0.0869565 + }, + { + "x":-1.73913, + "y":14.2609 + }, + { + "x":-10, + "y":9.17391 + }, + { + "x":-8.82609, + "y":2.17391 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45.0435, + "y":21.8261 + }, + { + "height":0, + "id":1075, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-11.2609, + "y":9.52174 + }, + { + "x":-14.2609, + "y":1 + }, + { + "x":-8.17391, + "y":-5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":43.2609, + "y":36 + }, + { + "height":0, + "id":1076, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-14, + "y":-0.0869565 + }, + { + "x":-10.9565, + "y":-8.34783 + }, + { + "x":-3.04348, + "y":-8.43478 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":32.0435, + "y":45.4348 + }, + { + "height":0, + "id":1077, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-11.1739, + "y":-9.17391 + }, + { + "x":-4.08696, + "y":-13.2174 + }, + { + "x":2.91304, + "y":-8.26087 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":18.1739, + "y":45.2609 + }, + { + "height":0, + "id":1078, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2.17391, + "y":-14.0435 + }, + { + "x":5.91304, + "y":-13.087 + }, + { + "x":6.95652, + "y":-4.08696 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":7.13043, + "y":36.087 + }, + { + "height":0, + "id":1079, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":6.78261, + "y":-12.4348 + }, + { + "x":13.0435, + "y":-6.17391 + }, + { + "x":8, + "y":0.913043 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.04348, + "y":22.087 + }, + { + "height":0, + "id":1080, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":13.087, + "y":-5.13043 + }, + { + "x":12.9565, + "y":3.86957 + }, + { + "x":6.13043, + "y":6.17391 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":11.913, + "y":9.73913 + }, + { + "height":12.9091, + "id":1081, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":2, + "bounce":0, + "bullet":true, + "categorybit":2, + "density":0.75, + "fixed":false, + "friction":50, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0, + "maskbit":58, + "object_type":7, + "second":0, + "sensor":false, + "spojene":"0,4,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":12.3636, + "x":18.7273, + "y":19.0909 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Wheel2", + "objects":[ + { + "height":0, + "id":360, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":16, + "y":4.625 + }, + { + "x":10.125, + "y":14 + }, + { + "x":-0.375, + "y":11.125 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":38.75, + "y":5.125 + }, + { + "height":0, + "id":361, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.875, + "y":12.625 + }, + { + "x":1.75, + "y":17.75 + }, + { + "x":-6.125, + "y":9.125 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":54.875, + "y":10 + }, + { + "height":0, + "id":362, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":3.5, + "y":15.375 + }, + { + "x":-7.75, + "y":15.375 + }, + { + "x":-9.875, + "y":5.125 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":66.5, + "y":22.5 + }, + { + "height":0, + "id":363, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-4.25, + "y":16.125 + }, + { + "x":-14.875, + "y":10.25 + }, + { + "x":-10.875, + "y":0.125 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":69.875, + "y":37.75 + }, + { + "height":0, + "id":364, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-12.5, + "y":12.375 + }, + { + "x":-18.5, + "y":1.75 + }, + { + "x":-10.375, + "y":-5.5 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":65.5, + "y":53.625 + }, + { + "height":0, + "id":365, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-16.375, + "y":3.375 + }, + { + "x":-16, + "y":-8.875 + }, + { + "x":-5.875, + "y":-10.75 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":53.125, + "y":65.875 + }, + { + "height":0, + "id":366, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-17, + "y":-4.625 + }, + { + "x":-10, + "y":-14.625 + }, + { + "x":0.125, + "y":-12.25 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":36.875, + "y":69.25 + }, + { + "height":0, + "id":367, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-12.125, + "y":-12.625 + }, + { + "x":-1, + "y":-18.5 + }, + { + "x":6.75, + "y":-9.75 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":20.125, + "y":64.625 + }, + { + "height":0, + "id":368, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.5, + "y":-16.875 + }, + { + "x":8.125, + "y":-16.25 + }, + { + "x":10.5, + "y":-5.875 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":8.5, + "y":52.125 + }, + { + "height":0, + "id":369, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.75, + "y":-15.125 + }, + { + "x":14.75, + "y":-9.625 + }, + { + "x":11.625, + "y":0.375 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":5.125, + "y":35.375 + }, + { + "height":0, + "id":370, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":12.125, + "y":-11.375 + }, + { + "x":18.5, + "y":-1.75 + }, + { + "x":9.875, + "y":5.5 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":9.875, + "y":20.375 + }, + { + "height":0, + "id":371, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":16.5, + "y":-3.875 + }, + { + "x":16.375, + "y":7.25 + }, + { + "x":6.25, + "y":9.75 + }], + "rotation":0, + "type":"bod", + "visible":false, + "width":0, + "x":22, + "y":9 + }, + { + "height":16.75, + "id":372, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":3, + "bounce":0, + "bullet":true, + "categorybit":2, + "density":0.75, + "fixed":false, + "friction":20, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":58, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"0,4,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":false, + "width":18, + "x":28.625, + "y":30.125 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Wheel1", + "objects":[ + { + "height":11.3636, + "id":1, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":2, + "bounce":0, + "bullet":true, + "categorybit":2, + "density":0.75, + "fixed":false, + "friction":20, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":58, + "object_type":5, + "second":0, + "sensor":false, + "spojene":"0,4,8", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":11.6364, + "x":19.7273, + "y":20.2727 + }, + { + "height":0, + "id":33, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":10.6364, + "y":3.09091 + }, + { + "x":4.54545, + "y":13 + }, + { + "x":-0.545455, + "y":11.9091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":26.1818, + "y":3.90909 + }, + { + "height":0, + "id":34, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8.36364, + "y":9 + }, + { + "x":-1.90909, + "y":14 + }, + { + "x":-5.81818, + "y":9.72727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":36.6364, + "y":7.09091 + }, + { + "height":0, + "id":35, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2.18182, + "y":10.7273 + }, + { + "x":-9.90909, + "y":10.8182 + }, + { + "x":-10.2727, + "y":4.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":45, + "y":16.1818 + }, + { + "height":0, + "id":36, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-3.09091, + "y":10 + }, + { + "x":-13.1818, + "y":4.18182 + }, + { + "x":-11.9091, + "y":0.0909091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":47.0909, + "y":26.9091 + }, + { + "height":0, + "id":37, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-8.36364, + "y":7.90909 + }, + { + "x":-14, + "y":-1.72727 + }, + { + "x":-9.81818, + "y":-5.72727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":44, + "y":36.8182 + }, + { + "height":0, + "id":38, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.6364, + "y":2.36364 + }, + { + "x":-10.9091, + "y":-8.72727 + }, + { + "x":-5.63636, + "y":-9.63636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":35.6364, + "y":44.6364 + }, + { + "height":0, + "id":39, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-10.8182, + "y":-3 + }, + { + "x":-5.18182, + "y":-12.2727 + }, + { + "x":-0.272727, + "y":-11 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":25, + "y":47 + }, + { + "height":0, + "id":40, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-7.63636, + "y":-7.90909 + }, + { + "x":2.45455, + "y":-13.0909 + }, + { + "x":5.36364, + "y":-9.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":14.3636, + "y":44 + }, + { + "height":0, + "id":41, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2.81818, + "y":-11.0909 + }, + { + "x":9.09091, + "y":-11.1818 + }, + { + "x":10, + "y":-5.27273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.81818, + "y":36.1818 + }, + { + "height":0, + "id":42, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2.90909, + "y":-10.3636 + }, + { + "x":13, + "y":-5.09091 + }, + { + "x":12.1818, + "y":-0.272727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4, + "y":25.1818 + }, + { + "height":0, + "id":43, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":8, + "y":-8.27273 + }, + { + "x":13.3636, + "y":2.18182 + }, + { + "x":10.1818, + "y":5.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":6.90909, + "y":15 + }, + { + "height":0, + "id":44, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":11.3636, + "y":-3 + }, + { + "x":10.8182, + "y":8.90909 + }, + { + "x":5.54545, + "y":10.3636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":14.7273, + "y":6.90909 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Lift8", + "objects":[ + { + "height":0, + "id":1083, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":27.4545, + "y":0 + }, + { + "x":27.0909, + "y":26 + }, + { + "x":0.181818, + "y":48.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":14.7273, + "y":68.1818 + }, + { + "height":0, + "id":1084, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":70.5455, + "y":0 + }, + { + "x":73.6364, + "y":-22.5455 + }, + { + "x":26.7273, + "y":-22 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":15.2727, + "y":116.182 + }, + { + "height":0, + "id":1086, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":60.9091, + "y":0.181818 + }, + { + "x":57.8182, + "y":-22.5455 + }, + { + "x":3.09091, + "y":-22.3636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":85.6364, + "y":116 + }, + { + "height":0, + "id":1087, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":59.6364, + "y":0 + }, + { + "x":35.4545, + "y":-22.3636 + }, + { + "x":-2.72727, + "y":-22.5455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":146, + "y":116 + }, + { + "height":0, + "id":1088, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.181818, + "y":-48.1818 + }, + { + "x":-25.6364, + "y":-48.1818 + }, + { + "x":-23.8182, + "y":-22.1818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":205.273, + "y":116 + }, + { + "height":0, + "id":1089, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-24.75, + "y":0 + }, + { + "x":-21.75, + "y":2.75 + }, + { + "x":-3.75, + "y":2.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":205, + "y":68 + }, + { + "height":0, + "id":1090, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.75, + "y":25.75 + }, + { + "x":26, + "y":48.25 + }, + { + "x":25.5, + "y":0 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":179.75, + "y":67.75 + }, + { + "height":0, + "id":1091, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-39, + "y":0 + }, + { + "x":-36, + "y":22.75 + }, + { + "x":23.5, + "y":22.25 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":182, + "y":93.5 + }, + { + "height":0, + "id":1092, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-54.875, + "y":0.125 + }, + { + "x":-57.875, + "y":22.875 + }, + { + "x":2.75, + "y":22.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":143.625, + "y":93.5 + }, + { + "height":0, + "id":1093, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-47, + "y":0.375 + }, + { + "x":-74.25, + "y":22.875 + }, + { + "x":-3.125, + "y":22.375 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":89, + "y":93.75 + }, + { + "height":0, + "id":1094, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.375, + "y":-26.25 + }, + { + "x":-27.375, + "y":-26.375 + }, + { + "x":-26.375, + "y":21.5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41.875, + "y":94.625 + }, + { + "height":0, + "id":1095, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-27.375, + "y":-0.125 + }, + { + "x":-20.75, + "y":1.875 + }, + { + "x":-6.125, + "y":1.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41.875, + "y":68.25 + }, + { + "height":39.5, + "id":1097, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":false, + "categorybit":8, + "density":0.8, + "fixed":true, + "friction":0.3, + "gravity":2, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":46, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"1,2,3,7,8,9", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":64.5, + "x":79.5, + "y":56.5 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck3", + "objects":[ + { + "height":0, + "id":1053, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":29.2727, + "y":-0.545455 + }, + { + "x":26, + "y":7.09091 + }, + { + "x":7.63636, + "y":8.18182 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":2.72727, + "y":3.63636 + }, + { + "height":0, + "id":1054, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":22.5455, + "y":16.7273 + }, + { + "x":20.7273, + "y":26.9091 + }, + { + "x":-3.09091, + "y":7.63636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":31.6364, + "y":3.09091 + }, + { + "height":0, + "id":1057, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":80.1818, + "y":17.4545 + }, + { + "x":51.8182, + "y":18 + }, + { + "x":-1.81818, + "y":10.3636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":54, + "y":19.8182 + }, + { + "height":0, + "id":1059, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":1.45455, + "y":8.72727 + }, + { + "x":-23.0909, + "y":3.09091 + }, + { + "x":-28.1818, + "y":0.727273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":133.636, + "y":37.0909 + }, + { + "height":0, + "id":1060, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-49.8182, + "y":1.81818 + }, + { + "x":-49.4545, + "y":-5.63636 + }, + { + "x":-24.5455, + "y":-5.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":134.909, + "y":45.4545 + }, + { + "height":0, + "id":1061, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-44.3636, + "y":0.727273 + }, + { + "x":-43.8182, + "y":-4.90909 + }, + { + "x":0.181818, + "y":-6.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":85.2727, + "y":46.7273 + }, + { + "height":0, + "id":1062, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-36.3636, + "y":0.545455 + }, + { + "x":-28.3636, + "y":-16.1818 + }, + { + "x":0.545455, + "y":-5.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":41.2727, + "y":47.0909 + }, + { + "height":0, + "id":1063, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-2.72727, + "y":-44 + }, + { + "x":4.90909, + "y":-35.6364 + }, + { + "x":7.45455, + "y":-16.3636 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":5.27273, + "y":47.4545 + }, + { + "height":15.25, + "id":1064, + "name":"", + "properties": + { + "angulardamp":0, + "arc":0, + "bounce":0.1, + "bullet":true, + "categorybit":4, + "density":0.85, + "fixed":false, + "friction":20, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.1, + "maskbit":60, + "object_type":4, + "second":0, + "sensor":false, + "spojene":"3,4,5", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":103.75, + "x":14.75, + "y":39.75 + }, + { + "height":3.66667, + "id":1250, + "name":"", + "properties": + { + "angulardamp":0.2, + "bounce":0.1, + "bullet":true, + "categorybit":4, + "density":0.85, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":60, + "object_type":4, + "second":0, + "sensor":false, + "spojene":"3,4,5", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"center", + "visible":true, + "width":11, + "x":47.3333, + "y":33.3333 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck2", + "objects":[ + { + "height":0, + "id":346, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":52.5455, + "y":-0.181818 + }, + { + "x":42, + "y":6.36364 + }, + { + "x":10.1818, + "y":6.54545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":12, + "y":3.27273 + }, + { + "height":0, + "id":347, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":9.27273, + "y":37.8182 + }, + { + "x":-3.81818, + "y":39.0909 + }, + { + "x":-10.3636, + "y":6.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":64.3636, + "y":3.09091 + }, + { + "height":0, + "id":348, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":38.5455, + "y":4.72727 + }, + { + "x":26.7273, + "y":17.8182 + }, + { + "x":-13.0909, + "y":1.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":73.6364, + "y":40.7273 + }, + { + "height":0, + "id":349, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":2.72727, + "y":39.4545 + }, + { + "x":-10, + "y":26.7273 + }, + { + "x":-11.2727, + "y":13.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":111.636, + "y":45.4545 + }, + { + "height":0, + "id":350, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-43.0909, + "y":1.09091 + }, + { + "x":-49.4545, + "y":-15.0909 + }, + { + "x":-12.3636, + "y":-12.7273 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":114.182, + "y":85.0909 + }, + { + "height":0, + "id":355, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-68.125, + "y":-3 + }, + { + "x":-48, + "y":-15.875 + }, + { + "x":-6, + "y":-16 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":71, + "y":86.125 + }, + { + "height":0, + "id":356, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.375, + "y":-45.625 + }, + { + "x":16.125, + "y":-40.875 + }, + { + "x":19.625, + "y":-12.75 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":3.125, + "y":83 + }, + { + "height":0, + "id":357, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":4.375, + "y":-34.5 + }, + { + "x":14.375, + "y":-27.875 + }, + { + "x":11.5, + "y":4.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":7.75, + "y":37.75 + }, + { + "height":14.5241, + "id":358, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":true, + "categorybit":4, + "density":0.85, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":60, + "object_type":4, + "second":0, + "sensor":false, + "spojene":"3,4,5", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":3.11704, + "type":"mid", + "visible":true, + "width":92.6382, + "x":21.5442, + "y":73.7097 + }, + { + "height":10.6667, + "id":1249, + "name":"", + "properties": + { + "angulardamp":0.2, + "bounce":0.1, + "bullet":true, + "categorybit":4, + "density":0.85, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":60, + "object_type":4, + "second":0, + "sensor":false, + "spojene":"3,4,5", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"center", + "visible":true, + "width":17.3333, + "x":47, + "y":50.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Auto_Truck", + "objects":[ + { + "height":0, + "id":1634, + "name":"", + "polygon":[ + { + "x":-0.0222222, + "y":0.377778 + }, + { + "x":40, + "y":0.25 + }, + { + "x":25.625, + "y":16.25 + }, + { + "x":7.625, + "y":15.625 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":71.125, + "y":6.625 + }, + { + "height":0, + "id":1635, + "name":"", + "polygon":[ + { + "x":0.391304, + "y":-0.26087 + }, + { + "x":4.11413, + "y":31.7935 + }, + { + "x":-10.875, + "y":36.875 + }, + { + "x":-13.9674, + "y":15.7663 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":110.75, + "y":7.125 + }, + { + "height":0, + "id":1636, + "name":"", + "polygon":[ + { + "x":1.17391, + "y":-0.130435 + }, + { + "x":4.375, + "y":22.75 + }, + { + "x":-10.5, + "y":32.875 + }, + { + "x":-13.875, + "y":5 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":113.75, + "y":39 + }, + { + "height":0, + "id":1638, + "name":"", + "polygon":[ + { + "x":0.26087, + "y":0.26087 + }, + { + "x":57.625, + "y":1 + }, + { + "x":-13.75, + "y":16 + }, + { + "x":-14.625, + "y":10.356 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":117.875, + "y":61.5 + }, + { + "height":0, + "id":1639, + "name":"", + "polygon":[ + { + "x":0.5625, + "y":0.15625 + }, + { + "x":1, + "y":25.0909 + }, + { + "x":-42.9091, + "y":15 + }, + { + "x":-70.7429, + "y":15.1349 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":174.909, + "y":62.3636 + }, + { + "height":0, + "id":1640, + "name":"", + "polygon":[ + { + "x":-0.03125, + "y":0 + }, + { + "x":-59.664, + "y":-0.494071 + }, + { + "x":-43.7049, + "y":-4.26105 + }, + { + "x":-43.956, + "y":-10.081 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":176, + "y":87.4545 + }, + { + "height":0, + "id":1641, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-49, + "y":0.545455 + }, + { + "x":-44.2727, + "y":-14.9091 + }, + { + "x":16.0909, + "y":-3.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":116.273, + "y":87 + }, + { + "height":0, + "id":1642, + "name":"", + "polygon":[ + { + "x":-0.26087, + "y":0.130435 + }, + { + "x":-29.5415, + "y":-0.189723 + }, + { + "x":-26.2411, + "y":-19.996 + }, + { + "x":4.54545, + "y":-15.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":67.5455, + "y":87.3636 + }, + { + "height":0, + "id":1643, + "name":"", + "polygon":[ + { + "x":-0.478261, + "y":0.0434783 + }, + { + "x":-24.9328, + "y":-14.1265 + }, + { + "x":-14.2648, + "y":-20.917 + }, + { + "x":2.80632, + "y":-19.6285 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":38.4545, + "y":87 + }, + { + "height":0, + "id":1644, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.52983, + "y":-23.9304 + }, + { + "x":8.92756, + "y":-13.7841 + }, + { + "x":10.7273, + "y":-6.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":13.4545, + "y":72.9091 + }, + { + "height":0, + "id":1645, + "name":"", + "polygon":[ + { + "x":-0.09375, + "y":-0.734375 + }, + { + "x":44.9154, + "y":-7.70581 + }, + { + "x":58.3596, + "y":-0.838384 + }, + { + "x":8.27273, + "y":9.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":14.0909, + "y":49.7273 + }, + { + "height":0, + "id":1646, + "name":"", + "polygon":[ + { + "x":0.155556, + "y":-0.533333 + }, + { + "x":12.2949, + "y":-35.5556 + }, + { + "x":19.9535, + "y":-20.2525 + }, + { + "x":13.6364, + "y":6.36364 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":58.8182, + "y":42.5455 + }, + { + "height":20.3333, + "id":1648, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":true, + "categorybit":32, + "density":1, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":62, + "object_type":0, + "second":0, + "sensor":false, + "spojene":"4,6", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":20.3333, + "x":73, + "y":40.3333 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "name":"Truck1", + "objects":[ + { + "height":14.5455, + "id":45, + "name":"", + "properties": + { + "angulardamp":0.2, + "arc":0, + "bounce":0.1, + "bullet":true, + "categorybit":4, + "density":0.75, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":60, + "object_type":4, + "second":0, + "sensor":false, + "spojene":"4,6,7", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "arc":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"mid", + "visible":true, + "width":74.3636, + "x":22.9091, + "y":67.8182 + }, + { + "height":0, + "id":48, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":55.2727, + "y":-0.363636 + }, + { + "x":65.2727, + "y":6.90909 + }, + { + "x":21.4545, + "y":6.90909 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.18182, + "y":36 + }, + { + "height":0, + "id":49, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.727273, + "y":-24.9091 + }, + { + "x":9.45455, + "y":-16.3636 + }, + { + "x":9.81818, + "y":7.45455 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":59.4545, + "y":35.4545 + }, + { + "height":0, + "id":50, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":36.5455, + "y":-0.181818 + }, + { + "x":29.4545, + "y":7.63636 + }, + { + "x":8.36364, + "y":8 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":60.3636, + "y":11.0909 + }, + { + "height":0, + "id":52, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":14.7273, + "y":40 + }, + { + "x":1.63636, + "y":32.7273 + }, + { + "x":-6.90909, + "y":7.81818 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":96.7273, + "y":10.9091 + }, + { + "height":0, + "id":53, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":0.363636, + "y":12.3636 + }, + { + "x":-21.0909, + "y":0.181818 + }, + { + "x":-12.5455, + "y":-7.09091 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":111.091, + "y":50.9091 + }, + { + "height":0, + "id":54, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-53.4545, + "y":0.181818 + }, + { + "x":-53.6364, + "y":-11.4545 + }, + { + "x":-21.2727, + "y":-12 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":111.455, + "y":63.0909 + }, + { + "height":0, + "id":55, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-53.2727, + "y":0.181818 + }, + { + "x":-31.2727, + "y":-11.6364 + }, + { + "x":0, + "y":-11.2727 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":58, + "y":62.9091 + }, + { + "height":0, + "id":56, + "name":"", + "polygon":[ + { + "x":0, + "y":0 + }, + { + "x":-0.545455, + "y":-26.5455 + }, + { + "x":20.7273, + "y":-20 + }, + { + "x":21.8182, + "y":-11.4545 + }], + "rotation":0, + "type":"bod", + "visible":true, + "width":0, + "x":4.90909, + "y":62.9091 + }, + { + "height":4, + "id":1248, + "name":"", + "properties": + { + "angulardamp":0.2, + "bounce":0.1, + "bullet":true, + "categorybit":4, + "density":0.75, + "fixed":false, + "friction":4, + "gravity":1, + "joint_limit":true, + "joint_low_limit":0, + "joint_motor":false, + "joint_motor_speed":0, + "joint_motor_torque":0, + "joint_type":0, + "joint_up_limit":0, + "linerdamp":0.2, + "maskbit":60, + "object_type":4, + "second":0, + "sensor":false, + "spojene":"4,6,7", + "static":false + }, + "propertytypes": + { + "angulardamp":"float", + "bounce":"float", + "bullet":"bool", + "categorybit":"int", + "density":"float", + "fixed":"bool", + "friction":"float", + "gravity":"float", + "joint_limit":"bool", + "joint_low_limit":"int", + "joint_motor":"bool", + "joint_motor_speed":"float", + "joint_motor_torque":"float", + "joint_type":"int", + "joint_up_limit":"int", + "linerdamp":"float", + "maskbit":"int", + "object_type":"int", + "second":"int", + "sensor":"bool", + "spojene":"string", + "static":"bool" + }, + "rotation":0, + "type":"center", + "visible":true, + "width":12, + "x":54.6667, + "y":45.6667 + }], + "opacity":1, + "type":"objectgroup", + "visible":false, + "x":0, + "y":0 + }], + "nextobjectid":1697, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.1.3", + "tileheight":16, + "tilesets":[], + "tilewidth":16, + "type":"map", + "version":1, + "width":60 +} \ No newline at end of file diff --git a/jellytruck/js/state/boot.js b/jellytruck/js/state/boot.js new file mode 100644 index 0000000000000000000000000000000000000000..08407728106dead3943f467a9ee43ce103ceadb6 --- /dev/null +++ b/jellytruck/js/state/boot.js @@ -0,0 +1,196 @@ +"use strict"; +var orientated = false; + +window.JellyTruck.state.boot = { + preload: function () { + // this.game.plugins.add(Phaser.Plugin.AdvancedTiming, {mode: 'text'}); + this.game.load.image("title", "assets/menu/title.png"); + this.game.load.image("splash", "assets/Loading/splash_coolmath.png"); + this.game.load.image("loadbg", "assets/Loading/loader.png"); + this.game.load.image("bar", "assets/Loading/preload.png"); + this.game.sound.autoplay = true; + //this.game.forceSingleUpdate = false; + this.game.time.advancedTiming = true; + + //this.game.physics.box2d.frameRate = 1/60; + //this.game.physics.box2d.velocityIterations = 2.5; + //this.game.physics.box2d.positionIterations = 2.5; + //this.game.physics.box2d.useElapsedTime=true; + + this.game.physics.startSystem(Phaser.Physics.BOX2D); + this.game.physics.box2d.useElapsedTime = true; + this.game.physics.box2d.frameRate = 1/60; + this.game.physics.box2d.physicsElapsed = 1/60; + + if(navigator.userAgent.match(/iPhone|iPad|iPod/i)){ + //set Box2D + this.game.physics.box2d.gravity.y = 800; + this.game.physics.box2d.friction = 0.8; + this.game.physics.box2d.ptmRatio = 50; + this.game.physics.box2d.velocityIterations = 5; + this.game.physics.box2d.positionIterations = 6; + } + if (navigator.userAgent.match(/Android|BlackBerry|Opera Mini|IEMobile/i)) { + //set Box2D + this.game.physics.box2d.gravity.y = 800; + this.game.physics.box2d.friction = 0.8; + this.game.physics.box2d.ptmRatio = 50; + this.game.physics.box2d.velocityIterations = 4.5; + this.game.physics.box2d.positionIterations = 6; + } + else{ + //set Box2D + this.game.physics.box2d.gravity.y = 800; + this.game.physics.box2d.friction = 0.8; + this.game.physics.box2d.ptmRatio = 50; + this.game.physics.box2d.velocityIterations = 4.5; + this.game.physics.box2d.positionIterations = 6; + } + + this.game.scale.pageAlignVertically = true; + this.game.scale.pageAlignHorizontally = true; + + // forces orientation. First parameter is for landscape, 2nd - portrait. Enable only one + this.game.scale.forceOrientation(true, false); + + //orientation change callback functions + this.game.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this); + this.game.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this); + + // set world size + this.game.world.setBounds(0, 0, 8000,4000); + + // enable resize + this.enableScaling(); + if (!jt.trace) { + console.log = function () {} + } + }, + create: function () { + // add all game states + for (var stateName in window.JellyTruck.state) { + this.game.state.add(stateName, window.JellyTruck.state[stateName]); + } + var gameWidth = 800; + var gameHeight = 480; + var gameObject = this; + var deviceWidth; + var deviceHeight; + this.game.stage.backgroundColor = '#000000'; + this.game.stage.disableVisibilityChange = true; + this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + + if (!this.game.device.desktop) { + deviceWidth = window.innerWidth; + deviceHeight = window.innerHeight; + if (deviceHeight > deviceWidth) { + document.getElementById('orientation').style.width = deviceWidth + "px"; + document.getElementById('orientation').style.height = deviceHeight + "px"; + } + } + if (this.game.device.desktop) { + // If you have any desktop specific settings, they can go in here + this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.game.scale.minWidth = gameWidth / 2; + this.game.scale.minHeight = gameHeight / 2; + this.game.scale.maxWidth = gameWidth; + this.game.scale.maxHeight = gameHeight; + this.game.scale.pageAlignHorizontally = false; + this.game.scale.pageAlignVertically = true; + } + else { + // Same goes for mobile settings. + // In this case we're saying "scale the game, no lower than 480x260 and no higher than 1024x768" + //scaling options + this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.game.scale.minWidth = gameWidth / 2; + this.game.scale.minHeight = gameHeight / 2; + this.game.scale.maxWidth = 2048; + // IPad change + var gameObj = this; + //You can change this to gameWidth*2.5 if needed + //this.scale.maxHeight = 1228; + + if (gameObj.game.device.iPad === true) { + this.game.scale.maxHeight = 1228; + } else { + this.game.scale.maxHeight = 736; + } + //Make sure these values are proportional to the gameWidth and gameHeight + this.scale.pageAlignHorizontally = false; + this.game.scale.pageAlignVertically = true; + //var gameObj = this; + + this.game.scale.forceOrientation(true, false); + this.game.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this); + this.game.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this); + + this.game.scale.refresh(); + if (this.game.scale.isLandscape) { + this.leaveIncorrectOrientation(); + } else { + this.enterIncorrectOrientation(); + } + if (this.game.scale.isLandscape && (gameObj.game.device.iPhone === true || gameObj.game.device.iPad === true)) { + this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + } + window.addEventListener("orientationchange", function () { + /*if (screen.width < screen.height) { + gameObj.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + //document.getElementById('orientation').style.width = document.width + "px"; + //document.getElementById('orientation').style.height = document.height + "px"; + document.getElementById('orientation').style.width = "100%"; + document.getElementById('orientation').style.height = "100%"; + gameObj.enterIncorrectOrientation(); + } + else { + gameObj.leaveIncorrectOrientation(); + gameObj.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + } + + if (gameObj.game.device.iPhone === true || gameObj.game.device.iPad === true) { + if (window.matchMedia("(orientation: portrait)").matches) { + // you're in PORTRAIT mode + gameObj.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + gameObj.enterIncorrectOrientation(); + } + if (window.matchMedia("(orientation: landscape)").matches) { + // you're in LANDSCAPE mode + gameObj.leaveIncorrectOrientation(); + gameObj.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + } + }*/ + }); + } + //console.log(this.game.device.ieVersion + " " + navigator.userAgent + " " + navigator.appVersion.indexOf("Windows NT 10.0")); + if(this.game.device.ieVersion === 11 && navigator.appVersion.indexOf("Windows NT 10.0") !== -1 ){ + document.getElementById('msg').style.display = 'block'; + } + else{ + // goto load state + document.getElementById('msg').style.display = 'none'; + this.game.state.start("load"); + } + }, + enableScaling: function () { + var game = this.game; + game.scale.parentIsWindow = (game.canvas.parentNode == document.body); + game.scale.scaleMode = Phaser.ScaleManager.NO_SCALE; + }, + enterIncorrectOrientation: function () { + this.game.sound.stopAll(); + this.game.sound.volume = 0; + document.getElementById('orientation').style.width = "100%"; + document.getElementById('orientation').style.height = "100%"; + this.game.scale.refresh(); + document.getElementById('orientation').style.display = 'block'; + + }, + leaveIncorrectOrientation: function () { + this.game.sound.stopAll(); + this.game.sound.volume = 0.8; + document.getElementById('orientation').style.display = 'none'; + }, + shutdown:function(){ + } +}; \ No newline at end of file diff --git a/jellytruck/js/state/demo.js b/jellytruck/js/state/demo.js new file mode 100644 index 0000000000000000000000000000000000000000..66e2db5198cea93459a796628fe3401fcb9d1a14 --- /dev/null +++ b/jellytruck/js/state/demo.js @@ -0,0 +1,21 @@ +/* + * This file is automatically loaded from state/load.js + * to change default state - change state/load.js at line: 34 + */ +"use strict"; +window.JellyTruck.state.demo = { + create: function(){ + // create all objects + var all = mt.createAll(); + + // prevent pause on focus lost + this.game.stage.disableVisibilityChange = true; + + // start __main movie for all objects + for(var i in all){ + if(all[i].mt.movies && all[i].mt.movies.__main){ + all[i].mt.movies.__main.start().loop(); + } + } + } +}; \ No newline at end of file diff --git a/jellytruck/js/state/load.js b/jellytruck/js/state/load.js new file mode 100644 index 0000000000000000000000000000000000000000..4de4eaa1a6f78df234c2d1949a13cc77962af5a4 --- /dev/null +++ b/jellytruck/js/state/load.js @@ -0,0 +1,293 @@ +"use strict"; +var images; +window.JellyTruck.state.load = { + preload: function(){ + // we have preloaded assets required for Loading group objects in the Boot state + this.ready = false; + this.title = this.game.add.sprite(this.game.width/2+20,this.game.height/2-50,"splash"); + this.title.anchor.set(0.5,0.5); + + /*this.load_border = this.game.add.sprite(this.game.width/2,this.game.height/2+50,"loadbg"); + this.load_border.anchor.set(0.5,0.5); + this.bar = this.game.add.sprite(this.game.width/2-95,this.game.height/2+50,"bar"); + this.bar.anchor.set(0,0.5); + this.game.load.setPreloadSprite(this.bar);*/ + this.text = this.game.add.text(this.game.width/2+15, this.game.height/2+40, "Loading...", { font: "22px king_cool_kc",fill: '#ffffff' }); + this.text.anchor.set(0.5,0.5); + /* this.press_txt; + if(navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) + { + this.press_txt = this.game.add.text(this.game.width/2, this.game.height/2+220, "Tap to Continue", { font: "22px king_cool_kc",fill: '#ffffff' }); + this.press_txt.anchor.set(0.5,0.5); + this.press_txt.visible=false; + } + else + { + + this.press_txt = this.game.add.text(this.game.width/2, this.game.height/2+220, "Click to Continue", { font: "22px king_cool_kc",fill: '#ffffff' }); + this.press_txt.anchor.set(0.5,0.5); + this.press_txt.visible=false; + }*/ + + //Loading asset File + this.game.load.image("bg", "assets/background/bg.png"); + this.game.load.image("bg_light", "assets/background/bg_light.png"); + + //Game Ui and Menu + this.game.load.image("menubg", "assets/menu/menu_bg.png"); + this.game.load.image("menu_paint", "assets/menu/paint.png"); + this.game.load.spritesheet("playthegame", "assets/menu/play.png", 154, 151); + this.game.load.spritesheet("howtoplay", "assets/menu/help.png", 144, 139); + this.game.load.spritesheet("options", "assets/menu/options.png", 138, 137); + this.game.load.spritesheet("radio_button", "assets/menu/radio_button.png", 44,39); + this.game.load.spritesheet("options_choose_level", "assets/menu/options_choose_level.png",94,91); + this.game.load.spritesheet("option_main_menu", "assets/menu/option_main_menu.png",94,91); + this.game.load.spritesheet("fxIcon", "assets/menu/fx.png",47,48); + this.game.load.spritesheet("soundIcon", "assets/menu/sound.png",46,48); + this.game.load.spritesheet("pauseIcon", "assets/menu/pause.png",42,45); + this.game.load.spritesheet("restartIcon", "assets/menu/restart.png",44,46); + this.game.load.atlasJSONHash("leaf1", "assets/menu/leaf1.png", "assets/menu/leafData.json"); + this.game.load.atlasJSONHash("yellow_leaf", "assets/menu/yellow_leaf.png", "assets/menu/leafData.json"); + this.game.load.spritesheet("level_bg", "assets/menu/level_bg.png",93,88); + this.game.load.image("level_lock", "assets/menu/level_lock.png"); + this.game.load.spritesheet("back_btn", "assets/menu/back_btn.png",66,68); + this.game.load.spritesheet("next_mission", "assets/menu/next_mission.png",104,102); + this.game.load.spritesheet("downArrow", "assets/texture/down_arrow.png", 58, 96, 50); + this.game.load.image("3_star", "assets/menu/3_star.png"); + this.game.load.image("how_to_play_popup", "assets/menu/how_to_play_popup.png"); + this.game.load.image("how_to_play_popup_mobile", "assets/menu/how_to_play_popup_mobile.png"); + this.game.load.image("closeBtn", "assets/menu/closeBtn.png"); + this.game.load.spritesheet("level_restart", "assets/menu/level_restart.png",105,103); + this.game.load.image("mill_bolt", "assets/texture/bolt.png"); + this.game.load.image("flag_head", "assets/texture/flag_head.png"); + this.game.load.image("flag_mid", "assets/texture/flag_mid.png"); + this.game.load.image("flag_bot", "assets/texture/flag_bot.png"); + this.game.load.image("Truck1", "assets/truck/Truck1.png"); + this.game.load.image("Truck2", "assets/truck/Truck2.png"); + this.game.load.image("Truck3", "assets/truck/Truck3.png"); + this.game.load.image("Wheel", "assets/truck/wheel.png"); + this.game.load.image("Enemy_Truck", "assets/truck/enemy_truck.png"); + this.game.load.image("Enemy_Truck_Back", "assets/truck/enemy_wheel_back.png"); + this.game.load.image("Enemy_Truck_Front", "assets/truck/enemy_wheel_front.png"); + this.game.load.image("gum_1", "assets/texture/gum_1.png"); + this.game.load.image("gum_2", "assets/texture/gum_2.png"); + this.game.load.image("gum_3", "assets/texture/gum_3.png"); + this.game.load.image("gum_4", "assets/texture/gum_4.png"); + this.game.load.image("gum_5", "assets/texture/gum_5.png"); + this.game.load.image("gum_6", "assets/texture/gum_6.png"); + this.game.load.image("gum_7", "assets/texture/gum_7.png"); + this.game.load.image("hallow", "assets/texture/hallow.png"); + this.game.load.image("rope1", "assets/texture/rope1.png"); + this.game.load.image("crusher", "assets/texture/crusher0002.png"); + this.game.load.image("lift_mask", "assets/texture/platform_mark.png"); + this.game.load.image("mill1", "assets/texture/mill1.png"); + this.game.load.image("mill2", "assets/texture/mill2.png"); + this.game.load.image("truck2_icon", "assets/truck/truck2_icon.png"); + this.game.load.image("arrow14", "assets/texture/arrow14.png"); + this.game.load.image("level_8_door_1", "assets/texture/level_8_door_1.png"); + this.game.load.image("level_8_door_2", "assets/texture/level_8_door_2.png"); + this.game.load.image("truck3_icon", "assets/truck/truck3_icon.png"); + this.game.load.image("star01", "assets/menu/star01.png"); + this.game.load.image("star02", "assets/menu/star02.png"); + this.game.load.image("go_img", "assets/menu/go_img.png"); + this.game.load.image("stop_img", "assets/menu/stop_img.png"); + this.game.load.image("left_bt", "assets/menu/left.png"); + this.game.load.image("right_bt", "assets/menu/right.png"); + this.game.load.image("ballIcon13", "assets/texture/ballIcon13.png"); + this.game.load.image("mill3", "assets/texture/mill3.png"); + this.game.load.image("bridge2", "assets/texture/bridge2.png"); + this.game.load.image("Box1", "assets/texture/Box1.png"); + this.game.load.image("Box2", "assets/texture/Box2.png"); + this.game.load.image("bridge12", "assets/texture/bridge12.png"); + this.game.load.image("bolt12", "assets/texture/bolt12.png"); + this.game.load.image("bridge15", "assets/texture/bridge15.png"); + this.game.load.image("crusher0001", "assets/texture/crusher0001.png"); + this.game.load.image("box17_small", "assets/texture/box17_small.png"); + this.game.load.image("box17_long", "assets/texture/box17_long.png"); + this.game.load.image("bridge17", "assets/texture/bridge17.png"); + this.game.load.image("mill17_1", "assets/texture/mill17_1.png"); + this.game.load.image("mill17_2", "assets/texture/mill17_2.png"); + this.game.load.image("bar17", "assets/texture/bar17.png"); + this.game.load.image("barWheel17", "assets/texture/barWheel17.png"); + this.game.load.image("bridge18", "assets/texture/bridge18.png"); + this.game.load.image("crusher0005", "assets/texture/crusher0005.png"); + this.game.load.spritesheet("balloonBurst", "assets/texture/balloonburst.png", 555, 453, 7); + this.game.load.image("mill18_2", "assets/texture/mill18_2.png"); + this.game.load.image("mill18_3", "assets/texture/mill18_3.png"); + this.game.load.image("Blade_mill", "assets/texture/Blade_mill.png"); + this.game.load.image("yellow_hor_bar", "assets/texture/yellow_hor_bar.png"); + this.game.load.image("small_orange_ver_bar", "assets/texture/small_orange_ver_bar.png"); + this.game.load.image("red_ver_bar", "assets/texture/red_ver_bar.png"); + this.game.load.image("orange_hor_bar", "assets/texture/orange_hor_bar.png"); + this.game.load.image("dark_orange_ver_bar", "assets/texture/dark_orange_ver_bar.png"); + this.game.load.spritesheet("balloonBurst", "assets/texture/balloonburst.png", 555, 453, 7); + this.game.load.image("options_popup", "assets/menu/options_popup.png"); + + this.game.load.audio("truck_bang2",["assets/sounds/mp3/100_truck_bang2.mp3","assets/sounds/m4a/100_truck_bang2.m4a"]); + //this.game.load.spritesheet("buttonvertical", "assets/menu/button-vertical.png",64,64); + //this.game.load.spritesheet("buttonhorizontal", "assets/menu/button-horizontal.png",96,64); + + this.game.load.image("menu_scene", "assets/scene/menu_scene.png"); + this.game.load.image("scene_1", "assets/scene/scene_1.png"); + this.game.load.image("scene_2", "assets/scene/scene_2.png"); + this.game.load.image("scene_3", "assets/scene/scene_3.png"); + this.game.load.image("scene_4", "assets/scene/scene_4.png"); + this.game.load.image("scene_5", "assets/scene/scene_5.png"); + this.game.load.image("scene_5_2", "assets/scene/scene_5_2.png"); + this.game.load.image("scene_6", "assets/scene/scene_6.png"); + this.game.load.image("scene_7", "assets/scene/scene_7.png"); + this.game.load.image("scene_8", "assets/scene/scene_8.png"); + this.game.load.image("scene_9", "assets/scene/scene_9.png"); + this.game.load.image("scene_10", "assets/scene/scene_10.png"); + this.game.load.image("scene_11", "assets/scene/scene_11.png"); + this.game.load.image("scene_12", "assets/scene/scene_12.png"); + this.game.load.image("scene_13", "assets/scene/scene_13.png"); + this.game.load.image("scene_14", "assets/scene/scene_14.png"); + this.game.load.image("scene_15", "assets/scene/scene_15.png"); + this.game.load.image("scene_16", "assets/scene/scene_16.png"); + this.game.load.image("scene_17", "assets/scene/scene_17.png"); + this.game.load.image("scene_18", "assets/scene/scene_18.png"); + this.game.load.image("scene_19", "assets/scene/scene_19.png"); + this.game.load.image("scene_20", "assets/scene/scene_20.png"); + + this.game.load.image("menu_ground", "assets/ground/menu_ground.png"); + this.game.load.image("ground_1", "assets/ground/ground_1.png"); + this.game.load.image("ground_2", "assets/ground/ground_2.png"); + this.game.load.image("ground_3", "assets/ground/ground_3.png"); + this.game.load.image("ground_4", "assets/ground/ground_4.png"); + //this.game.load.image("ground_5", "assets/ground/ground_5.png"); + this.game.load.image("ground_6", "assets/ground/ground_6.png"); + this.game.load.image("ground_7", "assets/ground/ground_7.png"); + this.game.load.image("ground_9", "assets/ground/ground_9.png"); + //this.game.load.image("ground_10", "assets/ground/ground_10.png"); + this.game.load.image("ground_12", "assets/ground/ground_12.png"); + this.game.load.image("ground_13", "assets/ground/ground_13.png"); + this.game.load.image("ground_14", "assets/ground/ground_14.png"); + //this.game.load.image("ground_15", "assets/ground/ground_15.png"); + //this.game.load.image("ground_16", "assets/ground/ground_16.png"); + this.game.load.image("ground_17", "assets/ground/ground_17.png"); + this.game.load.image("ground_19", "assets/ground/ground_19.png"); + this.game.load.image("ground_20", "assets/ground/ground_20.png"); + //this.game.load.image("ground_mask","assets/ground/ground_mask.png"); + + this.game.load.tilemap("map", "js/physics.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("menu_map", "js/data/menu.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_1_map", "js/data/Level01.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_2_map", "js/data/Level02.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_3_map", "js/data/Level03.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_4_map", "js/data/Level04.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_5_map", "js/data/Level05.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_6_map", "js/data/Level06.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_7_map", "js/data/Level07.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_8_map", "js/data/Level08.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_9_map", "js/data/Level09.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_10_map", "js/data/Level10.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_11_map", "js/data/Level11.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_12_map", "js/data/Level12.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_13_map", "js/data/Level13.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_14_map", "js/data/Level14.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_15_map", "js/data/Level15.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_16_map", "js/data/Level16.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_17_map", "js/data/Level17.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_18_map", "js/data/Level18.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_19_map", "js/data/Level19.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.tilemap("level_20_map", "js/data/Level20.json", null, Phaser.Tilemap.TILED_JSON); + this.game.load.physics("legoData", "js/lego.json"); + + this.game.load.audio("bgmusic", ["assets/sounds/mp3/93_melodia1.mp3","assets/sounds/m4a/93_melodia1.m4a"]); + this.game.load.audio("odd_music",["assets/sounds/mp3/92_melodia2a.mp3","assets/sounds/m4a/92_melodia2a.m4a"]); + this.game.load.audio("even_music",["assets/sounds/mp3/74_melodia2.mp3","assets/sounds/m4a/74_melodia2.m4a"]); + this.game.load.audio("truck_slow",["assets/sounds/mp3/84_truck_slow.mp3","assets/sounds/m4a/84_truck_slow.m4a"]); + this.game.load.audio("truck_speed",["assets/sounds/mp3/80_truck_speed.mp3","assets/sounds/m4a/80_truck_speed.m4a"]); + this.game.load.audio("truck_idle",["assets/sounds/mp3/94_truck_idle.mp3","assets/sounds/m4a/94_truck_idle.m4a"]); + this.game.load.audio("truck_bang1",["assets/sounds/mp3/99_truck_bang1.mp3","assets/sounds/m4a/99_truck_bang1.m4a"]); + this.game.load.audio("truck_change",["assets/sounds/mp3/70_truck_hit.mp3","assets/sounds/m4a/70_truck_hit.m4a"]); + this.game.load.audio("truck_wobble1", ["assets/sounds/mp3/83_wo11.mp3","assets/sounds/m4a/83_wo11.m4a"]); + this.game.load.audio("truck_wobble2", ["assets/sounds/mp3/82_wo22.mp3","assets/sounds/m4a/82_wo22.m4a"]); + this.game.load.audio("truck_wobble3", ["assets/sounds/mp3/81_wo33.mp3","assets/sounds/m4a/81_wo33.m4a"]); + this.game.load.audio("truck_start",["assets/sounds/mp3/77_truck_start.mp3","assets/sounds/m4a/77_truck_start.m4a"]); + this.game.load.audio("button_over", ["assets/sounds/mp3/98_zvuk_over.mp3","assets/sounds/m4a/98_zvuk_over.m4a"]); + this.game.load.audio("button_click", ["assets/sounds/mp3/68_zvuk_click.mp3","assets/sounds/m4a/68_zvuk_click.m4a"]); + this.game.load.audio("bonus",["assets/sounds/mp3/97_zvuk_odraz.mp3","assets/sounds/m4a/97_zvuk_odraz.m4a"]); + this.game.load.audio("auto_crash2",["assets/sounds/mp3/95_auto_crash2.mp3","assets/sounds/m4a/95_auto_crash2.m4a"]) + this.game.load.audio("auto_crash4",["assets/sounds/mp3/79_auto_crash4.mp3","assets/sounds/m4a/79_auto_crash4.m4a"]) + this.game.load.audio("end_of_Level_yeah",["assets/sounds/mp3/62_yeah.mp3","assets/sounds/m4a/62_yeah.m4a"]); + + //if (window.localStorage) window.localStorage.removeItem("coolmath_jellytruck"); + if(window.localStorage.getItem("coolmath_jellytruck")===null) + { + jt.InitData() + jt.game_data = jt.LoadData(); + } + else + { + jt.game_data = jt.LoadData(); + } + + this.game.input.addPointer(); + this.game.input.addPointer(); + }, + loadUpdate:function() + { + this.text.setText("Loading "+this.game.load.progress +"%"); + }, + create: function(){ + this.game.levelNumber = 0; + // images = this.game.cache.getKeys(Phaser.Cache.IMAGE); + if (navigator.userAgent.match(/Android|BlackBerry|Opera Mini|IEMobileiPhone|iPad|iPod/i)) { + this.ready = true; + } + else + { + this.ready = true; + } + + + }, + loadComplete:function(){ + //this.ready = true; + }, + update:function() { + if( window.localStorage.getItem("coolmath_jellytruck")!==null && this.ready && this.game.cache.checkSoundKey("end_of_Level_yeah")) + { + // this.press_txt.visible=true; + // this.game.sound.context.resume(); + this.game.state.start("menu"); + } + /* if(this.game.input.activePointer.justPressed() && this.press_txt.visible) + { + this.game.sound.context.resume(); + this.game.state.start("menu"); + + }*/ + }, + /*createSoundAndMusic: function() { + //this.gameMusic = this.game.add.audio('music'); + // if (typeof this.game.gameMusic !== 'object') + { + this.game.sound.stopAll(); + this.game.bgMusic = this.game.add.audio('bgmusic'); + this.game.truck_idle = this.game.add.audio('truckidle'); + this.game.sound.volume = 0.8; + this.game.level1_music = this.game.add.audio('level01_music'); + this.game.level2_music = this.game.add.audio('level02_music'); + + + } + }*/ + onTap:function(pointer) { + this.game.sound.context.resume(); + this.game.state.start("menu"); + }, + shutdown:function(){ + this.game.world.removeAll(); + this.title.destroy(); + this.title=null; + //this.load_border.destroy(); + //this.load_border=null; + //this.bar.destroy(); + //this.bar=null; + this.text.destroy(); + this.text=null; + } +}; diff --git a/jellytruck/js/state/menu.js b/jellytruck/js/state/menu.js new file mode 100644 index 0000000000000000000000000000000000000000..6d4e3ced854b161d91b3942bc08fc44ce229ea83 --- /dev/null +++ b/jellytruck/js/state/menu.js @@ -0,0 +1,700 @@ +"use strict"; + +window.JellyTruck.state.menu = { + preload: function () { + this.backdrop; + this.grill; + + this.main_menu; + this.level_selection; + this.title; + this.menu_art + this.play_button; + this.help_button; + this.option_button; + this.how_to_play_popup; + this.option_popup; + this.level_buttons = []; + + this.scene; + this.ground_art; + this.map = this.game.add.tilemap("menu_map"); + this.phyBody = this.game.add.tilemap("map"); + + //objects + this.statBody; + this.jellyObj; + this.player; + this.auto1; + this.auto2; + this.auto3; + this.auto4; + this.auto; + this.crusher2; + + this.leaf1_anim; + this.leaf2_anim; + this.button_over_snd; + this.button_click_snd; + + this.truck_state; + + }, + + create: function () { + + this.game.camera.scale.x = 1; + this.game.camera.scale.y = 1; + if (jt.game_fail != null) + jt.game_fail.killRestart(); + this.game.stage.disableVisibilityChange = true; + this.button_over_snd = this.game.add.audio("button_over"); + this.button_click_snd = this.game.add.audio("button_click"); + this.menu_state = 0; + if (jt.sfx == null) { + jt.sfx = new Sfx(this.game); + jt.sfx.setupMusic(); + } + + + this.backdrop = jt.setupMenuBg(this.game); + + //setup level + this.scene = jt.setupScene(this.game, this.map, "menu_scene", this.map.objects["Ground"][0].x - 20, this.map.objects["Ground"][0].y - 1060, 400, 400); + //setup player, flag and camera + this.player = jt.createTruck(this.game, this.scene.truck_x, this.scene.truck_y, this.scene.truck_type, this.phyBody); + this.game.camera.follow(this.player.truck.getSprite()); + //setup level objects + this.joint_ground = jt.setupJointGround(this.game, this.map); + this.statBody = jt.setupMenuStaticObject(this.game, this.map); + this.jellyObj = jt.setupJellyObj(this.game, this.map, this.phyBody); + + this.crusher = jt.setupCrusher(this.game, this.map, this.joint_ground); + + this.crusher2 = this.jellyObj[4]; + this.crusher2.enablePrimatic(this.joint_ground, -10, +220, -120, -120); + + //setup ground + this.ground_art = this.game.add.image(this.map.objects["Ground"][0].x - 22, this.map.objects["Ground"][0].y - 928, "menu_ground"); + + + this.auto1 = new Phaser.Physics.Box2D.Body(this.game, null, 1152, 1636, 0); + this.auto1.setRectangle(166, 72, 0, 0) + this.auto1.sensor = true; + this.auto1.setCollisionCategory(OTHER_CATEGORYBITS); + this.auto1.setCollisionMask(OTHER_MASKBITS); + this.auto1.setCategoryContactCallback(WHEEL_CATEGORYBITS, this.auto1Collision, this); + + this.auto2 = new Phaser.Physics.Box2D.Body(this.game, null, 4894, 1518, 0); + this.auto2.setRectangle(196, 118, 0, 0) + this.auto2.sensor = true; + this.auto2.setCollisionCategory(OTHER_CATEGORYBITS); + this.auto2.setCollisionMask(OTHER_MASKBITS); + this.auto2.setCategoryContactCallback(WHEEL_CATEGORYBITS, this.auto2Collision, this); + + this.auto3 = new Phaser.Physics.Box2D.Body(this.game, null, 4433, 739, 0); + this.auto3.setRectangle(166, 272, 0, 0) + this.auto3.sensor = true; + this.auto3.setCollisionCategory(OTHER_CATEGORYBITS); + this.auto3.setCollisionMask(OTHER_MASKBITS); + this.auto3.setCategoryContactCallback(WHEEL_CATEGORYBITS, this.auto3Collision, this); + + this.auto4 = new Phaser.Physics.Box2D.Body(this.game, null, 3420, 720, 0); + this.auto4.setRectangle(100, 600, 0, 0) + this.auto4.sensor = true; + this.auto4.setCollisionCategory(OTHER_CATEGORYBITS); + this.auto4.setCollisionMask(OTHER_MASKBITS); + this.auto4.setCategoryContactCallback(WHEEL_CATEGORYBITS, this.auto4Collision, this); + + this.menu_art = this.game.add.image(this.game.width / 2, this.game.height / 2, "menu_paint"); + this.menu_art.anchor.set(0.5); + this.menu_art.fixedToCamera = true; + + // this.menu_art.mask = this.ground_art; + + if (jt.game_data.sound === "1") + this.fx = this.game.add.button(this.game.width - 30, 30, "fxIcon", this.onMenuSoundClick, this, 3, 2, 2); + else + this.fx = this.game.add.button(this.game.width - 30, 30, "fxIcon", this.onMenuSoundClick, this, 1, 0, 0); + this.fx.anchor.set(0.5); + this.fx.fixedToCamera = true; + this.fx.inputEnabled = true; + + if (jt.game_data.music === "1") + this.soundIcon = this.game.add.button(this.game.width - 80, 30, "soundIcon", this.onMenuMusicClick, this, 3, 2, 2); + else + this.soundIcon = this.game.add.button(this.game.width - 80, 30, "soundIcon", this.onMenuMusicClick, this, 1, 0, 0); + this.soundIcon.anchor.set(0.5); + this.soundIcon.fixedToCamera = true; + this.soundIcon.inputEnabled = true; + + if (jt.menu_in_state == 0) { + this.setUpMainMenu(); + + } else { + jt.game_menu = null; + this.setUpLevelSelection(); + } + + this.koleso1 = this.game.physics.box2d.getBody(this.player.front.getBox()); + this.koleso2 = this.game.physics.box2d.getBody(this.player.back.getBox()); + this.cart = this.game.physics.box2d.getBody(this.player.truck.getBox()); + this.jellyObj[5].getBox().static = true; + this.game.sound.stopAll(); + if (jt.sfx) + jt.sfx.playMusic("menufx"); + this.truck_state = 0; + // this.game.input.addMoveCallback(this.updateMenu, this); + + }, + update: function () { + if (jt.sfx) + jt.sfx.loopMusic("menufx"); + + if (this.jellyObj[5].getBox().static && jt.dist(this.player.truck.getBox().x, this.player.truck.getBox().y, this.jellyObj[5].getBox().x, this.jellyObj[5].getBox().y) < 900) + this.jellyObj[5].getBox().static = false; + + switch (this.auto) { + case 1: + this.truck_state = 1; + this.koleso1.ApplyTorque(25 * 6 * 1); + this.koleso2.ApplyTorque(25 * 6); + //this.player.truck.getBox().velocity.x = 600; + this.player.truck.getBox().velocity.y = +600; + + break; + case 2: + this.truck_state = 1; + this.koleso1.ApplyTorque(25 * 6 * 1); + this.koleso2.ApplyTorque(25 * 6); + //this.player.truck.getBox().velocity.x = 600; + // this.player.truck.getBox().velocity.y = 0; + break; + case 3: + this.truck_state = 1; + this.koleso1.ApplyTorque(-18 * 6 * 1); + this.koleso2.ApplyTorque(-18 * 6); + //this.player.truck.getBox().velocity.x = 600; + // this.player.truck.getBox().velocity.y = +600; + break; + + case 4: + this.truck_state = 1; + this.koleso1.ApplyTorque(30 * 6 * 1); + this.koleso2.ApplyTorque(30 * 6); + //this.player.truck.getBox().velocity.x = 600; + this.player.truck.getBox().velocity.y = +600; + // this.player.truck.getBox().applyForce(10,0); + break; + } + if (this.player.truck.getBox().angle > 0 && this.player.truck.getBox().angle < 180) + this.cart.ApplyTorque(-180 * 1.8); + if (this.player.truck.getBox().angle < 0 && this.player.truck.getBox().angle > -180) + this.cart.ApplyTorque(180 * 1.8); + this.updateCrusher2(); + this.updateMenu(); + this.truckSound(); + }, + truckSound: function () { + switch (this.truck_state) { + case 0: + if (jt.sfx) + jt.sfx.playTruckSound("truck_start"); + break; + case 1: + // if(jt.sfx) + // jt.sfx.playTruckSound("truck_speed"); + break; + } + this._x1 = this.player.truck.getBody(0).x; + this._y1 = this.player.truck.getBody(0).y; + this._x2 = this.player.truck.getBody(6).x; + this._y2 = this.player.truck.getBody(6).y; + if ((this._y2 - this._y1) < -20) + if (jt.sfx) { + jt.sfx.truck_speed.volume = 0.7; + jt.sfx.playTruckSound("truck_wob"); + } + else + jt.sfx.truck_speed.volume = 1; + // if(!jt.sfx.wob1.isPlaying&& !jt.sfx.wob2.isPlaying&&!jt.sfx.wob3.isPlaying) + // jt.sfx.playTruckSound("truck_speed"); + }, + updateMenu: function () { + /* switch(this.menu_state) + { + case 0: + if(this.play_button && this.play_button.input.pointerOver()) + this.button_over_snd.play(); + break; + }*/ + }, + updateCrusher2: function () { + this.crusher2.time_trail++; + if (this.crusher2.time_trail == 1) { + + this.crusher2.joint.m_motorSpeed = 5000; + this.crusher2.joint.m_maxMotorForce = 12000; + this.crusher2.joint.m_enableMotor = true; + } + if (this.crusher2.time_trail == 100) { + this.crusher2.joint.m_motorSpeed = -10; + this.crusher2.joint.m_maxMotorForce = 100; + this.crusher2.joint.m_enableMotor = true; + } + if (this.crusher2.time_trail == 200) + this.crusher2.time_trail = 0; + }, + render: function () { + for (var i = 0; i < this.jellyObj.length; i++) + this.jellyObj[i].renderJelly(); + this.renderPlayer(); + if (jt.phy_debug) { + this.game.physics.box2d.debugDraw.joints = true; + this.game.debug.box2dWorld(); + } + //this.game.debug.gameInfo(2, 30); + // this.game.debug.gameTimeInfo(2, 150); + }, + renderPlayer: function () { + this.player.truck.renderJelly(); + this.player.front.renderJelly(); + this.player.back.renderJelly(); + }, + /******* Main Maenu******************/ + setUpMainMenu: function () { + + this.main_menu = this.game.add.group(); + //this.main_menu.fixedToCamera = true; + this.main_menu.visible = true; + + this.title = this.add.image(40, 40, 'title'); + this.title.fixedToCamera = true; + this.main_menu.add(this.title); + + this.play_button = this.game.add.button(100, 380, 'playthegame', this.playOnClick, this, 1, 0, 0); + this.play_button.anchor.setTo(0.5, 0.5); + this.play_button.inputEnabled = true; + this.play_button.fixedToCamera = true; + this.play_button.onDownSound = this.button_click_snd; + this.play_button.onOverSound = this.button_over_snd; + this.main_menu.add(this.play_button); + + this.option_button = this.game.add.button(240, 390, 'options', this.optionOnClick, this, 1, 0, 0); + this.option_button.anchor.setTo(0.5, 0.5); + this.option_button.inputEnabled = true; + this.option_button.fixedToCamera = true; + this.main_menu.add(this.option_button); + + this.help_button = this.game.add.button(380, 390, 'howtoplay', this.helpOnClick, this, 1, 0, 0); + this.help_button.anchor.setTo(0.5, 0.5); + this.help_button.inputEnabled = true; + this.help_button.fixedToCamera = true; + this.main_menu.add(this.help_button); + + }, + + onMenuMusicClick: function () { + switch (parseInt(jt.game_data.music)) { + case 0: + jt.game_data.music = "1"; + this.soundIcon.setFrames(3, 2, 2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + if (jt.game_data.sound = "1") + this.button_click_snd.play(); + break; + case 1: + jt.game_data.music = "0"; + this.soundIcon.setFrames(1, 0, 0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + if (jt.game_data.sound = "1") + this.button_click_snd.play(); + break; + } + }, + onMenuSoundClick: function () { + switch (parseInt(jt.game_data.sound)) { + case 0: + jt.game_data.sound = "1"; + this.fx.setFrames(3, 2, 2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + this.play_button.onDownSound = this.button_click_snd; + this.play_button.onOverSound = this.button_over_snd; + this.option_button.onDownSound = this.button_click_snd; + this.option_button.onOverSound = this.button_over_snd; + this.help_button.onDownSound = this.button_click_snd; + this.help_button.onOverSound = this.button_over_snd; + break; + case 1: + jt.game_data.sound = "0"; + this.fx.setFrames(1, 0, 0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + this.play_button.onDownSound = null; + this.play_button.onOverSound = null; + this.option_button.onDownSound = null; + this.option_button.onOverSound = null; + this.help_button.onDownSound = null; + this.help_button.onOverSound = null; + break; + } + }, + playOnClick: function () { + //if(jt.game_data.sound=="1") + this.button_click_snd = this.game.add.audio("button_click"); + this.main_menu.destroy(); + this.setUpLevelSelection(); + }, + optionOnClick: function () { + + this.showOptionPopUp(); + }, + helpOnClick: function () { + this.showHelpPopup(); + }, + showHelpPopup: function () { + this.play_button.inputEnabled = false; + this.option_button.inputEnabled = false; + this.help_button.inputEnabled = false; + this.how_to_play_popup = this.game.add.group(); + this.how_to_play; + if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { + this.how_to_play = this.add.image(-10, -20, 'how_to_play_popup_mobile'); + this.how_to_play.fixedToCamera = true; + this.how_to_play_popup.add(this.how_to_play); + } else { + this.how_to_play = this.add.image(-10, -20, 'how_to_play_popup'); + this.how_to_play.fixedToCamera = true; + this.how_to_play_popup.add(this.how_to_play); + } + this.closeBtn = this.game.add.button(555, 105, "closeBtn", this.hideHelpPopup, this); + this.closeBtn.fixedToCamera = true; + this.how_to_play_popup.add(this.closeBtn); + }, + hideHelpPopup: function () { + //destroy the box when the button is pressed + this.how_to_play_popup.destroy(); + this.play_button.inputEnabled = true; + this.option_button.inputEnabled = true; + this.help_button.inputEnabled = true; + }, + showOptionPopUp: function () { + this.play_button.inputEnabled = false; + this.option_button.inputEnabled = false; + this.help_button.inputEnabled = false; + this.option_popup = this.game.add.group(); + this.option = this.game.add.image(-15, -50, 'options_popup'); + this.option.fixedToCamera = true; + this.option_popup.add(this.option); + if (jt.game_data.music === "1") + this.music_radio_button = this.game.add.button(450, 170, "radio_button", this.menumusicBtnClicked, this, 3, 2, 2); + else + this.music_radio_button = this.game.add.button(450, 170, "radio_button", this.menumusicBtnClicked, this, 1, 0, 0); + this.music_radio_button.anchor.setTo(0.5, 0.5); + this.music_radio_button.fixedToCamera = true; + this.option_popup.add(this.music_radio_button); + if (jt.game_data.sound === "1") + this.sound_radio_button = this.game.add.button(450, 213, "radio_button", this.menuoptionSoundClick, this, 3, 2, 2); + else + this.sound_radio_button = this.game.add.button(450, 213, "radio_button", this.menuoptionSoundClick, this, 1, 0, 0); + + this.sound_radio_button.anchor.setTo(0.5, 0.5); + this.sound_radio_button.fixedToCamera = true; + this.option_popup.add(this.sound_radio_button); + this.closeBtn = this.game.add.button(570, 105, "closeBtn", this.hideOptionPopup, this); + this.closeBtn.fixedToCamera = true; + this.option_popup.add(this.closeBtn); + + this.option_main_menu = this.game.add.button(320, 256, "option_main_menu", this.hideOptionPopup, this, 1, 0, 0); + this.option_main_menu.fixedToCamera = true; + this.option_popup.add(this.option_main_menu); + this.options_choose_level = this.game.add.button(423, 256, "options_choose_level", this.levelBack, this, 1, 0, 0); + this.options_choose_level.fixedToCamera = true; + this.option_popup.add(this.options_choose_level); + if (jt.game_data.sound === "1") { + this.option_main_menu.onDownSound = this.button_click_snd; + this.option_main_menu.onOverSound = this.button_over_snd; + this.options_choose_level.onDownSound = this.button_click_snd; + this.options_choose_level.onOverSound = this.button_over_snd; + this.closeBtn.onDownSound = this.button_click_snd; + } else { + this.option_main_menu.onDownSound = null; + this.option_main_menu.onOverSound = null; + this.options_choose_level.onDownSound = null; + this.options_choose_level.onOverSound = null; + this.closeBtn.onDownSound = null; + } + }, + hideOptionPopup: function () { + //destroy the box when the button is pressed + this.option_popup.destroy(); + this.play_button.inputEnabled = true; + this.option_button.inputEnabled = true; + this.help_button.inputEnabled = true; + if (jt.game_data.sound === "1") { + this.play_button.onDownSound = this.button_click_snd; + this.play_button.onOverSound = this.button_over_snd; + this.option_button.onDownSound = this.button_click_snd; + this.option_button.onOverSound = this.button_over_snd; + this.help_button.onDownSound = this.button_click_snd; + this.help_button.onOverSound = this.button_over_snd; + } else { + this.play_button.onDownSound = null; + this.play_button.onOverSound = null; + this.option_button.onDownSound = null; + this.option_button.onOverSound = null; + this.help_button.onDownSound = null; + this.help_button.onOverSound = null; + } + }, + menumusicBtnClicked: function () { + switch (parseInt(jt.game_data.music)) { + case 0: + jt.game_data.music = "1"; + this.soundIcon.setFrames(3, 2, 2); + this.music_radio_button.setFrames(3, 2, 2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + if (jt.game_data.sound === "1") + this.button_click_snd.play(); + break; + case 1: + jt.game_data.music = "0"; + this.soundIcon.setFrames(1, 0, 0); + this.music_radio_button.setFrames(1, 0, 0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + if (jt.game_data.sound === "1") + this.button_click_snd.play(); + break; + } + }, + menuoptionSoundClick: function () { + switch (parseInt(jt.game_data.sound)) { + case 0: + jt.game_data.sound = "1"; + this.fx.setFrames(3, 2, 2); + this.sound_radio_button.setFrames(3, 2, 2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + this.option_main_menu.onDownSound = this.button_click_snd; + this.option_main_menu.onOverSound = this.button_over_snd; + this.options_choose_level.onDownSound = this.button_click_snd; + this.options_choose_level.onOverSound = this.button_over_snd; + this.closeBtn.onDownSound = this.button_click_snd; + break; + case 1: + jt.game_data.sound = "0"; + this.fx.setFrames(1, 0, 0); + this.sound_radio_button.setFrames(1, 0, 0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + this.option_main_menu.onDownSound = null; + this.option_main_menu.onOverSound = null; + this.options_choose_level.onDownSound = null; + this.options_choose_level.onOverSound = null; + this.closeBtn.onDownSound = null; + break; + } + }, + /******* Level Menu******************/ + setUpLevelSelection: function () { + + this.level_selection = this.game.add.group(); + // this.level_selection.fixedToCamera = true; + this.level_selection.visible = true; + var offsetX = 195; + var offsetY = 80; + var style = { + font: "22px king_cool_kc", + fill: "#ffffff" + }; + for (var i = 0; i < 20; i++) { + var x = offsetX + ((i % 5) * (97 + 8)); + var y = offsetY + (Math.floor((i / 5)) * (91 + 8)); + var level; + if (i < parseInt(jt.game_data.lastPlayed)) { + level = new LevelButton(this.game, i + 1, x, y, false, 1); + level.setStars(parseInt(jt.game_data.levels[i].star)); + } else + level = new LevelButton(this.game, i + 1, x, y, true, 1); + this.level_selection.add(level._level_group); + this.level_buttons.push(level); + } + this.menuBackBtn = this.game.add.button(90, 230, "back_btn", this.menuBack, this, 1, 0, 0); + this.menuBackBtn.fixedToCamera = true; + this.menuBackBtn.anchor.set(0.5, 0.5); + + this.score_txt = this.game.add.text(400, 455, "Score total \n" + jt.GetTotalScore(), { + font: "20px king_cool_kc", + fill: "#ffffff", + align: "center" + }); + this.score_txt.fixedToCamera = true; + this.score_txt.visible = true; + this.score_txt.anchor.set(0.5); + + this.levelVersion = this.game.add.text(700, 430, "version : 1.0", style); + this.levelVersion.fixedToCamera = true; + this.level_selection.add(this.menuBackBtn); + this.level_selection.add(this.levelVersion); + }, + menuBack: function () { + //destroy the box when the button is pressed + this.level_selection.destroy(); + this.setUpMainMenu(); + /*this.play_button.inputEnabled = true; + this.option_button.inputEnabled = true; + this.help_button.inputEnabled = true;*/ + }, + levelBack: function () { + this.option_popup.destroy(); + this.main_menu.destroy(); + this.setUpLevelSelection(); + }, + auto1Collision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) + this.auto = 1; + }, + auto2Collision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) + this.auto = 2; + }, + auto3Collision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) + this.auto = 3; + }, + auto4Collision: function (body1, body2, fixture1, fixture2, begin) { + if (begin) + this.auto = 4; + }, + shutdown:function(){ + this.game.world.removeAll(); + this.game.physics.box2d.clear(); + + this.scene.art.destroy(); + this.menu_art.destroy(); + this.scene.grounds[0].destroy(); + this.scene=null; + + this.player.truck.destroy(); + this.player.truck=null; + this.player.front.destroy(); + this.player.front=null; + this.player.back.destroy(); + + this.joint_ground.destroy(); + this.joint_ground=null; + + for(var i=0;i0) + { + for(var i=0;i 0) { + graph.rect(graphX, height - _spiraling, 1, 1, colors.RED); + } + this.graphX += 1; + this.graphX %= graph.width; + }; + + AdvancedTiming.prototype.updateMeters = function() { + var desiredFps, desiredMs, elapsed, elapsedMS, fps, ref1; + ref1 = this.game.time, desiredFps = ref1.desiredFps, elapsed = ref1.elapsed, elapsedMS = ref1.elapsedMS, fps = ref1.fps; + desiredMs = this.desiredMs(); + this.desiredFpsMeter.scale.x = desiredFps; + this.fpsMeter.scale.x = fps; + this.elapsedMeters.visible = this.showElapsed; + if (this.showElapsed) { + this.desiredMsMeter.scale.x = desiredMs; + this.msMeter.scale.x = elapsedMS; + this.elapsedMeter.scale.x = elapsed; + } + this.durationMeters.visible = this.showDurations; + if (this.showDurations) { + this.desiredDurMeter.scale.x = desiredMs; + this.updateDurationMeter.scale.x = this.updateDuration; + this.renderDurationMeter.scale.x = this.renderDuration; + this.renderDurationMeter.x = this.updateDurationMeter.width; + } + }; + + AdvancedTiming.prototype.updateText = function() { + this.text.text = this.textContent(); + this.text.style.fill = this.fpsColor(); + }; + + return AdvancedTiming; + + })(Phaser.Plugin); + + if (typeof module !== "undefined" && module !== null) { + module.exports = Phaser.Plugin.AdvancedTiming; + } + +}).call(this); \ No newline at end of file diff --git a/jellytruck/js/util/common.js b/jellytruck/js/util/common.js new file mode 100644 index 0000000000000000000000000000000000000000..7988d97958f5010e447e0ea95325bd8ed89fa3cc --- /dev/null +++ b/jellytruck/js/util/common.js @@ -0,0 +1,974 @@ +function WellDone(game,score,bonus,star) +{ + this.game = game; + this.score = score; + this.bonus =bonus; + this.star = star; + this.levelEndGroup = this.game.add.group(null,"wellDoneGroup",true); + // this.levelEndGroup.fixedToCamera = true; + //this.levelEndGroup.visible = false; + this.one = this.game.add.image(800, 190, '3_star'); + this.one.anchor.set(0.5); + this.levelEndGroup.add(this.one); + + this.choiseLabel = this.game.add.text(800, 80, 'MISSION COMPLETED', { font: '66px king_cool_kc', fill: '#ffffff', align:'center' }); + this.choiseLabel.anchor.set(0.5); + // this.choiseLabel.setShadow(5, 5, 'rgba(0,0,0,0.9)', 5); + this.levelEndGroup.add(this.choiseLabel); + + + this.scoreLabel; + this.bonusLabel; + this.bonustimer; + this.nextButton; + this.starone = this.game.add.image(200, -100, 'star01'); + this.starone.anchor.set(0.5); + this.startwo = this.game.add.image(380, -100, 'star01'); + this.startwo.anchor.set(0.5); + this.starthree = this.game.add.image(600, -100, 'star01'); + this.starthree.anchor.set(0.5); + this.levelEndGroup.add(this.starone); + this.levelEndGroup.add(this.startwo); + this.levelEndGroup.add(this.starthree); + this.start(); + +}; +WellDone.prototype.killDone = function(){ + this.levelEndGroup.destroy(); + jt.well_done =null; +}; +WellDone.prototype.start = function(){ + if(jt.sfx) + jt.sfx.playSound("well_done"); + this.game.add.tween(this.choiseLabel).to( { x: '-400' }, 800, Phaser.Easing.Linear.None, true); + this.onetween = this.game.add.tween(this.one).to( { x: '-400' }, 800, Phaser.Easing.Linear.None, true); + this.onetween.onComplete.add(this.addScore, this); +}; +WellDone.prototype.addScore = function(){ + if(this.score >0) + { + this.scoreLabel = this.game.add.text(400, 410, 'score: '+(this.score).toFixed(0), { font: '28px king_cool_kc', fill: '#ffffff', align:'center' }); + this.scoreLabel.anchor.set(0.5); + this.levelEndGroup.add(this.scoreLabel); + this.scoretween = this.game.add.tween(this.scoreLabel).to( { y: '-130' }, 500, Phaser.Easing.Linear.None, true); + this.scoretween.onComplete.add(this.addBonus, this); + } + else + { + this.addBonus(); + } + }; +WellDone.prototype.addBonus = function(){ + if(this.bonus > 0) + { + this.bonusLabel = this.game.add.text(400, 450, 'bonus: '+this.bonus, { font: '28px king_cool_kc', fill: '#ffffff', align:'center' }); + this.bonusLabel.anchor.set(0.5); + this.levelEndGroup.add( this.bonusLabel); + this.bonustween = this.game.add.tween(this.bonusLabel).to( { y: '-130' }, 500, Phaser.Easing.Linear.None, true); + this.bonustween.onComplete.add(this.startTimer, this); + } + else + { + this.showNext(); + } +}; +WellDone.prototype.startTimer = function(){ + this.bonustimer = this.game.time.events.loop(100, this.adjustScore, this); +}; +WellDone.prototype.adjustScore = function(){ + this._sec = this.bonus; + if(this._sec >0) + { + if(this._sec>100) + { + this._sec -= 100; + this.score += 100; + this.bonus =this._sec; + } + else + { + this.score += this._sec; + this._sec =0; + this.bonus =0; + } + if(jt.sfx) + jt.sfx.playSound("bonus"); + this.scoreLabel.setText('score: '+(this.score).toFixed(0)); + this.bonusLabel.setText('bonus: '+(this.bonus).toFixed(0)); + } + else + { + this.game.time.events.remove(this.bonustimer); + this.bonusLabel.destroy(); + if(this.star>0) + this.starOne(); + else + this.showNext(); + + } +}; +WellDone.prototype.starOne = function(){ + + this.onestar = this.game.add.tween(this.starone).to( { x:'190', y: '295' }, 100, Phaser.Easing.Linear.None, true,100); + if(jt.sfx) + jt.sfx.playSound("auto_crash_4"); + if(this.star>1) + this.onestar.onComplete.add(this.starTwo, this); + else + this.onestar.onComplete.add(this.showNext, this); +}; +WellDone.prototype.starTwo = function(){ + + this.twostar = this.game.add.tween(this.startwo).to( { x: '-32', y: '273',angle:'36' }, 100, Phaser.Easing.Linear.None, true,200); + if(jt.sfx) + jt.sfx.playSound("auto_crash_4"); + if(this.star>2) + this.twostar.onComplete.add(this.starThree, this); + else + { + this.twostar.onComplete.add(this.showNext, this); + } +}; + +WellDone.prototype.starThree = function(){ + + this.threestar = this.game.add.tween(this.starthree).to( {x: '-163', y: '273',angle:'-36'},100, Phaser.Easing.Linear.None, true,300); + if(jt.sfx) + jt.sfx.playSound("auto_crash_4"); + this.threestar.onComplete.add(this.showNext, this); + +}; +WellDone.prototype.showNext = function(){ + if(jt.sfx && this.star === 3) + jt.sfx.playSound("auto_crash_2"); + + this.nextButton = this.game.add.button(400, 380, "next_mission", this.onNextClick, this, 1, 0, 0); + this.nextButton.anchor.set(0.5); + this.levelEndGroup.add(this.nextButton); + if(jt.sfx) + jt.sfx.playTruckSound("truck_change"); +} +WellDone.prototype.onNextClick = function(){ + this.levelEndGroup.destroy(); + jt.well_done=null; + if(jt.current_level === parseInt(jt.game_data.lastPlayed)) + { + if(this.score > jt.game_data.levels[jt.current_level-1].score) + { + jt.game_data.levels[jt.current_level-1].score = this.score; + jt.game_data.levels[jt.current_level-1].star = this.star; + } + jt.game_data.lastPlayed = jt.current_level+1; + jt.SaveData(); + jt.game_data = jt.LoadData(); + + if(jt.current_level >= 20){ + jt.menu_in_state =1; + this.game.physics.box2d.resume(); + this.game.sound.stopAll(); + this.game.state.start("menu"); + } + else{ + this.game.state.start(this.game.nextlevelNumber); + } + + } + else + { + if(this.score > jt.game_data.levels[jt.current_level-1].score) + { + jt.game_data.levels[jt.current_level-1].score = this.score; + jt.game_data.levels[jt.current_level-1].star = this.star; + } + jt.SaveData(); + jt.game_data = jt.LoadData(); + jt.menu_in_state =1; + this.game.physics.box2d.resume(); + this.game.sound.stopAll(); + this.game.state.start("menu"); + } +}; + +///Game Menu.................................... +function GameMenu(game) +{ + this.game = game; + this.gameMenuGroup = this.game.add.group(null,"gameMenuGroup",true); + if(parseInt(jt.game_data.sound)===1) + this.fx = this.game.add.button(this.game.width-30, 30, "fxIcon", this.onSoundClick, this,3,2,2); + else + this.fx = this.game.add.button(this.game.width-30, 30, "fxIcon", this.onSoundClick, this,1,0,0); + this.fx.anchor.set(0.5); + // this.fx.fixedToCamera = true; + this.fx.inputEnabled = true; + this.gameMenuGroup.add(this.fx); + if(parseInt(jt.game_data.music)===1) + this.soundIcon = this.game.add.button(this.game.width-80, 30, "soundIcon", this.onMusicClick, this,3,2,2); + else + this.soundIcon = this.game.add.button(this.game.width-80, 30, "soundIcon", this.onMusicClick, this,1,0,0); + this.soundIcon.anchor.set(0.5); + // this.soundIcon.fixedToCamera = true; + this.soundIcon.inputEnabled = true; + this.gameMenuGroup.add(this.soundIcon); + + this.restart = this.game.add.button(30,30, "restartIcon", this.onRestartClick, this,1,0,0); + this.restart.anchor.set(0.5); + // this.restart.fixedToCamera = true; + this.restart.inputEnabled = true; + this.gameMenuGroup.add(this.restart); + + this.pause = this.game.add.button(75,30, "pauseIcon", this.onPauseClick, this,1,0,0); + this.pause.anchor.set(0.5); + // this.pause.fixedToCamera = true; + this.pause.inputEnabled = true; + this.gameMenuGroup.add(this.pause); + + this.levelLabel = this.game.add.text(400, this.game.height- 450, this.game.mobLevel, { font: '24px king_cool_kc', fill: '#ffffff', align:'center' }); + // this.levelLabel.fixedToCamera = true; + this.levelLabel.anchor.set(0.5); + this.gameMenuGroup.add(this.levelLabel); + + this.score_txt = this.game.add.text(400,420, "Score: ", { font: "26px king_cool_kc", fill: "#ffffff", align: "center" }); + //this.score_txt.fixedToCamera = true; + this.score_txt.visible = false; + this.score_txt.anchor.set(0.5); + this.score=0; + this.gameMenuGroup.add(this.score_txt); + + this.menu_button_over_snd = this.game.add.audio("button_over"); + this.menu_button_click_snd = this.game.add.audio("button_click"); + this.gameMenuGroup.visible = false; + + + /// Mobile Controller + if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) + { + this.gameController(); + } + + +}; +GameMenu.prototype.gameController = function() { + this.buttonleft = this.game.add.button(50, 430, 'left_bt', null, this, 0, 1, 0, 1); + //this.buttonleft.fixedToCamera = true; + this.buttonleft.anchor.set(0.5); + this.gameMenuGroup.add(this.buttonleft); + + this.buttonleft.events.onInputDown.add(function() { + jt.mobileleft = true; + }); + this.buttonleft.events.onInputUp.add(function() { + jt.mobileleft = false; + }); + + this.buttonright = this.game.add.button(150, 430, 'right_bt', null, this, 0, 1, 0, 1); + // this.buttonright.fixedToCamera = true; + this.buttonright.anchor.set(0.5); + this.gameMenuGroup.add(this.buttonright); + + this.buttonright.events.onInputDown.add(function() { + jt.mobileright = true; + }); + this.buttonright.events.onInputUp.add(function() { + jt.mobileright = false; + }); + + this.buttondown = this.game.add.button(this.game.width-150, 430, 'stop_img', null, this, 0, 1, 0, 1); + //this.buttondown.fixedToCamera = true; + this.buttondown.anchor.set(0.5); + this.gameMenuGroup.add(this.buttondown); + + this.buttondown.events.onInputDown.add(function() { + jt.mobiledown = true; + }); + this.buttondown.events.onInputUp.add(function() { + jt.mobiledown = false; + }); + + this.buttonup = this.game.add.button(this.game.width-50, 430, 'go_img', null, this, 0, 1, 0, 1); + // this.buttonup.fixedToCamera = true; + this.buttonup.anchor.set(0.5); + this.gameMenuGroup.add(this.buttonup); + + this.buttonup.events.onInputDown.add(function() { + jt.mobileup = true; + }); + this.buttonup.events.onInputUp.add(function() { + jt.mobileup = false; + }); + +}; +GameMenu.prototype.onMusicClick = function(){ + switch(parseInt(jt.game_data.music)) + { + case 0: + jt.game_data.music="1"; + this.soundIcon.setFrames(3,2,2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + break; + case 1: + jt.game_data.music ="0"; + this.soundIcon.setFrames(1,0,0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + break; + } +}; +GameMenu.prototype.onSoundClick = function(){ + switch(parseInt(jt.game_data.sound)) + { + case 0: + jt.game_data.sound="1"; + this.fx.setFrames(3,2,2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + break; + case 1: + jt.game_data.sound ="0"; + this.fx.setFrames(1,0,0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + break; + } +}; +GameMenu.prototype.onRestartClick = function(){ + if(jt.game_fail!=null) + { + jt.game_fail.killRestart(); + jt.game_fail = null; + } + this.game.state.start(this.game.levelNumber); +}; +GameMenu.prototype.onPauseClick = function(){ + jt.pause = true; + if(jt.pause){ + this.game.physics.box2d.pause(); + } + // this.game.camera.unfollow(); + this.showOption(); +}; +GameMenu.prototype.destroy = function(){ + this.gameMenuGroup.destroy(); +}; +GameMenu.prototype.showOption = function(){ + if(jt.sfx) + jt.sfx.stopAllSound(); + this.fx.inputEnabled = false; + this.pause.inputEnabled = false; + this.soundIcon.inputEnabled = false; + this.restart.inputEnabled = false; + + this.option_popup = this.game.add.group(null,"optionGroup",true); + this.option = this.game.add.image(-15, -50, 'options_popup'); + // this.option.fixedToCamera = true; + this.option_popup.add(this.option); + if(parseInt(jt.game_data.music)===1) + this.music_radio_button = this.game.add.button(450, 170, "radio_button", this.musicBtnClicked, this,3,2,2); + else + this.music_radio_button = this.game.add.button(450, 170, "radio_button", this.musicBtnClicked, this,1,0,0); + this.music_radio_button.anchor.setTo(0.5, 0.5); + // this.music_radio_button.fixedToCamera = true; + this.option_popup.add(this.music_radio_button); + if(parseInt(jt.game_data.sound)===1) + this.sound_radio_button = this.game.add.button(450, 213, "radio_button",this.optionSoundClick, this,3,2,2); + else + this.sound_radio_button = this.game.add.button(450, 213, "radio_button", this.optionSoundClick, this,1,0,0); + this.sound_radio_button.anchor.setTo(0.5, 0.5); + // this.sound_radio_button.fixedToCamera = true; + this.option_popup.add(this.sound_radio_button); + + this.closeBtn = this.game.add.button(570, 105, "closeBtn", this.resumeGame, this); + // this.closeBtn.fixedToCamera = true; + this.option_popup.add(this.closeBtn); + + this.option_main_menu = this.game.add.button(320, 256, "option_main_menu",function optionToMenu(){ + jt.pause = false; + if(jt.game_menu !=null) + jt.game_menu.killMenu(); + this.option_popup.destroy(); + jt.menu_in_state =0; + this.game.physics.box2d.resume(); + this.game.state.start("menu"); + }, this,1,0,0); + // this.option_main_menu.fixedToCamera = true; + this.option_popup.add(this.option_main_menu); + + this.options_choose_level = this.game.add.button(423, 256, "options_choose_level", function levelBack(){ + jt.pause = false; + if(jt.game_menu !=null) + jt.game_menu.killMenu(); + this.option_popup.destroy(); + jt.menu_in_state =1; + this.game.physics.box2d.resume(); + this.game.state.start("menu"); + }, this,1,0,0); + // this.options_choose_level.fixedToCamera = true; + this.option_popup.add(this.options_choose_level); + if(jt.game_data.sound==="1") + { + this.option_main_menu.onDownSound = this.menu_button_click_snd; + this.option_main_menu.onOverSound = this.menu_button_over_snd; + this.options_choose_level.onDownSound = this.menu_button_click_snd; + this.options_choose_level.onOverSound = this.menu_button_over_snd; + this.closeBtn.onDownSound = this.menu_button_click_snd; + } + else + { + this.option_main_menu.onDownSound = null; + this.option_main_menu.onOverSound = null; + this.options_choose_level.onDownSound = null; + this.options_choose_level.onOverSound = null; + this.closeBtn.onDownSound = null; + } +}; + +GameMenu.prototype.resumeGame = function() { + jt.pause = false; + this.option_popup.destroy(); + this.fx.inputEnabled = true; + this.pause.inputEnabled = true; + this.soundIcon.inputEnabled = true; + this.restart.inputEnabled = true; + if(!jt.pause){ + this.game.physics.box2d.resume(); + } +}; +GameMenu.prototype.musicBtnClicked = function() { + switch(parseInt(jt.game_data.music)) + { + case 0: + jt.game_data.music="1"; + this.soundIcon.setFrames(3,2,2); + this.music_radio_button.setFrames(3,2,2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + if(jt.game_data.sound==="1") + this.menu_button_click_snd.play(); + break; + case 1: + jt.game_data.music ="0"; + this.soundIcon.setFrames(1,0,0); + this.music_radio_button.setFrames(1,0,0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + if(jt.game_data.sound==="1") + this.menu_button_click_snd.play(); + break; + } +}, +GameMenu.prototype.optionSoundClick = function(){ + switch(parseInt(jt.game_data.sound)) + { + case 0: + jt.game_data.sound="1"; + this.fx.setFrames(3,2,2); + this.sound_radio_button.setFrames(3,2,2); + jt.SaveData(); + jt.game_data = jt.LoadData(); + this.option_main_menu.onDownSound = this.menu_button_click_snd; + this.option_main_menu.onOverSound = this.menu_button_over_snd; + this.options_choose_level.onDownSound = this.menu_button_click_snd; + this.options_choose_level.onOverSound = this.menu_button_over_snd; + this.closeBtn.onDownSound = this.menu_button_click_snd; + break; + case 1: + jt.game_data.sound ="0"; + this.fx.setFrames(1,0,0); + this.sound_radio_button.setFrames(1,0,0); + jt.SaveData(); + jt.game_data = jt.LoadData(); + this.option_main_menu.onDownSound = null; + this.option_main_menu.onOverSound = null; + this.options_choose_level.onDownSound = null; + this.options_choose_level.onOverSound = null; + this.closeBtn.onDownSound = null; + + break; + } +}; + +GameMenu.prototype.zoom = function(val) { + if(val < 1) + { + this.restart.scale.x +=val; + this.restart.scale.y +=val; + this.pause.scale.x +=val; + this.pause.scale.y +=val; + this.levelLabel.scale.x +=val; + this.levelLabel.scale.y +=val; + this.fx.scale.x +=val; + this.fx.scale.y +=val; + this.soundIcon.scale.x +=val; + this.soundIcon.scale.y +=val; + + this.score_txt.scale.x +=val; + this.score_txt.scale.y +=val; + } + else + { + this.restart.scale.x = 1; + this.restart.scale.y = 1; + this.pause.scale.x = 1; + this.pause.scale.y = 1; + this.levelLabel.scale.x =1; + this.levelLabel.scale.y =1; + this.fx.scale.x = 1; + this.fx.scale.y = 1; + this.soundIcon.scale.x = 1; + this.soundIcon.scale.y = 1; + + this.score_txt.scale.x = 1; + this.score_txt.scale.y = 1; + } +}; +GameMenu.prototype.outzoom = function(val,zval) { + if(val < zval) + { + this.restart.scale.x +=val; + this.restart.scale.y +=val; + this.pause.scale.x +=val; + this.pause.scale.y +=val; + this.levelLabel.scale.x +=val; + this.levelLabel.scale.y +=val; + this.fx.scale.x +=val; + this.fx.scale.y +=val; + this.soundIcon.scale.x +=val; + this.soundIcon.scale.y +=val; + + this.score_txt.scale.x +=val; + this.score_txt.scale.y +=val; + } + else + { + this.restart.scale.x = zval; + this.restart.scale.y = zval; + this.pause.scale.x = zval; + this.pause.scale.y = zval; + this.levelLabel.scale.x =zval; + this.levelLabel.scale.y =zval; + this.fx.scale.x = zval; + this.fx.scale.y = zval; + this.soundIcon.scale.x = zval; + this.soundIcon.scale.y = zval; + + this.score_txt.scale.x = zval; + this.score_txt.scale.y = zval; + } +}; +GameMenu.prototype.setScore = function(score) +{ + if(score>0) + this.score_txt.setText("Score: "+ (score).toFixed(0)); + else + this.score_txt.setText("Score: 0"); + if(!this.score_txt.visible) + this.score_txt.visible = true; +}; +GameMenu.prototype.enable = function() +{ + this.gameMenuGroup.visible = true; +}; +GameMenu.prototype.disable = function() +{ + this.gameMenuGroup.visible = false; +}; +GameMenu.prototype.killMenu = function() +{ + this.gameMenuGroup.destroy(); + jt.game_menu=null; +}; +GameMenu.prototype.setLevelText = function() +{ + this.levelLabel.setText(this.game.mobLevel); +}; + +/////////////////////// Game Menu End + +// Level Fail +function LevelFail(game){ + this.game = game; + this.gameRestart = this.game.add.group(null,"gameRestartGroup",true); + this.restart_txt = this.game.add.text(400, 160, "You Failed", { font: "60px king_cool_kc", fill: "#ffffff", align: "center" }); +// this.restart_txt.fixedToCamera = true; + this.restart_txt.anchor.set(0.5); + this.restart_txt.scale.set(0.1); + // this.restart_txt.visible = false; + this.gameRestart.add(this.restart_txt); + // this.restart_txt.setShadow(5, 5, 'rgba(0,0,0,0.9)', 5); + + this.restartButton = this.game.add.button(400, 400, "level_restart", this.restartBtnClicked, this,1,0,0); + // this.restartButton.visible = false; + // this.restartButton.fixedToCamera = true; + this.restartButton.anchor.set(0.5); + this.restartButton.scale.set(0.1); + this.gameRestart.add(this.restartButton); + this.space = this.game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); + if(this.space.isDown) + this.restartBtnClicked(); + } +LevelFail.prototype.updateFail = function() +{ + this.tweens = this.game.add.tween(this.restart_txt.scale); + this.tweens.to({x: 1.0, y:1.0}, 1000, Phaser.Easing.Linear.None); + //s.onComplete.addOnce(theEnd, this); + this.tweens.start(); + + + //this.restartthegame.visible = true; + this.restartButton = this.game.add.tween(this.restartButton.scale) + this.restartButton.to({x: 1.0, y:1.0}, 1000, Phaser.Easing.Linear.None); + //s.onComplete.addOnce(theEnd, this); + this.restartButton.start(); + + + +}; +LevelFail.prototype.killRestart = function() { + this.gameRestart.destroy(); + jt.game_fail=null; +}, +LevelFail.prototype.restartBtnClicked = function(){ + this.gameRestart.destroy(); + jt.game_fail=null; + this.game.state.start(this.game.levelNumber); +}; +//Game Bg + function GameBg(game) + { + // this.bgGroup = game.add.group(null,"bgGroup",false); + this._bg = game.add.image(game.width / 2, game.height / 2, "bg"); + this._bg.anchor.set(0.5); + this._bg.fixedToCamera = true; + + // this.bgGroup.add(this._bg); + + this._light = game.add.image(689, 108, "bg_light"); + this._light.anchor.set(0.6, 0.3); + this._light.fixedToCamera = true; + // this.bgGroup.add(this._light); + // this.bgGroup.fixedToCamera=true; + }; + GameBg.prototype.setScale = function(val,val1) + { + this._bg.scale.x = val; + this._bg.scale.y = val; + this._light.scale.x = val1; + this._light.scale.y = val1; + }; + + GameBg.prototype.destroy = function() + { + this._bg.destroy(); + this._bg=null; + this._light.destroy(); + this._light=null; + + }; + +//-------------End Game Bg +//Game Sound Manager +function Sfx(game) +{ + this.game= game; + this.menufx; + this.oddbg; + this.evenbg; + this.truck_idle; + + this.well_done_snd; + this.bonus_snd; + this.autocrash2_snd; + this.autocrash4_snd ; + + this.truck_idle; + this.truck_speed; + this.truck_slow; + this.wob1; + this.wob2; + this.wob3; + this.truck_start; + this.truck_change; + this.truck_bang1; +}; + +Sfx.prototype.setupMusic = function() +{ + this.menufx = this.game.add.audio('bgmusic'); + this.menufx.loop=true; + this.oddbg = this.game.add.audio('odd_music'); + this.oddbg.loop=true; + this.evenbg = this.game.add.audio('even_music'); + this.evenbg.loop =true; + this.truck_idle = this.game.add.audio('truck_idle'); + this.truck_idle.loop =true; + + this.well_done_snd = this.game.add.audio("end_of_Level_yeah"); + this.bonus_snd = this.game.add.audio("bonus") + this.autocrash2_snd = this.game.add.audio("auto_crash2"); + this.autocrash4_snd = this.game.add.audio("auto_crash4"); + + this.truck_speed = this.game.add.audio("truck_speed"); + this.truck_slow = this.game.add.audio("truck_slow"); + this.truck_start = this.game.add.audio("truck_start"); + this.wob1 = this.game.add.audio("truck_wobble1"); + this.wob2 = this.game.add.audio("truck_wobble2"); + this.wob3 = this.game.add.audio("truck_wobble3"); + this.truck_change = this.game.add.audio("truck_change"); + this.truck_bang1 = this.game.add.audio("truck_bang1"); + this.truck_bang2 = this.game.add.audio("truck_bang2"); +}; + +Sfx.prototype.playMusic = function(name) +{ + switch(name) + { + case "menufx": + if(this.menufx && jt.game_data.music=="1" && !this.menufx.isPlaying) + { + this.menufx.play(); + this.menufx.volume = 0.5; + } + break; + case "oddbg": + if( jt.game_data.music=="1" && !this.oddbg.isPlaying) + { + this.oddbg.play(); + this.oddbg.volume = 0.5; + } + break; + case "evenbg": + if( jt.game_data.music=="1" && !this.evenbg.isPlaying) + { + this.evenbg.play(); + this.evenbg.volume = 0.6; + } + break; + } + +}; +Sfx.prototype.loopMusic = function(name) +{ + switch(name) + { + case "menufx": + if(this.menufx && jt.game_data.music=="1" && !this.menufx.isPlaying) + { + this.menufx.play(); + this.menufx.volume = 0.5; + } + else if(this.menufx && jt.game_data.music=="0" && this.menufx.isPlaying) + this.menufx.stop(); + break; + case "oddbg": + if( jt.game_data.music=="1" && !this.oddbg.isPlaying) + { + this.oddbg.play(); + this.oddbg.volume = 0.5; + } + else if( jt.game_data.music=="0" && this.oddbg.isPlaying) + this.oddbg.stop(); + break; + case "evenbg": + if( jt.game_data.music=="1" && !this.evenbg.isPlaying) + { + this.evenbg.play(); + this.evenbg.volume = 0.6; + } + else if( jt.game_data.music=="0" && this.evenbg.isPlaying) + this.evenbg.stop(); + break; + + } + }; + Sfx.prototype.playSound = function(name) + { + if(jt.game_data.sound == "1") + { + switch(name) + { + case "well_done": + this.well_done_snd.play(); + break; + case "bonus": + this.bonus_snd.play(); + break; + case "auto_crash_2": + this.autocrash2_snd.play(); + break; + case "auto_crash_4": + this.autocrash4_snd.play(); + break; + + } + } + }; + + Sfx.prototype.playTruckSound = function(name) + { + if(jt.game_data.sound === "1") + { + switch(name) + { + case "truck_start": + if(!this.truck_start.isPlaying) + { + this.truck_start.play(); + } + break; + case "truck_idle": + if(!this.truck_idle.isPlaying) + { + this.truck_idle.play(); + //this.truck_idle.volume=0.8; + + } + break; + case "truck_speed": + if(!this.truck_speed.isPlaying) + { + + this.truck_speed.play(); + } + break; + case "truck_slow": + if(!this.truck_slow.isPlaying) + { + this.truck_slow.play(); + } + break; + case "truck_wob": + this.snd = (Math.random() * 3 + 1).toFixed(0); + if(!this.wob1.isPlaying && !this.wob2.isPlaying && !this.wob3.isPlaying) + { + this.wob1.play(); + } + switch(this.snd) + { + case 1: + this.wob1.play(); + break; + case 2: + this.wob2.play(); + break; + case 3: + this.wob3.play(); + break; + } + break; + case "truck_bang1": + this.truck_bang1.play(); + break; + case "truck_change": + this.truck_change.play(); + break; + case "truck_bang2": + this.truck_bang2.play(); + break; + } + } + else + { + if(this.truck_idle.isPlaying) + this.truck_idle.stop(); + if(this.truck_speed.isPlaying) + this.truck_speed.stop(); + if(this.truck_slow.isPlaying) + this.truck_slow.stop(); + if(this.wob1.isPlaying) + this.wob1.stop(); + + } + }; + Sfx.prototype.stopSound = function(name) + { + switch(name) + { + case "truck_idle": + this.truck_idle.stop(); + break; + + case "truck_speed": + this.truck_speed.stop(); + break; + case "truck_slow": + this.truck_slow.stop(); + break; + } + }; + + Sfx.prototype.stopAllSound = function(name) + { + if(this.truck_start.isPlaying) + this.truck_start.pause(); + else + this.truck_start.stop(); + if(this.truck_idle.isPlaying) + this.truck_idle.pause(); + else + this.truck_idle.stop(); + + if(this.truck_speed.isPlaying) + this.truck_speed.pause(); + else + this.truck_speed.stop(); + + if(this.truck_slow.isPlaying) + this.truck_slow.pause(); + else + this.truck_slow.stop(); + + if(this.wob1.isPlaying) + this.wob1.pause(); + else + this.wob1.stop(); + + if(this.truck_change.isPlaying) + this.truck_change.pause(); + else + this.truck_change.stop(); + + if(this.truck_bang1.isPlaying) + this.truck_bang1.pause(); + else + this.truck_bang1.stop(); + + }; + Sfx.prototype.resumeAllSound = function(name) + { + if(this.truck_start.onPause) + this.truck_start.resume(); + else + this.truck_start.stop(); + + if(this.truck_idle.onPause) + this.truck_idle.resume(); + else + this.truck_idle.stop(); + + if(this.truck_speed.onPause) + this.truck_speed.resume(); + else + this.truck_speed.stop(); + + if(this.truck_slow.onPause) + this.truck_slow.resume(); + else + this.truck_slow.stop(); + + if(this.wob1.onPause) + this.wob1.resume(); + else + this.wob1.stop(); + + if(this.truck_change.onPause) + this.truck_change.resume(); + else + this.truck_change.stop(); + + if(this.truck_bang1.onPause) + this.truck_bang1.resume(); + else + this.truck_bang1.stop(); + }; +